Xymon Mailing List Archive search

External Powershell script not working

list Michael Schultheiss
Thu, 7 Aug 2014 09:18:01 -0400
Message-Id: <user-9303a8feac38@xymon.invalid>

Lennon, Padraig wrote:
Hi Michael,

I ran into this issue a few times before (hopefully this fix works for
you..)

You need to ensure that the output file is written in ASCII mode
otherwise the Xymon cannot understand the format (to my limited
knowledge..)

Add "-Encoding ASCII" as shown here with your example

$sAlarm,$datetime | Out-File -Encoding ASCII -FilePath "C:\Program Files
(x86)\BBWin\tmp\exchqueues"
Thank you! Adding -Encoding ASCII made the added check show up on the
Xymon page.  We were baffled why older VBscript externals were working
yet the Powershell external was failing with similar output being
generated. Forcing ASCII output did the trick!

-- 
Michael Schultheiss, RHCSA, RHCE   OIT Administration
Sr. Unix Systems Engineer          Ivy Tech Community College
user-4a65965dd360@xymon.invalid