<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      thanks a lot to all and especially to you, Jeremy. The central
      info was "You cannot use backticks in analysis.cfg FILE patterns".
      <br>
      I still have no idea what the bourne shell is doing on the client.
      Xymon user uses bash, maybe the error is the result of some other
      script using sh and not related to the file problem. <br>
      But at least it is working know and I know how to set entries in
      analysis.cfg and client-local.cfg<br>
      <br>
      Rolf<br>
      <br>
      This is what I use now<br>
      analysis.cfg: FILE    `/home/mypath/log/update_out_$(date
      +%Y%m%d).txt` MTIME<600 red<br>
      client config.cfg: file:`bash -c 'find
      /mypath/log/update_out_$(date +%Y%m%d).txt'` <br>
      <br>
    </div>
    <blockquote
cite="mid:CAAnki7DZ4feC-XMSR-T0cfjUrn4VbqVjC=MPkMrQOuS3=_Cs_w@mail.gmail.com"
      type="cite">
      <div dir="ltr">On 26 September 2013 17:34, Rolf Schrittenlocher <span
          dir="ltr"><<a moz-do-not-send="true"
            href="mailto:schritte@ub.uni-frankfurt.de" target="_blank">schritte@ub.uni-frankfurt.de</a>></span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On
              the server we have in<br>
              analysis.cfg<br>
              HOST=myserver<br>
               FILE    `/home/mypath/log/update_out_$(date +%Y%m%d).txt`
              MTIME<600 red<br>
            </blockquote>
            <div><br>
            </div>
            <div>You cannot use backticks in analysis.cfg FILE patterns.
               You have to use a pattern match or a regular expression.
               So one of these might work for you:<br>
            </div>
            <div><br>
            </div>
            <div>Live in San Francisco</div>
            <div><br>
            </div>
            <div>or</div>
            <div><br>
            </div>
            <div>
              <div>FILE    "%/home/mypath/log/update_out_[0-9]*\.txt"
                MTIME<600 red<br>
              </div>
            </div>
            <div><br>
            </div>
            <div>These should match whatever file is evaluated by the
              backtick expression in analysis.cfg.  That will only ever
              be one file, so you should only see alarms for the correct
              file.</div>
            <div><br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">in
              client-local.cfg:<br>
              [myserver]<br>
                file:`find /mypath/log/update_out_$(date +%Y%m%d).txt`<br>
            </blockquote>
            <div><br>
            </div>
            <div>
              <div>If your Xymon user's shell is bourne shell, then the
                $() form won't work.  Bourne shell uses only backticks,
                but you cannot use backticks either, because Xymon
                terminates the "file:" expression at the second
                backtick.</div>
              <div><br>
              </div>
              <div>You can probably just run bash, if it's installed,
                and give it the command you want, using the $()
                expression, like so:</div>
              <div><br>
              </div>
              <div>file:`bash -c 'find /mypath/log/update_out_$(date
                +%Y%m%d).txt'` </div>
              <div> <br>
              </div>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">In
              xymonclient.log I see an entry<br>
              sh: syntax error at line 1: `(' unexpected<br>
              but I don't know if it is related to the file problem or
              to anything else.<br>
            </blockquote>
            <div><br>
            </div>
            <div>Yes, this is bourne shell complaining about "("
              following "$" because it requires an opening paren to be
              at the start of an expression.  It doesn't understand
              "$().  So try the "bash" thing and see if it works for
              you.  If bash isn't installed, then the same should work
              for korn shell (ksh).</div>
            <div><br>
            </div>
            <div>J</div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Mit freundlichen Gruessen
Rolf Schrittenlocher

Lokales Bibliothekssystem Frankfurt
Senckenberganlage 31, 60054 Frankfurt
Tel: (49) 69 - 798 28908   Fax: (49) 69 798 28817
LBS: <a class="moz-txt-link-abbreviated" href="mailto:lbs-f@mlist.uni-frankfurt.de">lbs-f@mlist.uni-frankfurt.de</a>
Persoenlich: <a class="moz-txt-link-abbreviated" href="mailto:schritte@ub.uni-frankfurt.de">schritte@ub.uni-frankfurt.de</a> </pre>
  </body>
</html>