Hi Team,
On the server for everyday there will be a file with name "xxxx_xxx_2016-11-08_0.log" on the lcoation /usr/logs the date changes every day in the file name but format is same, there is one file per day, the file content is written once in every 4 hours. It writes file content at 12 AM, 4AM, 8AM, 12 PM, 4 PM, 8 PM. A monitoring job need to go into the content around 3:30 AM, 730 AM, 1130AM , 330 PM, 730 PM go and check the file and see if it has any error as "maxretry, not synchronized" if this line is found please send an alert and create an email .Also if you see an error like "FCS Bad receipt" do the same as above.
For the above requirement I used check_logfiles plugin which works great for me.But my problem is that my log file name is the format of xxxx_xxx_2016-11-08_0.log so let me know how to pass the file name to the script.Please help me with this requirement
Logs monitoring
-
gselvakumar
- Posts: 96
- Joined: Wed Mar 02, 2016 4:52 am
Logs monitoring
Thanks & Regards,
Gomathyshankar Selvakumar
Gomathyshankar Selvakumar
Re: Logs monitoring
I would suggest creating some sort of wrapper script that determines the current date and passes that off to check_logfiles. You would then use that wrapper script for your check command.
We also have Nagios Log Server available which is pretty good at collecting/analyzing/alerting on log files:
https://www.nagios.com/products/nagios-log-server/
We also have Nagios Log Server available which is pretty good at collecting/analyzing/alerting on log files:
https://www.nagios.com/products/nagios-log-server/
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/