Use the PHP Server Monitor program to build your own server monitoring tool

888u

Last update at :2024-07-02,Edit by888u

There are still many free or paid servers, website monitoring services and tools. If our ordinary personal use is not as complicated as monitoring, there is no need to build a powerful tool like zabbix. Generally, individuals cannot use it or Can't build it either. At the same time, there are many third-party program source codes or monitoring platforms to choose from on the Internet.

A few days ago, Snail saw a free PHP Server Monitor program that supports self-built monitoring services. The installation environment only needs to support regular WEB functions. In this article, I will also try it out to see if it suits our future needs.

First, official website

Official website address: http://www.phpservermonitor.org

Second, download and install

Download the latest version directly from the official website, and the server needs to support PHP5.3.7+, cURL, and MySQL.

Here we will check whether our current WEB environment supports installation. It seems that my current test WEB environment supports it.

Fill in our database information. At the same time, we need to modify the generated configuration file config.php.sample to config.php and modify the configuration. Finally, we can set the backend username and password to log in.

Third, setup and use

1. Set Simplified Chinese

The background of the PHP Server Monitor program also supports setting multiple languages ​​such as Simplified Chinese.

2. Set alarm mode

Supports setting email reminders, SMS reminders, etc. The latter requires setting up a third-party service. Generally, it is enough for us to use email reminders.

3. Add monitoring service

Third, scheduled task settings

#Install crontabyum -y install crontabs#Add a scheduled task crontab -e#Add the following content to the scheduled task, please modify the path according to the actual situation*/5 * * * * /usr/local/php/bin/php /home/ wwwroot/website directory/cron/status.cron.php#Reload crontabservice crond reload

Add a scheduled task, otherwise the data cannot be obtained. (Refer to XIAOZ’s article here: https://www.xiaoz.me/archives/9253)

Fourth, monitoring effect

This way we can see the monitoring effect.

Recommended site searches: php virtual space, instant ip server, US host network, Hong Kong domain name registration, US website server, virtual host purchase, independent ip virtual host, US server rental website, ASP host space, Wanwang domain name space ,

Use the PHP Server Monitor program to build your own server monitoring tool

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码