You can use monitoring programs such as cacti and nagios to monitor nginx servers, but sometimes it is not that complicated. you can use nginx-rrd to monitor connections and requests. First, compile and install nginx. pay attention to loading the stub_status module. the stub_status module in Nginx is mainly used to view some Nginx status information. this module is not compiled into Nginx by default. if you want to use this module, you must specify tarxzvf & nbs when compiling and installing Nginx.
You can use monitoring programs such as cacti and nagios to monitor nginx servers, but sometimes it is not that complicated. you can use nginx-rrd to monitor connections and requests.
First, compile and install nginx. pay attention to loading the stub_status module. the stub_status module in Nginx is mainly used to view some Nginx status information.
This module is not compiled into Nginx by default. if you want to use this module, you must specify
- tar xzvf nginx-1.2.0.tar.gz
- cd nginx-1.2.0
- ./configure --prefix=/usr/local/nginx --with-http_stub_status_module
- make && make install
Install the relevant perl and rrdtool rpm packages in yum
- yum install perl rrdtool perl-libwww-perl libwww-perl perl-rrdtool
After confirming that rrdtool and corresponding perl are installed, start to install nginx-rrd
- Tar zxvf nginx-rrd-0.1.4.tgz
- Cd nginx-rrd-0.1.4
- Cp-p usr/sbin/*/usr/sbin // Copy the master program file to/usr/sbin
- Cp-p etc/nginx-rrd.conf/etc // Copy the configuration file to/etc
-
- Create nginx-rrd Directory
- Mkdir/usr/local/nginx/html/rrd
- Cp html/index. php/usr/local/nginx/html
Here, we recommend you change the default access password WCO in the index. php file.