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
           
        

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s