Created
October 2, 2012 12:19
-
-
Save mathieue/3818590 to your computer and use it in GitHub Desktop.
Install nginx with munin plugins on debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install munin-plugins-extra libio-all-lwp-perl | |
echo "[nginx_*] | |
env.url http://localhost/nginx_status | |
" > /etc/munin/plugin-conf.d/nginx | |
vi /etc/nginx/sites-available/default | |
# in server section | |
location /nginx_status { | |
stub_status on; | |
access_log off; | |
allow 127.0.0.1; | |
allow 92.243.4.75; | |
deny all; | |
} | |
/etc/init.d/nginx restart | |
# curl http://127.0.0.1/nginx_status | |
Active connections: 1 | |
server accepts handled requests | |
1 1 1 | |
Reading: 0 Writing: 1 Waiting: 0 | |
ln -s /usr/share/munin/plugins/nginx_* /etc/munin/plugins/ | |
/etc/init.d/munin-node restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment