NRPE WMI Check Setup Help

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
me@work55
Posts: 44
Joined: Sun Jan 22, 2017 6:15 pm

NRPE WMI Check Setup Help

Post by me@work55 »

Nagios 4.3.4 Core and Rhel 7

Window 2016 Server Windows 2008 Windows 2012 R2 servers

run this from my windows server

C:\Program Files\NSClient++>nscp nrpe --host 127.0.0.1 --command check_wmi -a "query=Select Version,Caption from win32_OperatingSystem"
Microsoft Windows Server 2008 R2 Enterprise , 6.1.7601

Run successfully

Add this to the nsclient which is 5.1.44

Code: Select all

; External scripts - A list of scripts available to run from the CheckExternalScripts module. Syntax is: `command=script arguments`
[/settings/external scripts/scripts]

; check_os - Alias for check_os. To configure this item add a section called: /settings/external scripts/scripts/check_os
check_os = check_wmi -a "Query=Select Version,Caption from win32_OperatingSystem" columnSyntax="%value%" columnSeparator=", " ignore-perf-data
Then from my Nagios server I run this
[tgrassi@anakin libexec]$ ./check_nrpe -t 60 -H printing.fdu.edu -c check_os
Failed to execute check_os: 2: The system cannot find the file specified.

Any ideas Thank you Tom
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NRPE WMI Check Setup Help

Post by npolovenko »

Hello, @mework55.
I believe that's because you put the query in the external scripts section, so NSClient thinks its a script.
On newer versions of NSCLient you should be able to run the check_os_version command without configuring anything:

Code: Select all

[root@centos7x64 libexec]# ./check_nrpe -H 192.168.3.239 -c check_os_version
OK: Windows 7 (6.1.7601)|'version'=61;50;50
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked