On 13/12/13 2:19 AM, Neil Simmonds wrote:
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.
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.
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. http://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/xymonsend....
David.
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.
Has anyone any idea why the powershell generated file is not successfully updating Xymon ?
I’ve checked all the logs and there is nothing there.
Regards,
Neil Simmonds
Name & Registered Office: EXPRESS GIFTS LIMITED, 2 GREGORY ST, HYDE, CHESHIRE, ENGLAND, SK14 4TH, Company No. 00718151.
Express Gifts Limited is authorised and regulated by the Financial Conduct Authority
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
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
-- David Baldwin - Senior Systems Administrator (Datacentres + Networks) Information and Communication Technology Services Australian Sports Commission http://ausport.gov.au Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616 david.baldwin at ausport.gov.au 1 Leverrier Street Bruce ACT 2617 Our Values: RESPECT + INTEGRITY + TEAMWORK + EXCELLENCE
Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au