<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'>I took your sample line and hand made a file in tmp accordingly. And wonderfully 2hours later and no purple yet. Excellent. <br><br>Thanks much.<br><br><div><hr id="stopSpelling">From: dddugan@iastate.edu<br>To: bakgat8@hotmail.com; xymon@xymon.com<br>Subject: RE: [Xymon] how to ext script with bbwin ?<br>Date: Mon, 28 Jul 2014 13:14:00 +0000<br><br>



<style><!--
.ExternalClass .ecxshape {
}
--></style><style><!--
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {
color:blue;
text-decoration:underline;
}

.ExternalClass span.ecxMsoHyperlinkFollowed {
color:purple;
text-decoration:underline;
}

.ExternalClass p {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass span.ecxapple-converted-space {
}

.ExternalClass span.ecxhoenzb {
}

.ExternalClass span.ecxEmailStyle20 {
font-family:"Calibri","sans-serif";
color:#1F497D;
}

.ExternalClass .ecxMsoChpDefault {
font-size:10.0pt;
}

.ExternalClass div.ecxWordSection1 {
}

--></style>


<div class="ecxWordSection1">
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">Here’s an example from a PowerShell external I run from BBwin. The status is green with a lifetime of thirteen hours. The rest of the info is displayed on the
 page. (Note this test runs every six hours, hence 13 hours for a purple. Twice the interval plus a small margin is generally what you want for a lifetime, depending on requirements.)</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;">green+13h 2014-07-25 16:51:39 scriptname.ps1 vX.Y</span></p>
<p class="ecxMsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;"> </span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in;">
<p class="ecxMsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";"> Xymon [mailto:xymon-bounces@xymon.com]
<b>On Behalf Of </b>Bakkies Gatvol<br>
<b>Sent:</b> Monday, July 28, 2014 8:07 AM<br>
<b>To:</b> Xymon Mailing List<br>
<b>Subject:</b> Re: [Xymon] how to ext script with bbwin ?</span></p>
</div>
</div>
<p class="ecxMsoNormal"> </p>
<div>
<p class="ecxMsoNormal" style=""><span style="font-family:"Calibri","sans-serif";">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 </span></p>
<div>
<div class="ecxMsoNormal" style="text-align:center;" align="center"><span style="font-family:"Calibri","sans-serif";">
<hr id="ecxstopSpelling" align="center" size="2" width="100%">
</span></div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">From: <a href="mailto:jurgenm@parish-it.com.au">
jurgenm@parish-it.com.au</a><br>
To: <a href="mailto:bakgat8@hotmail.com">bakgat8@hotmail.com</a><br>
CC: <a href="mailto:jlaidman@rebel-it.com.au">jlaidman@rebel-it.com.au</a>; <a href="mailto:xymon@xymon.com">
xymon@xymon.com</a><br>
Subject: Re: [Xymon] how to ext script with bbwin ?<br>
Date: Fri, 25 Jul 2014 20:51:57 +0000<br>
<br>
Hello </span></p>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">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()”). </span></p>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">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.  </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">For example, I call a VBS script that performs a minor audit of PCs, named xAudit.vbs.</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">This is included in the externals section of the cfg file, using: <load value="cscript //B //nologo xAudit.vbs" timer="120s"  /></span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">The script writes the output to a text file in the tmp directory called xAudit (no extension required).</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">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. </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">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. </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">Thanks</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">Jürgen</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal" style=""><span style="font-family:"Calibri","sans-serif";">In this script, an output is </span></p>
<div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">On 25 Jul 2014, at 23:44, Bakkies Gatvol <<a href="mailto:bakgat8@hotmail.com">bakgat8@hotmail.com</a>> wrote:</span></p>
</div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
<blockquote style="">
<div>
<div>
<p class="ecxMsoNormal" style=""><span style="font-family:"Calibri","sans-serif";">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</span></p>
<div>
<div class="ecxMsoNormal" style="text-align:center;" align="center"><span style="font-family:"Calibri","sans-serif";">
<hr id="ecxstopSpelling" align="center" size="2" width="100%">
</span></div>
<p class="ecxMsoNormal" style=""><span style="font-family:"Calibri","sans-serif";">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></span></p>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">From reading the source code of some of the externals, I think it works as follows.
</span></p>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">The filename is the column name.  So if you want a column/page called "foobar" you would create a file called foobar.txt.
</span></p>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">The first line needs to be in a specific format:</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"><color> <date> <time> [( <delay> )]</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">The optional delay in parens tells Xymon how long the report is to be considered valid, before it goes purple (default is 30 minutes).</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">The line terminator is CRLF.</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">Subsequent lines contain the message to appear on the status page for the column.</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">J</span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
</div>
</div>
<div>
<p class="ecxMsoNormal" style=""><span style="font-family:"Calibri","sans-serif";"> </span></p>
<div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">On 23 July 2014 22:14, Bakkies Gatvol<span class="ecxapple-converted-space"> </span><<a href="mailto:bakgat8@hotmail.com" target="_blank">bakgat8@hotmail.com</a>><span class="ecxapple-converted-space"> </span>wrote:</span></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;">
<div>
<div>
<p class="ecxMsoNormal" style=""><span style="font-family:"Calibri","sans-serif";">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 ?</span></p>
<div>
<p class="ecxMsoNormal"><i><span style="font-family:"Calibri","sans-serif";">Hi Ryan,</span></i><span style="font-family:"Calibri","sans-serif";"><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></span></p>
</div>
<p class="ecxMsoNormal" style=""><span style="font-family:"Calibri","sans-serif";"><br>
Can somebody give me more info or point me to any docs online?<span class="ecxapple-converted-space"> </span><br>
<br>
Thanks<span style="color:#888888;"><br>
<br>
<span class="ecxhoenzb">Bakkies</span><span class="ecxapple-converted-space"> </span></span></span></p>
</div>
</div>
<p class="ecxMsoNormal" style=""><span style="font-family:"Calibri","sans-serif";"><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></span></p>
</blockquote>
</div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
</div>
</div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";">_______________________________________________<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></span></p>
</div>
</blockquote>
</div>
<p class="ecxMsoNormal"><span style="font-family:"Calibri","sans-serif";"> </span></p>
</div>
</div>
</div>
</div>
</div></div>                                          </div></body>
</html>