[Xymon] external script not working

Simioni, Rodney rsimion at transunion.com
Tue Aug 5 15:30:46 CEST 2014


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140805/ed6003ec/attachment.html>


More information about the Xymon mailing list