Xymon Mailing List Archive search

bbtest-net.c

2 messages in this thread

list Bradley Wallace · Wed, 1 Nov 2006 15:03:25 -0500 ·
Hobbit Server - version 4.1.2p1

When a server that's monitored by Hobbit does not respond to ping (it's 
down), Hobbit generates the following message:

nro6000c:conn red [201160]
red <!-- [flags:ordAstILe] --> Wed Nov  1 13:22:18 2006 conn NOT ok 
Service conn on nro6000c is not OK : Host does not respond to ping
System unreachable for 1 poll periods (0 seconds)
&red 10.102.0.197 is unreachable
See http://Hobbit/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=nro6000c.conn

The "!" in the second line of the message causes problems in Linux when 
handling the error message with ksh shell scripts.

I believe that this message is generated by bbnet/bbtest-net.c, line 1582.
If I take out the exclamation, is there a way I can just recompile 
bbtest-net.c and insert it into Hobbit, without re-making the whole 
installation?
Or am I better off re-making the whole thing?


<P><hr size=1></P><br>
<P><STRONG><br>
This message, and any attachments to it, may contain information<br>
that is privileged, confidential, and exempt from disclosure under<br>
applicable law.  If the reader of this message is not the intended<br>
recipient, you are notified that any use, dissemination,<br>
distribution, copying, or communication of this message is strictly<br>
prohibited.  If you have received this message in error, please<br>
notify the sender immediately by return e-mail and delete the<br>
message and any attachments.  Thank you.<br>
</STRONG></P>
list Henrik Størner · Wed, 1 Nov 2006 22:42:45 +0100 ·
quoted from Bradley Wallace
On Wed, Nov 01, 2006 at 03:03:25PM -0500, Bradley Wallace wrote:
Hobbit Server - version 4.1.2p1

When a server that's monitored by Hobbit does not respond to ping (it's 
down), Hobbit generates the following message:

nro6000c:conn red [201160]
red <!-- [flags:ordAstILe] --> Wed Nov  1 13:22:18 2006 conn NOT ok 
Service conn on nro6000c is not OK : Host does not respond to ping
System unreachable for 1 poll periods (0 seconds)
&red 10.102.0.197 is unreachable
See http://Hobbit/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=nro6000c.conn

The "!" in the second line of the message causes problems in Linux when 
handling the error message with ksh shell scripts.
No it doesnt. If you have problems, then you've forgotten to put your
environment variable references inside quotes in the shell script.

E.g. I saved your error message in the file "x", and then:

henrik at osiris:~$ ksh
$ MYMSG=`cat x`
$ echo $MYMSG
quoted from Bradley Wallace
nro6000c:conn red [201160] red <!-- [flags:ordAstILe] --> Wed Nov 1
13:22:18 2006 conn NOT ok Service conn on nro6000c is not OK : Host does
not respond to ping System unreachable for 1 poll periods (0 seconds)
&red 10.102.0.197 is unreachable See
http://Hobbit/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=nro6000c.conn

$ if test $MYMSG = "bla"; then echo bla; fi
ksh: test: red: unknown operator
$ if test "$MYMSG" = "bla"; then echo bla; fi

Note how the error goes away once you put $MYMSG inside quotes.


Regards,
Henrik