When i run command on terminal it shows perfect:
./check_nrpe -H IP_Address -t 30 -c check_wmi -a "query=Select Version,Caption from win32_OperatingSystem"
Microsoft Windows Server 2012 R2 Standard, 6.3.9600
But when i run through command definition than restart the service it shows below error:
============================================================================================================================
Checking objects...
Error: Service check command 'check_nrpe -H winserver-2012 -t 30 -c check_wmi -a "query=Select Version,Caption from win32_OperatingSystem"' specified in service 'Operating System' for host 'winserver-2012' not defined anywhere!
============================================================================================================================
command define:
============================================================================================================================
define service{
use generic-service
host_name winserver-2012
service_description Operating System
check_command check_nrpe -H winserver-2012 -t 30 -c check_wmi -a "query=Select Version,Caption from win32_OperatingSystem"
}
============================================================================================================================
Checking OS Version
Re: Checking OS Version
You need to separate arguments to your command like so:
check_command check_nrpe!check_wmi!-a "query=Select Version,Caption from win32_OperatingSystem"
assuming your check_nrpe command is defined as:
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
Please see the following documentation on setting up commands and services:
https://assets.nagios.com/downloads/nag ... ml#command
https://assets.nagios.com/downloads/nag ... ml#service
https://assets.nagios.com/downloads/nag ... acros.html
check_command check_nrpe!check_wmi!-a "query=Select Version,Caption from win32_OperatingSystem"
assuming your check_nrpe command is defined as:
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
Please see the following documentation on setting up commands and services:
https://assets.nagios.com/downloads/nag ... ml#command
https://assets.nagios.com/downloads/nag ... ml#service
https://assets.nagios.com/downloads/nag ... acros.html
Former Nagios employee
Re: Checking OS Version
Actually i'm using nsclient++ 0.41 version, so below command is preferrable for that version, but still getting error.
./check_nrpe -H IP_Address -t 30 -c CheckWMI -a "Query=Select Version,Caption from win32_OperatingSystem" columnSyntax="%value%" columnSeparator=", " ignore-perf-data
Output:
CHECK_NRPE: No output returned from daemon.
But when i run previous command i.e it shows below output:
./check_nrpe -H IP_Address -t 30 -c check_wmi -a "query=Select Version,Caption from win32_OperatingSystem"
Output:
No checks specified add warn/crit boundries
./check_nrpe -H IP_Address -t 30 -c CheckWMI -a "Query=Select Version,Caption from win32_OperatingSystem" columnSyntax="%value%" columnSeparator=", " ignore-perf-data
Output:
CHECK_NRPE: No output returned from daemon.
But when i run previous command i.e it shows below output:
./check_nrpe -H IP_Address -t 30 -c check_wmi -a "query=Select Version,Caption from win32_OperatingSystem"
Output:
No checks specified add warn/crit boundries
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Checking OS Version
Can you confirm your NClient++ version:
Also, can you please provide your nsclient.ini file
Code: Select all
./check_nrpe -H IP_AddressAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Checking OS Version
It's: I (0.4.2.112 2015-01-08) seem to be doing fine...
Re: Checking OS Version
Can you please complete this step so we can review the file?Box293 wrote:
Also, can you please provide your nsclient.ini file
Thanks!
Former Nagios Employee.
me.
me.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Checking OS Version
rlinux57 wrote:It's: I (0.4.2.112 2015-01-08) seem to be doing fine...
I can confirm this is a bug in the version of NSClient++ you are running.rlinux57 wrote:But when i run previous command i.e it shows below output:
./check_nrpe -H IP_Address -t 30 -c check_wmi -a "query=Select Version,Caption from win32_OperatingSystem"
Output:
No checks specified add warn/crit boundries
This has been fixed in the latest version 0.4.3.143:
Code: Select all
Command:
./check_nrpe -H win2008r2-01 -c check_wmi -a "query=Select Version,Caption from win32_OperatingSystem"
Output:
Microsoft Windows Server 2008 R2 Standard , 6.1.7600As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Checking OS Version
thanks it's working with new stable version.
Re: Checking OS Version
I'm going to go ahead and close this one up then as you have it working. Thanks!
Former Nagios Employee.
me.
me.