Thank you, it works great :)
--
Nicolas G. / meepmeep
On Sun, Feb 28, 2010 at 7:08 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:
I see a couple of things that could be wrong. Possibly you should be doing
"DOMAIN=$2" in the loop?? $1 is the ip address, $2 is the fully-qualified
hostname. It seemed to work just fine when I replaced the bbhostgrep line
with
echo "yahoo.com" | while read L
Definitely you should be converting the dots in $DOMAIN to commas. See the
second paragraph under "XYMON MESSAGE SYNTAX" in the bb.1 manpage. This
would do it:
DOM=`echo $DOMAIN | sed -e 's/\./,/g'`
echo $BB $BBDISP "status+12h $DOM.dnsreg $COLOR `date`
You can test your script using bbcmd:
server/bin/bbcmd server/ext/dnsreg
That kicks off the script with the same environment that Xymon gives it.
You probably want to put a 'set -x' in at the top, to see everything
that's going on. I generally put an "echo" in front of the $BB line when
testing, to minimize the amount of bogus reports going to the server.
Ralph Mitchell