can Nagios scan a log file for a keyword?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rnjie
Posts: 157
Joined: Wed Mar 20, 2019 4:59 pm

can Nagios scan a log file for a keyword?

Post by rnjie »

can Nagios scan a log file for a keyword? like search for a particular string from log files and send out an alert
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: can Nagios scan a log file for a keyword?

Post by jbrunkow »

You can monitor log files for a specific regular expression with the check log files plugin.
check_logfiles

Managing Plugins in Nagios XI
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
rnjie
Posts: 157
Joined: Wed Mar 20, 2019 4:59 pm

Re: can Nagios scan a log file for a keyword?

Post by rnjie »

thank you, but i do not see anywhere to download the plugin you provided, usually there is always an option to download or copy the script but i do not see it, all i see is this https://labs.consol.de/nagios/check_log ... stallation which just basically explains the plugin, am confused as to which is the actually plugin
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: can Nagios scan a log file for a keyword?

Post by jbrunkow »

Whups! Sorry about that. It looks like the same plugin is posted on GitHub as well. You should be able to download it from there.
check_logfiles on GitHub

You may already have a plugin called check log installed. It looks like you can search for a query in a log file using the -q flag.

Code: Select all

ls /usr/local/nagios/libexec | grep check_log
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked