[Xymon] how to ext script with bbwin ?

Bakkies Gatvol bakgat8 at hotmail.com
Mon Jul 28 15:06:30 CEST 2014


>From my experimentation it seems 

the filename is the column
the first word in the file is the color 
and the rest of the file is "message" and is just shown on the display. 

It does not seem to me that the date is read/interpreted in any way .. so it does not matter what format it is. It is just dumped to the display. 


I was hoping to be able to set the time-to-live, but I can (and will) live without it.


Thanks 

From: jurgenm at parish-it.com.au
To: bakgat8 at hotmail.com
CC: jlaidman at rebel-it.com.au; xymon at xymon.com
Subject: Re: [Xymon] how to ext script with bbwin ?
Date: Fri, 25 Jul 2014 20:51:57 +0000






Hello



The date format is 26/07/2014 6:40:29 AM, which is easily achieved in VBScript using the command "Now()” (as in “strColor Now()”). 




The entire process is quite simple when you think of Xymon as only displaying the text output of your command or script - your command or script needs to do the interpreting and then output the final result to a flat file.  



For example, I call a VBS script that performs a minor audit of PCs, named xAudit.vbs.
This is included in the externals section of the cfg file, using: <load value="cscript //B //nologo xAudit.vbs" timer="120s"  />



The script writes the output to a text file in the tmp directory called xAudit (no extension required).
The first line of this file is simply the word “green”, which is enough for Xymon to display the contents of that file in the column named xAudit. 
Of course, the colour conditions can be determined by your program or script before the results are written to your text file, perhaps using “if then” statements or other functions. 



Thanks
Jürgen






In this script, an output is 




On 25 Jul 2014, at 23:44, Bakkies Gatvol <bakgat8 at hotmail.com> wrote:



What format is the date? Do I have to put quotes around something?



I can get the column name and the color, but that is all I think that is working.



At the moment -  it drops the word red - it's first on the line as suggested, but the rest just shows up in the display.  This makes me think it is not interpreting any of it, purely dumping it on the screen.



on display

25-07-2014 14:01:31 ( 60 ) 



in file called evt (column name = evt ) 

red 25-07-2014 14:01:31 ( 60 ) 



I will happily read code if I could get my hands on it. I am too unix to know how to open/read a msi file. But c++ source I could probably read.



Thanks





From: jlaidman at rebel-it.com.au

Date: Fri, 25 Jul 2014 10:23:22 +1000

Subject: Re: [Xymon] how to ext script with bbwin ?

To: bakgat8 at hotmail.com

CC: xymon at xymon.com



>From reading the source code of some of the externals, I think it works as follows.



The filename is the column name.  So if you want a column/page called "foobar" you would create a file called foobar.txt.



The first line needs to be in a specific format:



<color> <date> <time> [( <delay> )]



The optional delay in parens tells Xymon how long the report is to be considered valid, before it goes purple (default is 30 minutes).



The line terminator is CRLF.



Subsequent lines contain the message to appear on the status page for the column.



J












On 23 July 2014 22:14, Bakkies Gatvol <bakgat8 at hotmail.com> wrote:



I don't usually do windows. 



I have installed bbwin from here http://jmac-software.blogspot.com/2012/03/xymon-windows-client-set-up-guide.html



I found below post via google ... but there is still large gaps in my understanding. 



What format do you write a report in the bbwin tmp directory? Can I specify a column name ?



Hi Ryan,

I didn't understand why you use bbwincmd. You could use the externals agent to run your program every 5 minutes and your agent would just has to write a report in the bbwin tmp directory. Then, BBWin would take care to read the file and send the status to
 the hobbit server.

That would be much easier for you.

Don't you think ?

Etienne.




Can somebody give me more info or point me to any docs online? 



Thanks



Bakkies 







_______________________________________________

Xymon mailing list

Xymon at xymon.com

http://lists.xymon.com/mailman/listinfo/xymon










_______________________________________________

Xymon mailing list

Xymon at xymon.com

http://lists.xymon.com/mailman/listinfo/xymon





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


More information about the Xymon mailing list