<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>I've been forced to implement the following on a daily christmas
      tree timer :/</p>
    <p><font face="monospace">TODAY=$( date +%Y-%m-%d )<br>
        logfile=/var/log/xymon/alert.log<br>
        checkpointfile=/var/lib/xymon/tmp/alert.chk<br>
        <br>
        z=$( mktemp -p /tmp $0.XXXX )<br>
        trap "rm -rf $z" exit<br>
        <br>
        # Restarting the daemon is the only way I have found <br>
        # to generate the 'Stale' lines in the log file<br>
        systemctl restart xymon<br>
        sleep 120<br>
        <br>
        # find the stale hosts reported today in the log file<br>
        # build a file containing 'delete' commands for sed<br>
        egrep "^$TODAY ............... Stale alert " ${logfile} |cut -d
        " " -f 6 \<br>
          | tr ':' '|' | sed 's#^#/^# ; s#$#/d#' > ${z}<br>
        <br>
        # Delete the stale hosts from the checkpoint file while xymond
        is stopped<br>
        systemctl stop xymon && sed -i -f ${z} ${checkpointfile}
        && systemctl start xymon</font></p>
    <p><br>
    </p>
    <p>If anyone can offer any ideas into <i>why</i> my xymon isn't
      purging dead alerts, I'd love to hear them.</p>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">--
Do things because you should, not just because you can. 

John Thurston    907-465-8591
<a class="moz-txt-link-abbreviated" href="mailto:John.Thurston@alaska.gov">John.Thurston@alaska.gov</a>
Department of Administration
State of Alaska</pre>
    <div class="moz-cite-prefix">On 11/17/2022 9:04 AM, John Thurston
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:272ca0dc-73b2-a896-6d93-a6535b793b98@alaska.gov">
      
      <p>My Xymon (Xymon 4.3.30-1.el7.terabithia) is no longer noticing
        it is time to stop sending email alerts.</p>
      <p>A customer will ping me, saying "I'm still getting emails for a
        problem I fixed 10 days ago!"</p>
      <p>I find the messages in question in the <i>notifications.log</i> 
        Yep, there are a lot of them. I can see the test recovered ages
        ago, and there should no longer be notifications.<br>
      </p>
      <p>If I go look in <i>alert.chk</i>, I can see the host:test in
        question</p>
      <p>If I restart xymon, the <i>alert.log</i> will get a bunch of
        lines "Stale alert found", but the lines remain in the <i>alert.chk</i></p>
      <p>The only way I have figured out to clean this up is to grep the
        'Stale' host:test pairs out of the <i>alert.log</i>, stop
        xymon, feed the host:test pairs through sed to delete the
        offending lines from <i>alert.chk</i>, and restart xymon.</p>
      <p><br>
      </p>
      <p>Anyone have any ideas what's wrong here?</p>
      <pre class="moz-signature" cols="72">-- 
--
Do things because you should, not just because you can. 

John Thurston    907-465-8591
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:John.Thurston@alaska.gov" moz-do-not-send="true">John.Thurston@alaska.gov</a>
Department of Administration
State of Alaska</pre>
    </blockquote>
  </body>
</html>