I have a requirement to to develope a bash script to trigger alter for the errors and warnings by reading all services log files. We have nearly 700 services, I use an API to download logs of services one by one and trigger mail from single machine.During first loop, I save the log after sending alert. In the next loop, I will do diff with newly downloaded log and already saved log, then I will check the errors on diff output and trigger mail. This way I avoid sending repeated alert.But I am not comfortable in storing logs of all 700 services for comparing, it occupies lot of space in my machine.Is there an alternate logic to avoid sending repeated alerts?
Script to avoid triggering repeated alerts from a log file
linux;scripting