ngxtop install and use

Monitoring nginx request information, we received a total number of requests, the success of which, what failed

ngxtop installation

1, mounted python-pip

1) yum install epel-release

There are mistakes: No package epel-release available

Solution:

wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 

rpm -ivh epel-release-latest-7.noarch.rpm

Check whether the installation was successful:

yum repolist

 

2) yum install python-pie

There are mistakes: No package python-pie available

Solution:

wget  http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

rpm -ivh epel-release-6-8.noarch.rpm

 

3) Installation ngxtop

pip install ngxtop

ngxtop document: https://github.com/lebinh/ngxtop

 

4, ngxtop use

1, specify the configuration file:

 ngxtop -c /usr/local/nginx/conf/nginx.conf

 

 2, query the status of 200

 ngxtop -c /usr/local/nginx/conf/nginx.conf -i 'status == 200'

 

3, the query most visited ip

ngxtop -c /usr/local/nginx/conf/nginx.conf -g remote_addr

Guess you like

Origin www.cnblogs.com/linlf03/p/11241669.html