bulk update thru send_nsca

Florian Gleixner flo at bier.homeip.net
Mon Mar 27 12:26:58 CEST 2006


Just concat results of checks together using a CR ("\n") to separate the
lines. We use a shell variable to collect the messages and then shoot it
through send_nsca. Example:

NAGOSSERV=nagiosserver
NAGIOSDIR=/usr/local/nagios
CHOST=`uname -n`
NSCAOUT=""

# check disks
for i in 10 30 40 50 60 ; do
 COUT=`$NAGIOSDIR/libexec/check_disk -w 15% -c 5% -p /dev/md/dsk/d$i`
 CERR=$?
 NSCAOUT=`echo -en "$NSCAOUT\n$CHOST\t/dev/md/dsk/d$i Free
Space\t$CERR\t$COUT\n"`
done

echo "$NSCAOUT" | $NAGIOSDIR/bin/send_nsca -H $NAGOSSERV -c
$NAGIOSDIR/etc/send_nsca.cfg > /dev/null

Flo

Joseph Hardeman wrote:
> Greetings,
> 
> Does anyone know a way to post multiple checks thru a single send_nsca
> post?  Currently every process/device that we check sends an individual
> send_nsca post to our central server.  As we have anywhere between 5 to 250
> devices at over 450 different locations this can be quite consuming at the
> sites. Currently we are primarily doing pings on most of our devices to make
> sure they are live, but want to do much more and to keep the amount of
> nsca's on the central server down, I was wondering if it wouldn't be better
> to have multiple posts sent thru a single connection, verses every post
> establishing a connection.
> 
> Thanks in advance on your thoughts and help.
> 
> Joseph
> 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
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