[Xymon] xymon-powershell.ps1

David Boyer davieb at gmail.com
Thu Jun 29 05:23:42 CEST 2017


Hi,

Like Zak said, just write your HTML page to a file then place it in the
c:\..\..\tmp and it should be picked up within 5mins. The filename will
reflect the test name on the xymon web page. I have a couple of sched tasks
that work this way.

Dave

On Wed, Jun 28, 2017 at 5:06 AM, Beck, Zak <zak.beck at accenture.com> wrote:

> Hi
>
>
>
> I’m not familiar with xymon-powershell.ps1, but I don’t see why not, the
> server certainly supports it (we do it all the time in the Powershell
> client).
>
>
>
> Bear in mind for powershell, the escape character for those double-quotes
> is backtick (`), as in:
>
>
>
> "<table width=`"100%`">"
>
>
>
> You may want to switch to the Windows Powershell client, it allows you to
> schedule and run external scripts or pick up data from external text files,
> so whatever is calling xymon-powershell.ps1 could just write a text file in
> the correct format to c:\program files\xymon\tmp and it would get sent…
>
>
>
> https://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/
>
>
>
> Cheers
>
>
>
> Zak
>
>
>
> *From:* Xymon [mailto:xymon-bounces at xymon.com] *On Behalf Of *Steve Brown
> *Sent:* 27 June 2017 17:16
> *To:* 'xymon at xymon.com' <xymon at xymon.com>
> *Subject:* [External] [Xymon] xymon-powershell.ps1
>
>
>
> Hi
>
> Is there a way to send an html table through the xymon-powershell.ps1
> script?
>
>
>
> I currently use bb-central where I have a Linux script that runs on the
> xymon server. I’m able to send the html table with the following
>
>
>
>
>
> OBJFILE="<iframe name=\"locktbl\" src=\"/hobbit/dba/${RHOST}/${MNAME}-lock.html\"
> frameborder=\"no\" height=\"600\" width=\"1200\"></iframe>"
>
> LINE="status $MACHINE.$TEST $COLOR
>
>         ${OBJFILE} "
>
> $BB $BBDISP "$LINE"               #SEND IT TO BBDISPLAY
>
>
>
> The status line is very similar to the xymon-powershell.ps1 input
>
>
>
> powershell -file xymon-powershell.ps1 %XYMSRV% "status
> %COMPUTERNAME%.mytest green %DATE% %TIME%" "The status of 'mytest' is
> 'satisfactory' at %DATE% %TIME%" "" "here's the last line"
>
>
>
> I basically want to replace the "The status of 'mytest' is 'satisfactory'
> at %DATE% %TIME%" with an html table.
>
>
>
> Thank you for your help
>
> Steve
>
> ------------------------------
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise confidential information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the e-mail by you is prohibited. Where allowed
> by local law, electronic communications with Accenture and its affiliates,
> including e-mail and instant messaging (including content), may be scanned
> by our systems for the purposes of information security and assessment of
> internal compliance with Accenture policy.
> ____________________________________________________________
> __________________________
>
> www.accenture.com
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20170628/fa31cc35/attachment.html>


More information about the Xymon mailing list