read-pipe option works inconsistently
Brought to you by:
toddatkins
I have been using swatch for log monitoring for some time now, and although it works very well it seems that the --read-pipe option has some sort of bug. I have been using a .sh for filtering a log that i pipe into the swatch process.
The .sh script is this: tail -n 10 -F /var/log/ldap | grep -v "SEARCH RESULT"
When i use the script outside the swatch process it works fine, tails the log correctly.
However. when it is used in the swatch process the actions are inconsistent, sometimes swatch does its work with a delay of 1 sec, sometimes 10 min and sometimes 8 hours.
When using --tail-file on the log /var/log/ldap swatch works correctly, it immediately sees a pattern in it and responds accordingly.