<div dir="ltr"><div>Hi,<br><br><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">Thank</span> <span class="gmail-">you for your</span> <span class="gmail-">answers</span><span>.</span></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-22 23:11 GMT+01:00 David Baldwin <span dir="ltr"><<a href="mailto:david.baldwin@ausport.gov.au" target="_blank">david.baldwin@ausport.gov.au</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF"><span class="gmail-">
    <div class="gmail-m_-3038368400357918853moz-cite-prefix">On 22/3/17 9:03 pm,
      <a class="gmail-m_-3038368400357918853moz-txt-link-abbreviated" href="mailto:zak.beck@accenture.com" target="_blank">zak.beck@accenture.com</a> wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      
      <div class="gmail-m_-3038368400357918853WordSection1">
        <p class="MsoNormal"><span style="font-size:11pt;font-family:"calibri",sans-serif;color:rgb(13,19,255)">Hi
            Luboš<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt;font-family:"calibri",sans-serif;color:rgb(13,19,255)"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt;font-family:"calibri",sans-serif;color:rgb(13,19,255)">I
            think you’re talking about the ASCII encoding in function
            XymonSend.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt;font-family:"calibri",sans-serif;color:rgb(13,19,255)"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11pt;font-family:"calibri",sans-serif;color:rgb(13,19,255)">I
            don’t know the reason for choosing ASCII encoding, that code
            was written before I was involved.<u></u><u></u></span></p>
      </div>
    </blockquote></span>
    I wrote that code. From memory, the xymon server could only handle
    the clientlog message in ASCII at the time, and forcing the
    translation to ASCII was a key part to getting it working. If the
    constraint of ASCII clientlog message has changed, then by all means
    feel free to convert to UTF8, however some users may still be
    running old servers that can only handle ASCII, so best to leave it
    configurable.<br>
    <br>
    You'd need to test that all client-based tests (DISK, SVC, PORT,
    PROC, etc) are still working not just eventlog message matching.<span class="gmail-"><br></span></div></blockquote><div><br></div><div>I try multiple tests with client messages in UTF8. <span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">First,</span> <span class="gmail-">I will describe</span> <span>our</span> <span class="gmail-">environment</span><span>.</span> <span>We use two Xymon servers (versions 4.3.25, 4.3.27), both are</span><span> running</span> <span>on </span><span>Linux boxes</span> <span>(</span><span>CentOS</span><span>,</span> <span>Debian</span><span>)</span> with LANG=<span>en_US.UTF</span><span>-</span><span>8.</span> <span>Apache web server </span></span><span id="gmail-result_box" class="gmail-" lang="en"><span>has</span> <span>set</span> <span>the default</span> <span>encoding to</span> <span class="gmail-">UTF-8.<br><br><br></span></span></div><div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">Client tests DISK, UP,</span></span><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">MEMHYS,MEMSWAP and MEMACT are without problems, because corresponding sections from clientlog are in English. <br></span></span></div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">CLOCK test are working correctly, because first line "epoch: <number>" from [clock] section isn't localized.<br><br><br></span></span></div><div class="gmail_quote"><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">Tests LOG, PROC, SVC and PORT successfully filter non-ASCII strings. Examples:<br><br>    LOG eventlog_System "%Zpracování zásad skupiny selhalo" COLOR=red<br>    PROC "%Nový textový dokument"<br>    PORT "LOCAL=%(:445)$" state=NASLOUCHÁNÍ TEXT=sdílení TRACK<br>    PORT "REMOTE=%([.:]445)$" state=NAVÁZÁNO min=1 max=10 color=yellow TRACK=smb_servers TEXT=SMB_servers<br>    SVC  "Xymončesky" status=started<br></span></span><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"><br><br></span></span><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"></span></span><div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"></span></span></div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"></span></span><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">FILE and DIR:</span></span> <span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">I successfully test file and directory with non-ASCII chars in filename. </span></span><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">File</span></span><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"> client-local.cfg</span></span> on xymon server contains next lines:</span></span><br><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"></span></span><div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"><br></span></span></div><div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">file:d:\temp\čeština.txt<br>dir:d:\temp\český<br></span></span></div><div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-"><br>and file analysis.cfg contains tests:<br><br>FILE "D:\temp\čeština.txt"      TYPE=file SIZE>100 MTIME<180 yellow TRACK<br>DIR  "D:\temp\český"  SIZE<1000 TRACK<br><br></span></span></div><span id="gmail-result_box" class="gmail-" lang="en"><span class="gmail-">Bad filenames are in graph: "D:<tab>emp\čeština.txt" and "D:<tab>temp\český". </span></span>But this si the slash problem.<br><div><br><br></div><div>Xymon server don't create some graph, e.g. netstat, user. Th<span id="gmail-result_box" class="gmail-short_text" lang="en"><span class="gmail-alt-edited">is is a result</span> <span>of localized</span> <span class="gmail-">messages in output from windows programs netstat, ipconfig or qwinsta. See <a href="http://lists.xymon.com/archive/2014-January/038946.html">http://lists.xymon.com/archive/2014-January/038946.html</a> and following discussion.<br><br><br></span></span></div><div>Attached patch adds local setting XymonAcceptUTF8. If value set to 1, then all client messages are converted to UTF8 before sending to xymon servers. If value set to 0 or not specified, then script removes diacritics (accents) from message, converts non-break spaces to normal spaces (question marks in eventlog summary) and converts to ASCII before sending to xymon server. The same setting is applied to all specified xymon servers.<br><br><br></div><div>Luboš Pavlíček<br></div></div></div></div></div></div>