PNP4Nagios template for check_diskio_ucd

Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.

PNP4Nagios template for check_diskio_ucd

Postby lik » Sat Sep 28, 2013 2:35 pm

Here is my custom Pnp4nagios template for check_diskio_ucd Nagios plugin to check DiskIO via SNMP (plugin uses UCD-DISKIO MIB 1.3.6.1.4.1.2021.13.15.1 ):

Code: Select all
<?php
#
# PNP template for check_diskio_ucd plugin output
#
# (c) Lik, 2013
#
# perfdata output example : ReadMB=0.02MB/s WriteMB=0.00MB/s ReadIO=1.40IO/s WriteIO=0.00IO/s TotalIO=1.40IO/s
#
$ds_name[1] = "HDD Read/Write MB/s";
$opt[1]  = "--slope-mode --step 300 --base 1024 --vertical-label $UNIT[1] --title \"Disk Read/Write MB per second - $hostname\" ";
$def[1]  = "DEF:ReadMB=$RRDFILE[1]:$DS[1]:AVERAGE ";
$def[1] .= "DEF:WriteMB=$RRDFILE[2]:$DS[2]:AVERAGE ";
$def[1] .= "LINE1:0#7BC648 " ;

$def[1] .= "CDEF:$LABEL[2]_i=$LABEL[2],-1,* ";

$def[1] .= "AREA:$LABEL[1]#7BC648:\"$LABEL[1]\\t\" ";
$def[1] .= "GPRINT:$LABEL[1]:LAST:\"%3.2lf last\\t\\t\" ";
$def[1] .= "GPRINT:$LABEL[1]:AVERAGE:\"%3.2lf avg\\t\\t\" ";
$def[1] .= "GPRINT:$LABEL[1]:MAX:\"%3.2lf max\\n\" ";

$def[1] .= "AREA:$LABEL[2]_i#F09F3F:\"$LABEL[2]\\t\" ";
$def[1] .= "GPRINT:$LABEL[2]:LAST:\"%3.2lf last\\t\\t\" ";
$def[1] .= "GPRINT:$LABEL[2]:AVERAGE:\"%3.2lf avg\\t\\t\" ";
$def[1] .= "GPRINT:$LABEL[2]:MAX:\"%3.2lf max\\n\" ";

$ds_name[2] = "HDD Read/Write IOPS";
$opt[2]  = "--slope-mode --step 300 --vertical-label $UNIT[3] --title \"Disk Input/Output operations per second - $hostname\" ";
$def[2]  = "DEF:ReadIO=$RRDFILE[3]:$DS[3]:AVERAGE ";
$def[2] .= "DEF:WriteIO=$RRDFILE[4]:$DS[4]:AVERAGE ";
$def[2] .= "DEF:TotalIO=$RRDFILE[5]:$DS[5]:AVERAGE ";
$def[2] .= "LINE1:0#7BC648 " ;

$def[2] .= "CDEF:$LABEL[4]_i=$LABEL[4],-1,* ";

$def[2] .= "AREA:$LABEL[3]#7BC648:\"$LABEL[3]\\t\" ";
$def[2] .= "GPRINT:$LABEL[3]:LAST:\"%4.2lf last\\t\\t\" ";
$def[2] .= "GPRINT:$LABEL[3]:AVERAGE:\"%4.2lf avg\\t\\t\" ";
$def[2] .= "GPRINT:$LABEL[3]:MAX:\"%4.2lf max\\n\" ";

$def[2] .= "AREA:$LABEL[4]_i#F09F3F:\"$LABEL[4]\\t\" ";
$def[2] .= "GPRINT:$LABEL[4]:LAST:\"%4.2lf last\\t\\t\" ";
$def[2] .= "GPRINT:$LABEL[4]:AVERAGE:\"%4.2lf avg\\t\\t\" ";
$def[2] .= "GPRINT:$LABEL[4]:MAX:\"%4.2lf max\\n\" ";

$def[2] .= "LINE1:$LABEL[5]#000000:\"$LABEL[5]\\t\" ";
$def[2] .= "GPRINT:$LABEL[5]:LAST:\"%4.2lf last\\t\\t\" ";
$def[2] .= "GPRINT:$LABEL[5]:AVERAGE:\"%4.2lf avg\\t\\t\" ";
$def[2] .= "GPRINT:$LABEL[5]:MAX:\"%4.2lf max\\n\" ";

?>
Attachments
pnp4nagios_diskio_iops.png
pnp4nagios_diskio_iops.png
pnp4nagios_diskio_iops.png (24.46 KiB) Viewed 7356 times
pnp4nagios_diskio_mbs.png
pnp4nagios_diskio_mbs.png
pnp4nagios_diskio_mbs.png (14.9 KiB) Viewed 7356 times
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am

snmptable UCD-DISKIO-MIB::diskIOTable

Postby lik » Wed Jan 08, 2014 2:41 pm

Here is an example of SNMP UCD-DISKIO-MIB::diskIOTable tree output:
Code: Select all
# snmptable -v2c -c public localhost UCD-DISKIO-MIB::diskIOTable
SNMP table: UCD-DISKIO-MIB::diskIOTable

 diskIOIndex diskIODevice diskIONRead diskIONWritten diskIOReads diskIOWrites diskIOLA1 diskIOLA5 diskIOLA15 diskIONReadX diskIONWrittenX
           1         ram0           0              0           0            0         0         0          0            0               0
           2         ram1           0              0           0            0         0         0          0            0               0
           3         ram2           0              0           0            0         0         0          0            0               0
           4         ram3           0              0           0            0         0         0          0            0               0
           5         ram4           0              0           0            0         0         0          0            0               0
           6         ram5           0              0           0            0         0         0          0            0               0
           7         ram6           0              0           0            0         0         0          0            0               0
           8         ram7           0              0           0            0         0         0          0            0               0
           9         ram8           0              0           0            0         0         0          0            0               0
          10         ram9           0              0           0            0         0         0          0            0               0
          11        ram10           0              0           0            0         0         0          0            0               0
          12        ram11           0              0           0            0         0         0          0            0               0
          13        ram12           0              0           0            0         0         0          0            0               0
          14        ram13           0              0           0            0         0         0          0            0               0
          15        ram14           0              0           0            0         0         0          0            0               0
          16        ram15           0              0           0            0         0         0          0            0               0
          17        loop0           0              0           0            0         0         0          0            0               0
          18        loop1           0              0           0            0         0         0          0            0               0
          19        loop2           0              0           0            0         0         0          0            0               0
          20        loop3           0              0           0            0         0         0          0            0               0
          21        loop4           0              0           0            0         0         0          0            0               0
          22        loop5           0              0           0            0         0         0          0            0               0
          23        loop6           0              0           0            0         0         0          0            0               0
          24        loop7           0              0           0            0         0         0          0            0               0
          25          sda   946510848      929052672    37672926    592229269         2         2          2 829875219456   7641676597248
          26         sda1    63502336       20584448        1769          220         0         0          0     63502336        20584448
          27         sda2  1647924224     2242031616     1487211      1023537         0         0          0  23122760704    156860854272
          28         sda3  1477452800      207196160    32112411    138927420         2         2          2 710147077120   2641612099584
          29         sda4        2048              0           2            0         0         0          0         2048               0
          30         sda5   386569216     3602911232     2084609    239777662         0         0          0  39041274880   3306432802816
          31         sda6  4099044352     2182615040     1872891    153997266         0         0          0  55638651904   1230543843328
          32         sda7    49262592     1118658560        2417        11763         0         0          0     49262592      1118658560
          33         sda8    38433792     2561961984        6203     26687926         0         0          0     38433792    298914791424
          34         sda9  1773623296     1877995520      105259       634457         0         0          0   1773623296      6172962816
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am


Return to Monitoring

 


  • Related topics
    Replies
    Views
    Last post
cron