用munin监视nginx

时间:2017-03-26 11:34:15

标签: nginx munin

我已经尝试设置munin来监控nginx ..我在munin得到了图形但是所有数据都表示为N / A(RAM图表除了显示用过的RAM),所以我猜设置有问题在nginx中

但是如图所示,munin也设置为监控PHP并且它可以工作..

穆宁

ln -s /usr/share/munin/plugins/nginx_request /etc/munin/plugins/ -v
ln -s /usr/share/munin/plugins/nginx_status /etc/munin/plugins/ -v
cd /var/bin && wget https://github.com/perusio/nginx-munin/archive/master.zip && unzip master.zip
cd nginx-munin-master/ && cp nginx_connection_request nginx_memory /etc/munin/plugins/ -fv
/etc/init.d/munin-node restart

nginx的

server {
    listen  80;
    server_name  127.0.0.1;

    location ~ ^/(status|ping)$ {
        include  fastcgi_params;
        fastcgi_pass  php;
        fastcgi_param  SCRIPT_FILENAME  $fastcgi_script_name;
        allow  127.0.0.1;
        deny  all;
    }

    location /nginx_status {
        stub_status  on;
        access_log  off;
        allow  127.0.0.1;
        deny  all;
    }
}

enter image description here

更新

# munin-run -d nginx_request
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Setting /rgid/ruid/ to /117/65534/
# Setting /egid/euid/ to /117 117/65534/
# Setting up environment
# About to run '/etc/munin/plugins/nginx_request'
request.value U

0 个答案:

没有答案