Alerting on 'rate' thresholds

Andreas Ericsson ae at op5.se
Thu Oct 28 10:06:37 CEST 2004


Nathan Ward wrote:
> I'd like to use nagios to monitor things like octets transferred on an 
> interface per second, and other things that are typically constantly 
> incrementing counters.
> 
> I am looking at using the nagios performance data framework for putting 
> data in to RRD for graphing, which enables several possible ideas: - 
> Write a wrapper around each of the checks that return this performance 
> data, which knows how to read a value from RRD and compare it against a 
> threshold. Of course, this means that I am checking data that is >= 
> normal_check_interval old, not the data I have just read.
> - Set up another service for each rate threshold I want to monitor, 
> which runs a script to do the above test on an RRD. This means that the 
> data I am checking is <= normal_check_interval. Still, it's not the most 
> up to date data.
> 
> Ideally, I'd like to run a check script right after the performance data 
> command (ie inserting data in to RRD) has been run.
> Any bright ideas?
> What about cricket?
> How are other people monitoring 'rate' thresholds?
> 

Using a temporary datafile (usually just a flat file) to store values 
since last check, and checking filemtime to see time since last check so 
rate_per_second=(currentrate - oldrate)/(now - then)
It's fairly simple once you take a look at it, but you'll have to make 
sure each check gets its own datafile, and that you add logic to work 
around the division by zero that may occur if some idiot try to use the 
same check twice within the same cpu clock second.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list