Log monitoring. check_file_content.pl
Posted: Mon May 20, 2019 7:41 am
Hi,
I'm trying to monitor that if a "pattern” is not found in a "file" on a Unix server, skip a notification using the command "check_file_content.pl"
I make an example locally on the NagiosXi server successfully.
# more 33d
Uptime CRITICAL: 21 day(s) 21 hour(s) 4 minute(s) | uptime=31504.000000;5.000000;10.000000;
# ./check_file_content.pl -f /usr/local/nagios/libexec/33d -i minute -n 0
OK for /usr/local/nagios/libexec/33d (1 found)
# ./check_file_content.pl -f /usr/local/nagios/libexec/33d -i error -n 0
FAILED on /usr/local/nagios/libexec/33d
But when doing it with the tool, it gives me this error:
This is the definition of the command:
This is the definition of the service:
Thanks and regards
I'm trying to monitor that if a "pattern” is not found in a "file" on a Unix server, skip a notification using the command "check_file_content.pl"
I make an example locally on the NagiosXi server successfully.
# more 33d
Uptime CRITICAL: 21 day(s) 21 hour(s) 4 minute(s) | uptime=31504.000000;5.000000;10.000000;
# ./check_file_content.pl -f /usr/local/nagios/libexec/33d -i minute -n 0
OK for /usr/local/nagios/libexec/33d (1 found)
# ./check_file_content.pl -f /usr/local/nagios/libexec/33d -i error -n 0
FAILED on /usr/local/nagios/libexec/33d
But when doing it with the tool, it gives me this error:
This is the definition of the command:
This is the definition of the service:
Thanks and regards