RRD

check_rrd.pl

Description:

Generic Perl plugin to check age and values of an rrd database. It uses RRDs and Nagios::Plugin (but not rrd_poller 😉

Current Version

Last Release Date

2013-05-30

Compatible With

Owner


Project Files
Project Notes
check_rrd.pl has three modes: --info for having a quick look at the rrd header data; --age to check the time since the last recent update; --ds (data source) to check the values of a specific data source within the rrd file. Use check_rrd.pl --help for full documentation. If you want to use it altogether with cacti, the parameter -R can use standard file matching globbing (*?) so it will pick the proper file without knowing the device id. #You could define check for email limits like this: define command{ command_name check_mqueue command_line /usr/lib/nagios/plugins/check_rrd.pl -R /var/www/cacti/rra/$HOSTNAME$_qmailqueue_* --ds QmailQueue -w$ARG1$ -c$ARG2$ --start -10min --end -5min --compute=MAX }
Reviews (2) Add a Review
Globbing patch
by aseques, May 31, 2013

This is a small pathc to allow fuzzy names (with globbing), it helps when integrating with cacti, so we can make a match like servername_service_*.rrd that is more effective. --- /tmp/check_rrd.pl 2013-05-13 14:05:11.000000000 +0200 +++ check_rrd.pl 2013-05-13 16:35:09.000000000 +0200 @@ -313,8 +313,16 @@ # main # ----------------------------------------------------------------------- +#In case the file is a glob expression (*), expand it and check if matches if ( ! -r $rrdfile ) { - $np->nagios_die("rrdfile $rrdfile not readable or does not exist"); + my @filelist = glob "$rrdfile"; + if ( ! @filelist) { + $np->nagios_die("rrdfile $rrdfile not readable or does not exist"); + } elsif ( scalar(@filelist)!=1 ) { + $np->nagios_die("Glob matches more than one file @filelist "); + } else { + $rrdfile=$filelist[0]; + } } # ----------------------------------------



Promising the best
by vmarzlin, August 31, 2010

First thanks for this add-on. I just have a problem using it... ./check_rrd.pl -R /usr/share/cacti/site/rra/sec-001-prd-mgw_cpu_per_1329.rrd --ds cpu_per -w40 -c50 -v CHECK_RRD CRITICAL - AVERAGE: 4.91611111111111 | cpu_per.AVERAGE.average=4.91611111111111;40;50 The returned value is 4.91611111111111, so this value is



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4 (3)
Favorites
2
Views
131,662