Use nginx-rrd in CentOS to monitor the number of nginx shards

Source: Internet
Author: User
Tags rrd rrdtool
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

 
 
  1. tar xzvf nginx-1.2.0.tar.gz  
  2. cd  nginx-1.2.0  
  3. ./configure --prefix=/usr/local/nginx --with-http_stub_status_module  
  4. make && make install 

Install the relevant perl and rrdtool rpm packages in yum

 
 
  1. 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
 
 
  1. Tar zxvf nginx-rrd-0.1.4.tgz
  2. Cd nginx-rrd-0.1.4
  3. Cp-p usr/sbin/*/usr/sbin // Copy the master program file to/usr/sbin
  4. Cp-p etc/nginx-rrd.conf/etc // Copy the configuration file to/etc
  5.  
  6. Create nginx-rrd Directory
  7. Mkdir/usr/local/nginx/html/rrd
  8. Cp html/index. php/usr/local/nginx/html
Here, we recommend you change the default access password WCO in the index. php file.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.