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
Log monitoring. check_file_content.pl
-
FrancisNagios
- Posts: 58
- Joined: Tue Apr 09, 2019 6:54 am
Log monitoring. check_file_content.pl
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Log monitoring. check_file_content.pl
in the command definition change
to
then restart nagios
Code: Select all
$USER1$/check_file_content Code: Select all
$USER1$/check_file_content.pl -
FrancisNagios
- Posts: 58
- Joined: Tue Apr 09, 2019 6:54 am
Re: Log monitoring. check_file_content.pl
Case resolved, thank you for the information and quick response
Thanks and regards
Thanks and regards
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Log monitoring. check_file_content.pl
Great!FrancisNagios wrote:Case resolved, thank you for the information and quick response
Thanks and regards
Locking thread