sensu-plugins-windows icon indicating copy to clipboard operation
sensu-plugins-windows copied to clipboard

check-windows-log.ps1 should allow for behavior like its Linux counterpart

Open rgeniesse opened this issue 6 years ago • 3 comments

Currently, the script will look at an entire log file for a string. If found, it alerts. This doesn't work well in cases where a log will continue to have hits on a search, but the issue corresponding to that match is resolved.

The Linux counterpart has logic built in so that it doesn't read beyond a certain point. Appears to use a state file to do so.

https://github.com/sensu-plugins/sensu-plugins-logs/blob/master/bin/check-log.rb

The script needs something like this or something time based, i.e. only search in the past hour.

rgeniesse avatar Sep 12 '18 23:09 rgeniesse