<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>From my experimentation it seems <br><br>the filename is the column<br>the first word in the file is the color <br>and the rest of the file is "message" and is <i>just</i> shown on the display. <br><br>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. <br><br><br>I was hoping to be able to set the time-to-live, but I can (and will) live without it.<br><br><br>Thanks <br><br><div><hr id="stopSpelling">From: jurgenm@parish-it.com.au<br>To: bakgat8@hotmail.com<br>CC: jlaidman@rebel-it.com.au; xymon@xymon.com<br>Subject: Re: [Xymon] how to ext script with bbwin ?<br>Date: Fri, 25 Jul 2014 20:51:57 +0000<br><br>




Hello
<div><br>
</div>
<div>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()”). <br>
<div><br>
</div>
<div>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.  </div>
<div><br>
</div>
<div>For example, I call a VBS script that performs a minor audit of PCs, named xAudit.vbs.</div>
<div>This is included in the externals section of the cfg file, using: <load value="cscript //B //nologo xAudit.vbs" timer="120s"  /></div>
<div><br>
</div>
<div>The script writes the output to a text file in the tmp directory called xAudit (no extension required).</div>
<div>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. </div>
<div>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. </div>
<div><br>
</div>
<div>Thanks</div>
<div>Jürgen</div>
<div><br>
</div>
<div><br>
</div>
<div>In this script, an output is <br>
<br>
<div>
<div>On 25 Jul 2014, at 23:44, Bakkies Gatvol <<a href="mailto:bakgat8@hotmail.com">bakgat8@hotmail.com</a>> wrote:</div>
<br class="ecxApple-interchange-newline">
<blockquote>
<div class="ecxhmmessage" style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;">
<div dir="ltr">What format is the date? Do I have to put quotes around something?<br>
<br>
I can get the column name and the color, but that is all I think that is working.<br>
<br>
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.<br>
<br>
on display<br>
25-07-2014 14:01:31 ( 60 )<span class="ecxApple-converted-space"> </span><br>
<br>
in file called evt (column name = evt )<span class="ecxApple-converted-space"> </span><br>
red 25-07-2014 14:01:31 ( 60 )<span class="ecxApple-converted-space"> </span><br>
<br>
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.<br>
<br>
Thanks<br>
<br>
<div>
<hr id="ecxstopSpelling">
From: <a href="mailto:jlaidman@rebel-it.com.au">jlaidman@rebel-it.com.au</a><br>
Date: Fri, 25 Jul 2014 10:23:22 +1000<br>
Subject: Re: [Xymon] how to ext script with bbwin ?<br>
To: <a href="mailto:bakgat8@hotmail.com">bakgat8@hotmail.com</a><br>
CC: <a href="mailto:xymon@xymon.com">xymon@xymon.com</a><br>
<br>
<div dir="ltr">From reading the source code of some of the externals, I think it works as follows.
<div><br>
</div>
<div>The filename is the column name.  So if you want a column/page called "foobar" you would create a file called foobar.txt.
<div><br>
</div>
<div>The first line needs to be in a specific format:</div>
<div><br>
</div>
<div><color> <date> <time> [( <delay> )]</div>
<div><br>
</div>
<div>The optional delay in parens tells Xymon how long the report is to be considered valid, before it goes purple (default is 30 minutes).</div>
<div><br>
</div>
<div>The line terminator is CRLF.</div>
<div><br>
</div>
<div>Subsequent lines contain the message to appear on the status page for the column.</div>
<div><br>
</div>
<div>J</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
<div class="ecxgmail_extra"><br>
<br>
<div class="ecxgmail_quote">On 23 July 2014 22:14, Bakkies Gatvol<span class="ecxApple-converted-space"> </span><span dir="ltr"><<a href="mailto:bakgat8@hotmail.com" target="_blank">bakgat8@hotmail.com</a>></span><span class="ecxApple-converted-space"> </span>wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex;">
<div>
<div dir="ltr">I don't usually do windows.<span class="ecxApple-converted-space"> </span><br>
<br>
I have installed bbwin from here<span class="ecxApple-converted-space"> </span><a href="http://jmac-software.blogspot.com/2012/03/xymon-windows-client-set-up-guide.html" target="_blank">http://jmac-software.blogspot.com/2012/03/xymon-windows-client-set-up-guide.html</a><br>
<br>
I found below post via google ... but there is still large gaps in my understanding.<span class="ecxApple-converted-space"> </span><br>
<br>
What format do you<span class="ecxApple-converted-space"> </span><i>write a report in the bbwin tmp directory</i>? Can I specify a column name ?<br>
<br>
<div><i>Hi Ryan,</i><br>
<i>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.</i><br>
<i>That would be much easier for you.</i><br>
<i>Don't you think ?</i><br>
<i>Etienne.</i><br>
</div>
<br>
Can somebody give me more info or point me to any docs online?<span class="ecxApple-converted-space"> </span><br>
<br>
Thanks<span class="ecxHOEnZb"><font color="#888888"><br>
<br>
Bakkies<span class="ecxApple-converted-space"> </span><br>
<br>
</font></span></div>
</div>
<br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
http://lists.xymon.com/mailman/listinfo/xymon</div>
</blockquote>
</div>
<br>
</div>
</div></div>                                          </div></body>
</html>