measuring bandwidth?

Cam cameron.matheson at gmail.com
Fri Jul 15 16:57:59 CEST 2005


Hi,

I've got some more stuff i'm trying to work out.  We want to measure
the bandwidth that the server is using and have nagios warn us if it
get's too high or too low.  Right now i'm monitoring that over SNMP w/
cacti and it's working good, but that just makes me pretty graphs, and
i need warnings.  anyway, i'm trying to figure out the best way to do
this and i wanted to get other people's input.  The problem that i'm
having is that if i poll the data over SNMP that i just get a
meaningless COUNTER value.  So i guess what i'm wondering is does
nagios have anyway to keep track of these things themselves, or do i
need to write a script sort of like this (psuedo-code):

#this file has the SNMP data polled last time nagios ran my script
OLD = read $foor
NEW = snmpget localhost ifinOctets.bar #something like that
echo $NEW > $foo | awk $4 -print 

x = $(($NEW - $OLD))

if [ $x -lt $SOME_VALUE ]; then
  print_warning_message
elif [ $x -gt $OTHER_VALUE ]; then 
  print_another_warning_message
else
  print_ok_message
fi

is there any problems w/ this approach?  is there a cleaner way to do
it?  what exactly are the rules for plugin output (it seems like it's
just 'FOO [OK|WARNING|FAIL]: comments'--is that right?

Thanks!
Cameron Matheson


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&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