Page 1 of 1
search logs for specific string
Posted: Tue Sep 24, 2019 11:30 am
by fsodah
Is it possible to run tail -f on a remote linux to search for specific error string and reported back to nagios, such as if search my logs for the last 24hours to look for specific errors or warning in mysql, Oracle, Apache... etc.
Re: search logs for specific string
Posted: Tue Sep 24, 2019 1:00 pm
by mbellerue
For this it might be good to see if there are existing plugins that suit your needs. This one looks pretty promising, as it looks like you can specify a log file, a message, and a date/time range that you are interested in.
https://exchange.nagios.org/directory/P ... gs/details
Alternately, Nagios Log Server has the ability to receive the logs from various systems, and you can create alerts based on those logs.
https://www.nagios.com/products/nagios-log-server/
Re: search logs for specific string
Posted: Tue Sep 24, 2019 1:37 pm
by fsodah
>>Alternately, Nagios Log Server has the ability to receive the logs from various systems, and you can create alerts based on those logs.
>>
https://www.nagios.com/products/nagios-log-server/
I will buy this one next year....
>>>if there are existing plugins that suit your needs
I am still not able to figure out how i can use these plugins... need step by step implementation
Re: search logs for specific string
Posted: Tue Sep 24, 2019 4:12 pm
by mbellerue
Here is a guide on installing plugins in Nagios XI.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
This should have everything you need to go from downloading the plugin to having a fully functional service check.
Re: search logs for specific string
Posted: Wed Sep 25, 2019 3:30 am
by fsodah
Fair ... I will review it and get back to you
Re: search logs for specific string
Posted: Wed Sep 25, 2019 11:21 am
by mbellerue
Okay, we will leave this thread open and wait to hear back.