[hobbit] windows ext script to trigger memory red color

Henrik Stoerner henrik at hswn.dk
Mon Feb 4 18:10:18 CET 2008


On Mon, Feb 04, 2008 at 05:46:02PM +0200, Hezki Englander wrote:
> Need to write an ext script on a windows client, to restart a service when
> memory reaches the RED level.
> 
> Is it possible to track the status colors (e.g. MEM or CPU) from an ext
> script on Windows?

The easiest way, I think, is to compile the "bb" command from Hobbit on
a Windows box and then use it to run 
  bb 10.0.0.1 "query myserver.memory"
and see if it says "green" or "red".

It isn't terribly difficult to get the bb utility in Hobbit compiled on
a Windows box with Cygwin, but in case you don't know why there is a
pre-compiled version at http://www.hswn.dk/~henrik/bbutility.zip
Since it was built with Cygwin, it needs the "cygwin1.dll" library; this 
is included in the zip-file. I think it should just be in the default
directory when you run the bb.exe program.


Regards,
Henrik




More information about the Xymon mailing list