Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
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
Owner
Joan
Download URL
https://exchange.nagios.org/wp-content/uploads/project-files/2009/06/check_rrd.pl
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 }
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]; + } } # ----------------------------------------
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
You must be logged in to submit a review.
To:
From: