-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Rod,
there is no hobbitd listening on port 1984 on your localhost. Which normally means that the server is not running. If you do a netstat -an|grep LISTEN then you should normally see something like this:
tcp 0 0 0.0.0.0:1984 0.0.0.0:* LISTEN
This means the hobbit server is up and running. Otherwise you have to start it. If you already tried to start it then maybe $BBSERVERLOGS/hobbitd.log and/or $BBSERVERLOGS/hobbitlaunch.log can give you some hint what went wrong.
Cheers Torsten
On 05.08.2014 17:56, Simioni, Rodney wrote:
For now, I just want to test the Hobbit Server, so my bb-hosts has:
127.0.0.1 MonitoringServer #bbd ssh test
This is what I see in the test.log, please advise:
2014-08-05 11:53:25 Could not connect to bbd at 127.0.0.1:1984 - Connection refused 2014-08-05 11:53:25 Whoops ! bb failed to send message - Connection failed
From: Torsten Richter [bb4 at richter-it.net] Sent: Tuesday, August 05, 2014 10:01 AM To: Simioni, Rodney; xymon at xymon.com Subject: Re: [Xymon] external script not working
Hi Rodney,
if I understand you correctly , then you run your script on the Hobbit Server, right? Then you should see a green dot on the line where your server is with the name test. And if you do, then your script is working fine. If not, then please have a look at test.log and check for any unusual messages regarding your script.
BUT(!) if you want your script to display the green dot named test on the lines of server1 and server2 then you have to copy it to the clients and run it from there.
In both cases there is no need of specifying the keyword test in bb-hosts.
If your script is already on the clients server1 and server2 and you made the entries on the clients in hobbitlaunch.cfg then the problem might be that your clients do not have a hobbitd running.
HTH Torsten
On 05.08.2014 15:30, Simioni, Rodney wrote:
My custom script is not reporting anything to the Hobbit Server. I'm running this script on the Hobbit server.
I have placed my script in /usr/lib/hobbit/server/ext/b.pl. The script basically does nothing but report green:
#!/usr/bin/perl -w use strict;
Xymon Variables
#$ENV{BBPROG} = "b.pl"; my($TESTNAME) = "test"; my($BBHOME) = $ENV{BBHOME}; my($BB) = $ENV{BB}; my($BBDISP) = $ENV{BBDISP}; my($BBVAR) = $ENV{BBVAR}; my($MACHINE) = $ENV{MACHINE}; my($DATE) = localtime; my($COLOR) = "green"; my($MSG) = ""; my($HEAD) = ""; my($DATA) = "";
print "$MACHINE\n"; $MACHINE =~ s/\./,/g; my($cmd) = "$BB $BBDISP \"status $MACHINE.$TESTNAME $COLOR $DATE $HEAD\n$DATA\n$MSG\""; system($cmd);
I put the following lines in the /etc/hobbit/hobbitlaunch.cfg [test] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD /usr/lib/hobbit/server/ext/b.pl LOGFILE $BBSERVERLOGS/test.log INTERVAL 5m
I have put 'test' in the bb-hosts file: subpage vips VIPS xxx.xxx.xxx.xxx server1 #test xxx.xxx.xxx.xxx server2 #test
Any help will be greatly appreciated.
Rod
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
+---------------------------------------------------------+ | E-mail : bb4 [at] richter-it.net | | | | Homepage: http://www.richter-it.net/ | +---------------------------------------------------------+ Download my public key from: http://gpg-keyserver.de/pks/lookup?search=0x899093AC&op=get -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32)
iEYEARECAAYFAlPh8pkACgkQ7DlmxomQk6xVTgCeMpUGk5uy4tIyNVBRtcHA4x1d HjMAoOFXNresa0YJTj65bX+tsJgTDKXI =lrI2 -----END PGP SIGNATURE-----