Unknown command: $ in using check_eventlog with check_nrpe
Unknown command: $ in using check_eventlog with check_nrpe
I'm having an issue with check_eventlog with check_nrpe. The Nagios console displays:
Unknown command(s): $
From nagios.log:
[1544688000] CURRENT SERVICE STATE: per320-01;Applications errors;UNKNOWN;HARD;3;Unknown command(s): $
Service I'm using:
define service{
use generic-service
host_name per320-01,per320-02,svicsdlver01,svicsdlver03,svicsdlver04,
service_description Applications errors
check_command check_nrpe!check_eventlog -a "filter=provider = 'Application Error' and id = 1000 and message like 'Spacelabs.SLNIService.exe'"
}
nrpe.cfg and commands.cfg are attached.
Thanks!
Unknown command(s): $
From nagios.log:
[1544688000] CURRENT SERVICE STATE: per320-01;Applications errors;UNKNOWN;HARD;3;Unknown command(s): $
Service I'm using:
define service{
use generic-service
host_name per320-01,per320-02,svicsdlver01,svicsdlver03,svicsdlver04,
service_description Applications errors
check_command check_nrpe!check_eventlog -a "filter=provider = 'Application Error' and id = 1000 and message like 'Spacelabs.SLNIService.exe'"
}
nrpe.cfg and commands.cfg are attached.
Thanks!
- Attachments
-
commands.cfg- (7.85 KiB) Downloaded 369 times
-
nrpe.cfg- (12.18 KiB) Downloaded 374 times
Re: Unknown command: $ in using check_eventlog with check_nr
In commands.cfg you have
I think that should be:
and the check should look like this:
And looking through your nrpe.cfg I do not see any command definition for "check_eventlog" .
Code: Select all
# 'check_nrpe' command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 120 -c $ARGS$
}
Code: Select all
# 'check_nrpe' command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 120 -c $ARG1$ -a $ARG2$
}
Code: Select all
define service{
use generic-service
host_name per320-01,per320-02,svicsdlver01,svicsdlver03,svicsdlver04,
service_description Applications errors
check_command check_nrpe!check_eventlog!"filter=provider = 'Application Error' and id = 1000 and message like 'Spacelabs.SLNIService.exe'"
}
--
D/\N
D/\N
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unknown command: $ in using check_eventlog with check_nr
In addition to what @danjoh mentioned about the service definition, the service you have defined looks like something you would be running against a windows machine running nsclient++
Can you share the nsclient.ini from the windows machine?
Can you share the nsclient.ini from the windows machine?
Re: Unknown command: $ in using check_eventlog with check_nr
Thank you @danjoh and @scottwilkerson for your assistance.
I up-dated commands.cfg and ICS.cfg. NRPE Plugin for Nagios is now displayed.
/usr/local/nagios/libexec does not contain check_eventlog
nsclient.ini is attached.
I up-dated commands.cfg and ICS.cfg. NRPE Plugin for Nagios is now displayed.
/usr/local/nagios/libexec does not contain check_eventlog
nsclient.ini is attached.
- Attachments
-
nsclient.ini- (1.56 KiB) Downloaded 515 times
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unknown command: $ in using check_eventlog with check_nr
Is it now working as expected?raydx wrote:I up-dated commands.cfg and ICS.cfg. NRPE Plugin for Nagios is now displayed.
It would not be in /usr/local/nagios/libexec, it is part of nsclient++raydx wrote:/usr/local/nagios/libexec does not contain check_eventlog
Re: Unknown command: $ in using check_eventlog with check_nr
It is not working as expected.
What should I check on the windows machine that has NSClient++?
What should I check on the windows machine that has NSClient++?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unknown command: $ in using check_eventlog with check_nr
After making the change to the commands.cfg did you restart nagios?
what error are you getting in the UI after that? before it was this which was related to the error in the check_nrpe command
what error are you getting in the UI after that? before it was this which was related to the error in the check_nrpe command
Code: Select all
Unknown command(s): $Re: Unknown command: $ in using check_eventlog with check_nr
After making the changes to commands.cfg and ICS.cfg, nagios was re-started and
NRPE Plugin for Nagios was displayed in the Nagios console.
I reverted the changes and Unknown command(s): $ is displayed for all the check_eventlogs.
In checking the web for solutions, I did see that someone ran in
/usr/local/nagios/libexec$ ./check_nrpe - H 10.11.96.130 -t 30 -c check_event_log -a "file=security" "filetr=written 1t -2d" and NRPE: Command 'check_event_log' not defined is returned.
I am having difficulty with getting the correct command for nrpe.cfg.
NRPE Plugin for Nagios was displayed in the Nagios console.
I reverted the changes and Unknown command(s): $ is displayed for all the check_eventlogs.
In checking the web for solutions, I did see that someone ran in
/usr/local/nagios/libexec$ ./check_nrpe - H 10.11.96.130 -t 30 -c check_event_log -a "file=security" "filetr=written 1t -2d" and NRPE: Command 'check_event_log' not defined is returned.
I am having difficulty with getting the correct command for nrpe.cfg.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Unknown command: $ in using check_eventlog with check_nr
Please show in your next post what you have configured for check_nrpe in the GUI
Also, the command you were trying to run before is different than what you are trying to run now from the CLI, try
Also, the command you were trying to run before is different than what you are trying to run now from the CLI, try
Code: Select all
./check_nrpe - H 10.11.96.130 -t 30 -c check_eventlog -a "filter=provider = 'Application Error' and id = 1000 and message like 'Spacelabs.SLNIService.exe'" Re: Unknown command: $ in using check_eventlog with check_nr
In re to "what you have configured for check_nrpe in the GUI", which file are you referring to?
In the CLI, in /usr/local/nagios/libexec$, I ran the command and CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
In the CLI, in /usr/local/nagios/libexec$, I ran the command and CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).