Hi Team,
We have a requirement on one of our unix machines to Monitor Text/log files for specific content in the file and give output.
Basically, we will get an output file(consisting of String values Green, Orange, and Red) from one of the job scripts in .txt format and we have planned to monitor the file based on it, such that
Green = Ok
Orange = Warning
Red = Critical
Could you guys please suggest which plugin suits the above requirement on UNIX machines with nrpe/ncpa agent
Thanks in Advance
Nagios Core command to search for String and return output
-
- Posts: 47
- Joined: Wed Sep 09, 2020 4:05 am
Re: Nagios Core command to search for String and return outp
Hello @apteancloud
Thanks for reaching out, check_log will watch file and query for keyword.
Perry
Thanks for reaching out, check_log will watch file and query for keyword.
Thanks,/usr/local/nagios/libexec/check_log --help
check_log v2.3.3 (nagios-plugins 2.3.3)
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Usage: check_log -F logfile -O oldlog -q query
Usage: check_log --help
Usage: check_log --version
Additional parameter:
-w (--max_warning) If used, determines the maximum matching value to return as warning, when finding more matching lines than this parameter will return as critical. If not used, will consider as default 0 (any matching will consider as critical)
Usage: check_log -F logfile -O oldlog -q query -w <number>
Perry