[Xymon] How to verify DIR content with wildcards on a Windows host?

Beck, Zak zak.beck at accenture.com
Tue Apr 17 17:52:04 CEST 2018


Hi

You don't say which Windows client you're using (BBWin or XymonPSClient) but I don't think either of them will understand your backtick syntax (certainly XymonPSClient does not support the use of backticks).

XymonPSClient will understand wildcards and will enter subfolders if you specify a wildcard in a directory position. Unfortunately it will not recurse so you would need an entry for each level of subfolder you may encounter.

So you may need several entries in client-local.cfg:

file:c:\temp\test\*.txt
file:c:\temp\test\*\*.txt
file:c:\temp\test\*\*\*.txt
and so on...

It may be simpler to use an external script - the external script approach can be used in either BBWin or XymonPSClient.

Zak

From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Anaïs RABINOIT
Sent: Tuesday, 17 April 2018 10:28
To: xymon at xymon.com
Subject: [External] [Xymon] How to verify DIR content with wildcards on a Windows host?


Hi everyone,



I have to check if a directory on a windows host contains files with a specific extension.



If it was a Unix/Linux host, i just have to write something like that i guess :

client-local.cfg :

    file:`find /path/mydir/*.tst`

analysis.cfg :

    FILE    %(/path/mydir/*.tst)    noexist



But how to do it for a Windows host? Is this possible ?



I tried this for example :



client-local.cfg :

    file:`cmd /c "dir /b /s C:\path\mydir\*.tst"`

or

    file:`cmd /c "dir /b /s \path\mydir\*.tst"`



analysis.cfg :

    FILE    "%C:\path\mydir\*.tst"    noexist



But it doesn't work :(



Regards,



Anaïs

________________________________

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. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.
______________________________________________________________________________________

www.accenture.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20180417/62c621b6/attachment.html>


More information about the Xymon mailing list