<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} @font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.MsoHyperlink
        {color:#0563C1;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:#954F72;
        text-decoration:underline}
p.msonormal0, li.msonormal0, div.msonormal0
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
span.EmailStyle19
        {font-family:"Calibri",sans-serif;
        color:#032DFD;
        font-weight:normal;
        font-style:normal}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>Thanks for your time,<br>
</p>
<p><br>
</p>
<p>I use BBWin as Windows client, but here the host is in central mode, so the configuration come from the Xymon server itself. I try to keep it that way, without adding an external script on each windows hosts or modify the BBWin config on each, since it hasn't
 only one host concerned ...<br>
</p>
<p><br>
</p>
<p>I tried the wildcard version first, it didn't work, then i saw this on the manpage client-local.cfg:</p>
<p><br>
</p>
<h2>FILE CONFIGURATION ENTRIES</h2>
A file monitoring entry is used to watch the meta-data of a file: Owner, group, size, permissions, checksum etc. It looks like this:
<p><br>
    file:/var/log/messages[:HASH] </p>
<p>The <strong>file:FILENAME</strong> line defines the filename of the file to monitor. As with the "log:" entries, a filename enclosed in backticks means a command which will generate the filenames dynamically. The optional [:HASH] setting defines what type
 of hash to compute for the file: <strong>md5</strong>, <strong>rmd160</strong>, <strong>
sha1</strong>, or <strong>sha256, sha512</strong>, <strong>sha224</strong>, or <strong>
sha384</strong>. By default, no hash is calculated. <br>
<strong style="font-size: 18pt;">NOTE:</strong><span style="font-size: 18pt;"> If you want to check multiple files using a wildcard, you
</span><strong style="font-size: 18pt;">must</strong><span style="font-size: 18pt;"> use a command to generate the filenames. Putting wildcards directly into the
</span><strong style="font-size: 18pt;">file:</strong><span style="font-size: 18pt;"> entry will not work.
</span></p>
<p><a name="lbAJ"> </a> </p>
<p><br>
</p>
<p>with this example with directories :</p>
<p><br>
</p>
<p>dir:`find /var/log -maxdepth 1 -type d`<br>
</p>
<p><br>
</p>
<p>So, since i've searched what command i have to use with a Windows host ...<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Anaïs<br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<br>
<br>
</div>
</div>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>De :</b> Beck, Zak <zak.beck@accenture.com><br>
<b>Envoyé :</b> mardi 17 avril 2018 17:52<br>
<b>À :</b> Anaïs RABINOIT; xymon@xymon.com<br>
<b>Objet :</b> RE: How to verify DIR content with wildcards on a Windows host?</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#032DFD">Hi</span></p>
<p class="MsoNormal"><span style="color:#032DFD"> </span></p>
<p class="MsoNormal"><span style="color:#032DFD">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).</span></p>
<p class="MsoNormal"><span style="color:#032DFD"> </span></p>
<p class="MsoNormal"><span style="color:#032DFD">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.</span></p>
<p class="MsoNormal"><span style="color:#032DFD"> </span></p>
<p class="MsoNormal"><span style="color:#032DFD">So you may need several entries in client-local.cfg:</span></p>
<p class="MsoNormal"><span style="color:#032DFD"> </span></p>
<p class="MsoNormal"><span style="color:#032DFD">file:c:\temp\test\*.txt</span></p>
<p class="MsoNormal"><span style="color:#032DFD">file:c:\temp\test\*\*.txt</span></p>
<p class="MsoNormal"><span style="color:#032DFD">file:c:\temp\test\*\*\*.txt</span></p>
<p class="MsoNormal"><span style="color:#032DFD">and so on…</span></p>
<p class="MsoNormal"><span style="color:#032DFD"> </span></p>
<p class="MsoNormal"><span style="color:#032DFD">It may be simpler to use an external script – the external script approach can be used in either BBWin or XymonPSClient.</span></p>
<p class="MsoNormal"><span style="color:#032DFD"> </span></p>
<div>
<p class="MsoNormal"><span style="color:#032DFD">Zak </span></p>
</div>
<p class="MsoNormal"><span style="color:#032DFD"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Xymon [mailto:xymon-bounces@xymon.com]
<b>On Behalf Of </b>Anaïs RABINOIT<br>
<b>Sent:</b> Tuesday, 17 April 2018 10:28<br>
<b>To:</b> xymon@xymon.com<br>
<b>Subject:</b> [External] [Xymon] How to verify DIR content with wildcards on a Windows host?</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p><span style="font-size:12.0pt; color:black">Hi everyone,</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">I have to check if a directory on a windows host contains files with a specific extension.
</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">If it was a Unix/Linux host, i just have to write something like that i guess :</span></p>
<p><span style="font-size:12.0pt; color:black">client-local.cfg :</span></p>
<p><span style="font-size:12.0pt; color:black">    file:`find /path/mydir/*.tst`</span></p>
<p><span style="font-size:12.0pt; color:black">analysis.cfg :</span></p>
<p><span style="font-size:12.0pt; color:black">    FILE    %(/path/mydir/*.tst)    noexist</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">But how to do it for a Windows host? Is this possible ?</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">I tried this for example :</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">client-local.cfg :</span></p>
<p><span style="font-size:12.0pt; color:black">    file:`cmd /c "dir /b /s C:\path\mydir\*.tst"`</span></p>
<p><span style="font-size:12.0pt; color:black">or</span></p>
<p><span style="font-size:12.0pt; color:black">    file:`cmd /c "dir /b /s \path\mydir\*.tst"`</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">analysis.cfg :</span></p>
<p><span style="font-size:12.0pt; color:black">    FILE    "%C:\path\mydir\*.tst"    noexist</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">But it doesn't work :(</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">Regards,</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">Anaïs</span></p>
</div>
<br>
<hr>
<font size="1" color="Gray" face="Arial"><br>
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. <br>
______________________________________________________________________________________<br>
<br>
www.accenture.com<br>
</font></div>
</div>
</body>
</html>