I’d like to create a new Check that can search a group of audit log files for ‘success’ events within a recent time period, similar to a heartbeat monitor. I don’t believe this is possible with the provided “sensu-check-log” command and its static regexp.
I have a solution that uses a bash script to generate a regexp covering my desired time period. So then using find and grep I can determine a 0, 1, or 2 result. I just haven’t found an example of where to put this code. How do I define it as a ‘check’ that I can invoke from my existing monitoring YAML file?
And if you think this is a crazy idea, please do suggest a better way. I’m learning!
- Sensu Go: monitoring: version: 0.2.9 ?