How to install php server monitor on OpenSUSE leap 42.3

Installing PHP Server Monitor on OpenSUSE leap 42.3

PHP Server Monitor is an opensource web-based monitoring tool which checks whether your websites, services, and servers are up. It comes with a web interface where you can manage your services and websites.

Basic Requirements

  • Apache web server
  • php 7 (php php-openssl php-mysql php-mbstring php-dom php-json php-session php-ctype php-tokenizer php-simplexml php-pcre php-zip php-pdo php-curl php-iconv php-xml)
  • Mariadb/Mysql ( Create a database and user and grant all privileges for dbuser)

Installation

First download the archive format with the help of wget command

linuxhelp1:~ # wget https://sourceforge.net/projects/phpservermon/files/phpservermon/phpservermon-3.2.0.tar.gz
--2018-08-29 13:18:15--  https://sourceforge.net/projects/phpservermon/files/phpservermon/phpservermon-3.2.0.tar.gz
Resolving sourceforge.net (sourceforge.net)... 216.105.38.13
Connecting to sourceforge.net (sourceforge.net)|216.105.38.13|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://sourceforge.net/projects/phpservermon/files/phpservermon/phpservermon-3.2.0.tar.gz/download [following]
.
.
.
Connecting to excellmedia.dl.sourceforge.net (excellmedia.dl.sourceforge.net)|202.153.32.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1473336 (1.4M) [application/x-gzip]
Saving to: ‘phpservermon-3.2.0.tar.gz’

100%[===================================================================================================================================================>] 1,473,336    190KB/s   in 7.4s   

2018-08-29 13:18:31 (194 KB/s) - ‘phpservermon-3.2.0.tar.gz’ saved [1473336/1473336]

Now extract the package by using tar command.

linuxhelp1:~ #  tar -zxf phpservermon-3.2.0.tar.gz

Next move into the extracted directory and list and view the installation bundle packages inside

linuxhelp1:~ # cd phpservermon-3.2.0
linuxhelp1:~/phpservermon-3.2.0 # ls -l
total 96
-rw-r--r--  1 user1 1000  6315 Apr 16  2017 CHANGELOG.rst
-rw-r--r--  1 user1 1000   248 Apr 16  2017 config.php.sample
drwxr-xr-x  2 user1 1000  4096 Apr 16  2017 cron
drwxr-xr-x  4 user1 1000  4096 Apr 16  2017 docs
-rw-r--r--  1 user1 1000  4286 Apr 16  2017 favicon.ico
-rw-r--r--  1 user1 1000  1452 Apr 16  2017 favicon.png
-rw-r--r--  1 user1 1000   647 Apr 16  2017 .htaccess
-rw-r--r--  1 user1 1000  1588 Apr 16  2017 index.php
-rw-r--r--  1 user1 1000  1175 Apr 16  2017 install.php
-rw-r--r--  1 user1 1000 35819 Apr 16  2017 LICENSE
-rw-r--r--  1 user1 1000  4095 Apr 16  2017 README.rst
drwxr-xr-x  7 user1 1000  4096 Apr 16  2017 src
drwxr-xr-x  5 user1 1000  4096 Apr 16  2017 static
drwxr-xr-x 10 user1 1000  4096 Apr 16  2017 vendor

Rename and move to the apache document root location

linuxhelp1:~ # mv phpservermon-3.2.0 phpservermon
linuxhelp1:~ # mv phpservermon /srv/www/htdocs/

Next set the appropriate permission for the apache document root location and its sub directories

linuxhelp1:~ # chown -R wwwrun.www /srv/www/htdocs/phpservermon/
inuxhelp1:~ # chmod -R 775 /srv/www/htdocs/phpservermon/

Now configure virtual host under /etc/apache2/conf.d as follows

linuxhelp1:~ # cd /etc/apache2/conf.d/

Create virtual host for php server monitor using the following method.

linuxhelp1:/etc/apache2/conf.d # vim phpserver.conf
<VirtualHost *:80>
ServerName www.linuxhelp1.com
Documentroot "/srv/www/htdocs/ "
Directoryindex index.html index.php
<Directory "/srv/www/htdocs/">
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
</Directory>
</VirtualHost>

Save and exit the configuration and finally restart your apache service

linuxhelp1:/etc/apache2/conf.d # systemctl restart apache2

Now switch to your browser and enter your ip/domain name i.e) http://server-ip/phpservermon

Enter you database credentials and save the configuration Save the configuration displayed in the interface and copy the same in /srv/www/htdocs/phpservmon/config.php as shown below Now select Go to your Monitor Next sign in to your account Add new device by its domain name or IP address and provide label as per your convenience and other . After adding your device the wizard looks something like this

Now check its status Apart form admin user you can also create separate user Now to enable email notifications go to config and select Email tab provide the email setting username and password and save the settings In similar way you can also add number of devices and monitor them with (ping,services and website manner) With this, the method to install php server monitor on OpenSUSE leap 42.3 comes to an end.

FAQ
Q
what are the Capabilities of PHP server monitor?
A
- Out-of-the-box management of PHP server.

- Monitors performance statistics such as - availability and response time.

- Based on the thresholds configured, notifications and alarms are generated if the PHP or any specified attribute within the system has problems. Actions are executed automatically based on configurations.
Q
What are the Pre-requirements for PHP server monitor?
A
Web server

MySQL database

For PHP5: 5.5.9+

For PHP7: 7.0.8+

PHP cURL package

PHP PDO mysql driver

PHP-XML
Q
How to do process related monitors in Php server Monitor?
A
Here in PHP Server Monitor you will get service monitors with port numbers and website monitors where you can provide URLs and also assign required thresholds for it.
Q
How to download the source of Php server monitor from GitHub?
A
you need to run the following command to install the dependencies:


#php composer.phar install
Q
What is meant by service monitor in PHP server monitor?
A
A connection will be made to the entered ip or domain, on the given port. This way you can check if certain services on your machine are still running. To check your IMAP service for example, enter port 143.