1. Fork this project
You can get and fork the code on github.com/potsky/MuninPlugins
This project contains several Munin plugins, it is a library. Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work but it misses some default useful plugins.
You need :
- munin and munin-node of course
- PHP in command line
Install these plugins in the master munin server.
Enable `munin-node` on the master server.
Copy wanted plugins in `/usr/share/munin/plugins` or anywhere else.
Link a plugin for a special resource :
$ ln -s /usr/share/munin/plugins/ping_http_ /etc/munin/plugins/ping_http_www.google.com
Then configure this resource :
$ cat >> /etc/munin/plugin-conf.d << EOF [ping_http_www.google.com] user root env.title Google env.url http://www.google.com env.type match env.value google EOF
To run the test, connect on the munin master/node and execute :
$ munin-run ping_http_www.google.com ping.value 32
7. Plugins documentation
Why do I need CURL ?
file_get_contents fails when connecting in https to websites with an invalid certificate. The only way to do this in PHP is to use CURL with options :
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_SSLVERSION, 3);