[hobbit] maint.pl with no email
Asif Iqbal
iqbala-hobbit at qwestip.net
Sat Feb 26 01:32:35 CET 2005
On Fri, Feb 25, 2005 at 11:22:34PM, Henrik Stoerner wrote:
>
> Frankly, this part of maint.pl is just plain broken. What's the point
Well I had to add/modify couple things to make it work as it was with Bigbrother.
First of all I added the notify-admin host bb-hosts file like this
1.2.3.4 notify-admin # noconn maint
Added maint in the --ignorecolums list in bbgen section in hobbitlaunch.cfg file.
Added the following lines in the hobbit-alerts.cfg file
HOST=notify-admin SERVICE=maint
SCRIPT /tmp/scripts/notify my.email at here.com FORMAT=TEXT REPEAT=999d
This is how the /tmp/scripts/notify looks like
#!/bin/sh
#
LINES=`echo "${BBALPHAMSG}" | /usr/local/bin/formail -I "" | /bin/wc -l`
LINES=`expr $LINES - 3`
echo "${BBALPHAMSG}" | /bin/tail -${TOP} | mailx -s "BB [$ACKCODE] $BBHOSTSVC" $RCPT
exit 0
Modified the cgi-secure/maint.pl by rewriting the lines
"pager notify-admin.maint enable....." OR "pager notify-admin.maint disable..."
With
"status notify-admin.maint red enable...." OR "status notify-admin.maint red disable...."
I am positive Henrik has a cooler solution for this.
Thanks
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"It is not the strongest of the species that survives, not the most intelligent, but
the one most responsive to change." - Charles Darwin
More information about the Xymon
mailing list