File watcher process to monitor an error log file, and send (transport not implemented) notifications when a given error threshold -within one minute- is exceeded (e.g.: more than 10 errors in the same minute)
Process accepts several parameters for custom execution such as error threshold, error log file path and poll interval.
It also documents latest execution status in a log file (watcher.json
), to keep track of processed information and use in subsequent intervals.
https://github.com/fcarreno/rot-error-alarm-server
*** Expects errors logged in specific JSON format --> bunyan err
*** More details and assumptions and overall process in watcher.js
- Clone the repo
npm install
(install dependencies)node watcher.js
(start watcher process)
NOTE: can also run the process passing environment variables to customize execution rules. See available variables on top of watcher.js