sensu-plugins-windows
sensu-plugins-windows copied to clipboard
check-windows-log.ps1 should allow for behavior like its Linux counterpart
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.