<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 13/12/13 2:19 AM, Neil Simmonds
wrote:<br>
</div>
<blockquote
cite="mid:4341dcc8be1047c4ad117ad3f64ca9a7@DBXPR05MB094.eurprd05.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Arial","sans-serif";
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">I’ve
created a powershell script that upon completion creates a
file in C:\Program Files (x86)\BBWin\tmp just as I have many
VBS scripts doing. The file is called Trans and disappears
from the tmp directory as would be expected, however the
Trans column never updates on the relevant page in Xymon.
<o:p></o:p></span></p>
</div>
</blockquote>
Better to just send direct from Powershell to Xymon rather than rely
on BBWin to send a text file. Default charset in PS is Unicode which
needs to be translated to ASCII.<br>
<br>
Here's an implementation of xymon send and reply functionality -
basically a port of C code for 'bb/xymon' to PS using .Net classes
for socket handling and also charset translation. Just add it into
your script and call XymonSend. If you send a client report with it
you will be returned the client-local.cfg section relevant to the
client, or you can use it for stuff like 'query' or other commands
to interrogate Xymon server.<br>
<a class="moz-txt-link-freetext" href="http://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/xymonsend.ps1">http://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/xymonsend.ps1</a><br>
<br>
David.<br>
<blockquote
cite="mid:4341dcc8be1047c4ad117ad3f64ca9a7@DBXPR05MB094.eurprd05.prod.outlook.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">If
I copy the contents of the file and create a new file with
exactly the same name, then paste the contents in, it
disappears as expected and the column updates on Xymon.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Has
anyone any idea why the powershell generated file is not
successfully updating Xymon ?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">I’ve
checked all the logs and there is nothing there.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Neil
Simmonds<o:p></o:p></span></p>
</div>
<span
style="mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:black"></span>
<p class="MsoNormal"><span style="font-size:9.0pt">Name &
Registered Office:
EXPRESS GIFTS LIMITED, 2 GREGORY ST, HYDE, CHESHIRE, ENGLAND,
SK14 4TH, Company
No. 00718151.</span></p>
<p class="MsoNormal"
style="border:none;mso-border-bottom-alt:solid windowtext 1.5pt;
padding:0cm;mso-padding-alt:0cm 0cm 1.0pt 0cm"><span
style="font-size:9.0pt">Express
Gifts Limited is authorised and regulated by the Financial
Conduct Authority</span></p>
<hr>
<p class="MsoNormal"><span style="font-size:9.0pt">NOTE: This
email and any
information contained within or attached in a separate file is
confidential and
intended solely for the Individual to whom it is addressed.
The information or
data included is solely for the purpose indicated or
previously agreed. Any
information or data included with this e-mail remains the
property of Findel
PLC and the recipient will refrain from utilising the
information for any
purpose other than that indicated and upon request will
destroy the information
and remove it from their records. Any views or opinions
presented are solely
those of the author and do not necessarily represent those of
Findel PLC. If
you are not the intended recipient, be advised that you have
received this
email in error and that any use, dissemination, forwarding,
printing, or
copying of this email is strictly prohibited. No warranties or
assurances are
made in relation to the safety and content of this e-mail and
any attachments.
No liability is accepted for any consequences arising from it.
Findel Plc
reserves the right to monitor all e-mail communications
through its internal
and external networks. If you have received this email in
error please notify
our IT helpdesk on +44(0) 1254 303030</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> </span></p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Xymon mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xymon@xymon.com">Xymon@xymon.com</a>
<a class="moz-txt-link-freetext" href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
David Baldwin - Senior Systems Administrator (Datacentres + Networks)
Information and Communication Technology Services
Australian Sports Commission <a class="moz-txt-link-freetext" href="http://ausport.gov.au">http://ausport.gov.au</a>
Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616
<a class="moz-txt-link-abbreviated" href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a> 1 Leverrier Street Bruce ACT 2617
Our Values: RESPECT + INTEGRITY + TEAMWORK + EXCELLENCE
</pre>
<br>
<hr>
Keep up to date with what's happening in Australian sport visit <a href="http://www.ausport.gov.au">www.ausport.gov.au</a>
<br><br>
<font size="-2" face="arial">This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.</font>
<hr>
</body>
</html>