Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I'm trying to get the check_log plugin working on a simple application log file that checks for multiple errors in a single line but the Status Information field in the Nagios dashboard only outputs "(1)" and not the line that triggered the CRITICAL alert when it correctly detects one of the errors.
What needs to change to fix this? I've read about splitting the four strings into four separate checks but I'm looking to do over a dozen checks on the same server and would prefer to not have to if possible.
mcapra wrote:NRPE does not run commands in a shell (it uses popen), and subsequently cannot perform Bash substitution as you're attempting to do here:
You're right. Removing that from the line helped make it work.
Interstingly, although my original post doesn't have it, I used bash substitution for the log file names with the date too and THAT actually doesn't break (maybe coz that takes place within the sudo command itself?).