[Xymon] Windows Powershell client v2.15
zak.beck at accenture.com
zak.beck at accenture.com
Thu Apr 28 11:08:45 CEST 2016
Hi
I have today committed v2.15. This has a big, new feature that we've been
working on internally for some time and testing in our environment, that is,
external scripts and external data.
As far as is possible, I have replicated the BBWin functionality for
external data. Data files in the 'externaldatalocation' directory
(installdir\tmp by default) with the correct file format will be uploaded to
Xymon. You can therefore run external scripts, have them produce status data
files in the correct format and that will be uploaded. The format is the
same as BBWin and that described in 'Xymon Message Syntax' on this page:
http://xymon.sourceforge.net/xymon/help/manpages/man1/xymon.1.html. The
sample scripts supplied with BBWin, e.g. fsmon.vbs, should work without
material changes (fsmon for example looks in the registry for a couple of
locations of folders, this may need changing if you have never installed
BBWin).
You can now also specify external scripts in client-local.cfg to be run
either every scan or every "slow" scan, and they can be sent to run
synchronously or asynchronously - therefore a relatively simple external
script scheduler. The scripts can either pre-exist on the target or they can
be downloaded from a central web server or file share (like client updates).
Script versioning is controlled via hashes - this has also been extended to
client updates (optionally).
Obviously the use of external scripts requires some care - for example, if
you specify synchronous execution and your script never completes,
XymonPSClient will be left waiting forever. If you specify asynchronous and
your script never completes, you can end up with multiple processes building
up over time. It's quite difficult to work out what may be happening with
external scripts if you do not have any form of logging in your script, just
as it would be with BBWin - therefore if you're having trouble, I recommend
logging to file at various points in your script and the start and end of
execution.
Note that external scripts will be run as the same user as XymonPSClient,
which would usually be the LOCAL SYSTEM user. You can test whether your
script works as LOCAL SYSTEM interactively using psexec (e.g. psexec -i -s
cmd.exe), from the sysinternals process utilities
(https://technet.microsoft.com/en-gb/sysinternals/psexec).
I have updated the XymonPSClient.doc which has a section on external scripts
and data - please read this carefully first as there are a number of options
associated with these new features. I will try and answer any questions
about scheduling and external data configuration, but I can't commit to
answering questions about or debugging your individual scripts.
Zak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160428/69c578e2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6831 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160428/69c578e2/attachment.bin>
More information about the Xymon
mailing list