[Xymon] [External] Re: Powershell external scripts
Beck, Zak
zak.beck at accenture.com
Tue Jul 4 10:01:37 CEST 2017
Hi
The example given does not enable the download from server option – it expects the batch file to be present in the <externalscriptlocation> as you mentioned before.
To enable server downloads, it needs to be something like this (untested):
external:everyscan:sync:http://server1/XymonPS/script.bat|MD5|536476abc234c3c1|script.bat
The client uses the hash (which can be SHA1, SHA256 or MD5) to work out whether or not the script needs redownloading.
This (and other examples) are in the doc, towards the end, under ‘external’.
On the server, you need a directory that will be served up by the webserver. On our setup, we added a directory and configured Apache appropriately.
Thanks
Zak
From: David Boyer [mailto:davieb at gmail.com]
Sent: 03 July 2017 17:24
To: Beck, Zak <zak.beck at accenture.com>
Cc: Steve Brown <sgb at pics.com>; xymon at xymon.com
Subject: [External] Re: [Xymon] Powershell external scripts
Zak,
Given this entry:
[hostname]
external:everyscan:sync:batchfile.bat
Where would the batchfile.bat located on the Xymon Server? Would it be in the HOME directory of ~xymon/server/etc?
Dave
On Mon, Jul 3, 2017 at 11:33 AM, Beck, Zak <zak.beck at accenture.com<mailto:zak.beck at accenture.com>> wrote:
Hi
If you’re using XymonPSClient, you need to tell the client to execute it. You do this via configuration on the server in client-local.cfg, something like this:
[hostname]
external:everyscan:sync:batchfile.bat
I think that should work! If you want to get more advanced, you can also have the client download the batch file from a web server and this enables you to update the batch file remotely (see the doc file).
Zak
From: Xymon [mailto:xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>] On Behalf Of Steve Brown
Sent: 03 July 2017 15:54
To: David Boyer <davieb at gmail.com<mailto:davieb at gmail.com>>
Cc: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: [External] Re: [Xymon] Powershell external scripts
Thank you for the reply. I have a bat file in the "<externalscriptlocation>" folder but it is not being executed. If I schedule it through the Windows Task scheduler it does get executed. Is there something else I need to do in the xymon powershell to have it execute the bat file? It appears I’m missing something.
Thank you for your help
Steve
From: David Boyer [mailto:davieb at gmail.com]
Sent: Sunday, July 02, 2017 2:59 PM
To: Steve Brown <sgb at pics.com<mailto:sgb at pics.com>>
Cc: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: Re: [Xymon] Powershell external scripts
The "<externalscriptlocation>" is the folder where the scripts are located. They can be written in anything you like.
Dave
On Thu, Jun 29, 2017 at 11:13 PM, Steve Brown <sgb at pics.com<mailto:sgb at pics.com>> wrote:
Hi,
What format to external scripts <externalscriptlocation> need to be? Can they be windows bat files or do they need to be powershell .ps1 scripts or something else?
Thanks
Steve
_______________________________________________
Xymon mailing list
Xymon at xymon.com<mailto:Xymon at xymon.com>
http://lists.xymon.com/mailman/listinfo/xymon<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.xymon.com_mailman_listinfo_xymon&d=DwMGaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=S-aLwpx-PHBTBMIG_c2JczRC0SfuZCmsiH9Iams25FI&m=LpEH5mi4BBdGxqvJGmLapbOSpq299arjLUfbVo98MsE&s=Zitmt7g1XCELmzuj1X33oPX_CipHyQRPoEkHECmMzvA&e=>
________________________________
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<http://www.accenture.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20170704/1a5490f7/attachment.html>
More information about the Xymon
mailing list