Intorduction to Munin monitoring tool and extending it with PHP

This is a quick introduction to http://munin-monitoring.org/ monitoring tool. To make it little bit more interesting I decided to step outside of my comfort zone and record a video instead of posting plane text.



Enjoy watching!

Hello_world extension

#!/usr/bin/php

graph_title Hello World!
graph_vlabel important value
graph_total total
rn1.label First random number
rn2.label Second random number
<?php
        exit(0);
}

printf( "rn1.value %sn", rand(0,100) );
printf( "rn2.value %sn", rand(0,100) );

If you need a VirtualHost configuration you can use the one below.



    ServerName 192.168.0.7

    DocumentRoot /var/www/html/munin

    ErrorLog  /var/log/httpd/munin-error.log
    CustomLog /var/log/httpd/munin-access.log combined

        
               Order allow,deny
               Allow from All
               Options None
               AuthUserFile /etc/munin/munin-htpasswd
               AuthName "Munin"
               AuthType Basic
               require valid-user
           
               ExpiresActive On
               ExpiresDefault M310