[hobbit] Comma-separated lists of hostnames, etc. in hobbit-alerts.cfg is not documented

SebA spa at syntec.co.uk
Mon Nov 3 22:45:20 CET 2008


Thanks very much for this!  It will certainly save me some time.  One issue
I've noticed is that the EXHOST's remain space separated and not comma
separated.  No big deal as I can fix that from the output, or the following
minor patch appears to fix it:
 
--- convert_bbwarnrules_to_hobbit-alerts.sh     2008-11-03
20:59:28.000000000 +0000
+++ convert_bbwarnrules_to_hobbit-alerts_v1.1.sh        2008-11-03
22:31:34.000000000 +0000
@@ -76,7 +76,7 @@
 elif [[ $i != \#* && $i != \*DC* && $i != notify* && $i != \* && $i !=
unmatched* && $i != \!* ]]
 then
 HOST=`echo $i | tr '+' ' ' | awk -F\; '{print $1}'`
-EXHOST=`echo $i | tr '+' ' ' | awk -F\; '{print $2}'`
+EXHOST=`echo $i | tr '+' ',' | awk -F\; '{print $2}'`
 SERVICE=`echo $i | tr '+' ',' | awk -F\; '{print $3}' | sed -e
s/fping/conn/g`
 EXSERVICE=`echo $i | tr '+' ',' | awk -F\; '{print $4}'`
 MAIL=`echo $i | tr '+' ' ' | awk -F\; '{print $7}'`

Does that seem right?  The code's a bit hard to follow for me without
indentation and stuff.  It looks like all spaces are changed to + at the
beginning.

Blank lines get replaced with:
 SERVICE= TIME=: RECOVERED
But again, that's no big deal. I can easily strip those lines out.
 
SebA 


________________________________

	From: jm54601 at yahoo.com [mailto:jm54601 at yahoo.com] 
	Sent: 15 October 2008 17:04
	To: hobbit at hswn.dk
	Subject: Re: [hobbit] Comma-separated lists of hostnames, etc. in
hobbit-alerts.cfg is not documented
	
	
	Here's a script I used to convert bbwarnrules.cfg to
hobbit-alerts.cfg.  It's far from perfect, but might help you save some
labor.  We also used host groups and page groups fairly extensively in
bbwarnsetup.cfg.  This script merges both.
	 
	<snip: refer to
http://www.hobbitmon.com/hobbiton/2008/10/msg00257.html>




More information about the Xymon mailing list