We are running the trial version of Nagios 2012R1.1 and we have some problems.
First we want to add a check like this:
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c $ARG1$ -a $ARG2$ $ARG3$
The arguments are:
$ARG1$: check_eventlog
$ARG2$: "file=System filter+generated=<1h filter+eventType==warning MaxWarn=1 MaxCrit=1"
When we run this command in a nagiosxi, we get the error:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H example.com -p 5666 -c check_eventlog -a "file=System filter generated=\<1h filter eventType==warning MaxWarn=1 MaxCrit=1"
OUTPUT: Unknown argument: generated
It's loose the + between filter and generated.
On the command line this command works:
/usr/local/nagios/libexec/check_nrpe -H example.host -p 5666 -c check_eventlog -a "file=System filter+generated=<1h filter+eventType==warning MaxWarn=1 MaxCrit=1"
Eventlog check ok|'eventlog'=0;1;1
What to do to fix this?
Problem with service check Nagios 2012R1.1
-
guppy_rules
- Posts: 12
- Joined: Thu Feb 09, 2012 10:21 am
Re: Problem with service check Nagios 2012R1.1
Try single quotes instead of double. It looks like the backslash is escaping the rest of the command.
-
guppy_rules
- Posts: 12
- Joined: Thu Feb 09, 2012 10:21 am
Re: Problem with service check Nagios 2012R1.1
With single quotes we have the same problem:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H sede0035.ede.nl -p 5666 -c check_eventlog -a 'file=System filter generated=\>1h filter eventType==warning MaxWarn=1 MaxCrit=1'
OUTPUT: Unknown argument: generated
Without quotes:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H sede0035.ede.nl -p 5666 -c check_eventlog -a file=System filter generated=\>1h filter eventType==warning MaxWarn=1 MaxCrit=1
OUTPUT: No filters specified try adding: filter+generated=>2d
COMMAND: /usr/local/nagios/libexec/check_nrpe -H sede0035.ede.nl -p 5666 -c check_eventlog -a 'file=System filter generated=\>1h filter eventType==warning MaxWarn=1 MaxCrit=1'
OUTPUT: Unknown argument: generated
Without quotes:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H sede0035.ede.nl -p 5666 -c check_eventlog -a file=System filter generated=\>1h filter eventType==warning MaxWarn=1 MaxCrit=1
OUTPUT: No filters specified try adding: filter+generated=>2d
Re: Problem with service check Nagios 2012R1.1
Oh, try setting up the command the way that worked from the command-line and see if the check runs properly once the configuration is Applied. It's possible there's an escaping bug with the command test from the UI.
-
guppy_rules
- Posts: 12
- Joined: Thu Feb 09, 2012 10:21 am
Re: Problem with service check Nagios 2012R1.1
Yes the command works when we did an apply. So it's only the test that failed.
Thanks.
Thanks.