in reply to Re: Process Monitoring Madness
in thread Process Monitoring Madness

Thanks poj - well spotted, I shall fix that now. Unfortunately today's problem manifests itself with the below crontab entries
00 05 * * 0 /etc/init.d/smart_tse-ah2 start 00 22 * * 0 /etc/init.d/smart_tse-ah2 stop
Which I believe the program should be ignoring :-/

Replies are listed 'Best First'.
Re^3: Process Monitoring Madness
by Corion (Patriarch) on Oct 08, 2018 at 12:47 UTC

    Can you show us input that should/shouldn't match? Ideally for debugging, you hardcode that input, so we can test it without running crontab -l or the service status commands...

    Personally, I've grown fond of Regexp::Debugger, which makes it very convenient to see where a regular expression deviates from the intended path...

      Hi Corion

      I have updated the OP with examples

      Thanks

        Thanks! I had originally misread/misunderstood your code as I thought it also read the output of the /etc/init.d/* scripts, but it doesn't, so the output of them doesn't really matter.

      Hi Corion

      The below is triggering alerts today even though date +%w == 1

      00 05 * * 0 /etc/init.d/smart_tse-ah2 start 00 22 * * 0 /etc/init.d/smart_tse-ah2 stop

      The regex itself appears fine as these false alerts are sporadic and the below crontab have so far caused no alerts today

      00 05 * * 1-5 /etc/init.d/tsefull start 00 22 * * 1-5 /etc/init.d/tsefull stop

      Thanks

Re^3: Process Monitoring Madness
by poj (Abbot) on Oct 08, 2018 at 17:46 UTC

    Where in the program is %schedule declared ?

    poj