stat4u MDM-IT - News - rrd-mdgraph
 

MDM-IT

IT Systems and Software Development

  • Increase font size
  • Default font size
  • Decrease font size
Print

rrd-mdgraph


rrd-mdgraph draw group of graphs (by default) of all services for host and display it on HTML page.


Download rrd-mdgraph

Screens:



Installation can be done manually by copying and modifying files.

Install Pre-Requisites
----------------------

Install rrdtool binary from http://oss.oetiker.ch/rrdtool/

Installation
------------------------------

These instructions assume an overlay layout, with nagios at /usr/local/nagios

- Extract rrd-mdgraph into a destination location:
cd
mkdir rrd-mdgraph
tar xvf rrd-mdgraph-x.y.z.tar

- Edit config.php.  Set the following:
$rrdtool           = '/usr/bin/rrdtool';                           #full path to rrdtool binary
$pngdir            = 'tmp/rrdpng';                                       #path to tmp directory
$rrddircacti       = '/var/www/html/cacti/rra';                    #Path to cacti rrd files
$rrddir            = '/var/www/html/adm-tvkdiana/nagiosgraph/rrd'; #Path to rrd files

- Set permissions of "rrd-mdgraph" directory the *apache* user can write and read it:
mkdir /rrd-mdgraph
chown apache /rrd-mdgraph
chmod 755 /rrd-mdgraph

- In the Nagios configuration file (hosts.cfg) add this:
action_url  rrd-mdgraph/rrd-mdgraph.php?config=$HOSTNAME$

- Restart nagios

/etc/init.d/nagios restart

- Verify that rrd-mdgraph is working by running (for example):

http:///nagios/rrd-mdgraph/rrd-mdgraph.php?config=

Where is name of host displayed in http:///nagios/cgi-bin/status.cgi?hostgroup=all&style=hostdetail


Optionally you can run ./rrd-mdgraph-import-host.php (for example ./rrd-mdgraph-import-host.php cisco7604) and generate config file "cisco7604".

For automatic generate config files, name of rrd files have to have format:
_.rrd (example: cisco7604_GigabitEthernet3%2F21_bandwith.rrd). Format is compatible with nagiosgraph (http://nagiosgraph.sourceforge.net/).

Format of lines:

/var/www/html/adm-tvkdiana/nagiosgraph/rrd&cisco7604&service=GigabitEthernet3%2F21_bandwith&ds=InBandwith,OutBandwith&type=AREA&geom=-w 300 -h 100&title=GigabitEthernet3/21_bandwith&STACK
/var/www/html/adm-tvkdiana/nagiosgraph/rrd&cisco7604&service=GigabitEthernet3%2F21_traffic&ds=InPkts,OutPkts&type=AREA&geom=-w 300 -h 100&title=GigabitEthernet3/21_traffic&STACK
/var/www/html/adm-tvkdiana/nagiosgraph/rrd&cisco7604&service=PING_ping&ds=rta&type=AREA&geom=-w 300 -h 100&title=PING_ping&STACK

Description:
&&service=&ds=&type=&geom=&title=&STACK


Optionally you can run ./rrd-mdgraph-import-host-from-cacti.php (for example ./rrd-mdgraph-import-host-from-cacti.php cisco7604) and generate config file "cisco7604".

Config file for host can be write manually

 

Last Updated on Wednesday, 04 April 2012 07:40  

Online

We have 19 guests online

Stat

Content View Hits : 56201