Thanks for that. This is the more detailed error message I get now. I tried with the wmiagent credentials and even with the administrator login and it comes up with the same error with something more general like explorer.exe.
This seems to be the important bit
Code: Select all
WMI Query returned no data. The item you were looking for may NOT exist or the software that creates the WMI Class may not be running, or all data has been excluded
Below is the entire output in debug mode.
Any ideas?
Thanks.
Code: Select all
[root@nagiosxi libexec]# ./check_wmi_plus.pl -H 192.168.130.252 -u wmiagent -p ###### -m checkproc -s cpu -a explorer% -d
Command Line (v1.6): ./check_wmi_plus.pl -H 192.168.130.252 -u USER -p PASS -m checkproc -s cpu -a explorer% -d
Base Dir: /usr/local/nagios/libexec
Conf File Dir: /usr/local/nagios/libexec
Loaded Conf File /usr/local/nagios/libexec/check_wmi_plus.conf
Opening Ini Files ...
opening first ini file: /usr/local/nagios/libexec/check_wmi_plus.ini
checking ini dir /usr/local/nagios/libexec, found 1 file(s)
opening ini file: check_wmi_plus.ini
Global Static Ini Variables: $VAR1 = {};
Found Group checkproc
GROUP MEMBERS $VAR1 = [
'checkproc cmdline',
'checkproc memory',
'checkproc memoryabove',
'checkproc memorytotals',
'checkproc cpu',
'checkproc cpuabove',
'checkproc count',
'checkproc info'
];
Found Member cpu
Processing INI Section: checkproc cpu
Settings for this section are:
-------------------------------------------------------------------
aligndata => Name,IDProcess
customfield => _AvgCPU,PERF_100NSEC_TIMER,PercentProcessorTime,%.1f,100
delay => 5
display => _AvgCPU|%|CPU_{Name}(PID={IDProcess})||||
inihelp => Check cpu details for individual processes
ARG1 The processname to look for. Use % for wildcards.
The process name typically only includes the actual file name minus its suffix eg firefox, svchost
If there are multiple instances eg svchost, then some versions of Windows have them named all the same while others
such as Windows 2008 Server, have them numbered eg svchost#1, svchost#2, svchost#3. To get all svchost processes you
need to set ARG1 to svchost%
To view all processes set ARG1 to "%" and the full process list will be included in the plugin output.
Note: Use --nodatamode and/or NODATAEXIT settings to control what happens if no matching process is found.
perf => _ItemCount||Process Count
_AvgCPU|%|Avg Utilisation CPU_{Name}
predisplay => _DisplayMsg||~|~| - ||
_ItemCount| Instance(s)|Found |~|. || of "{_arg1}" running
query => select Name,IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process WHERE Name like "{_arg1}"
requires => 1.48
samples => 2
test => _AvgCPU
_ItemCount
-------------------------------------------------------------------
All Static Ini Variables: $VAR1 = {};
Query Extenstions: $VAR1 = [];
Original Query:select Name,IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process WHERE Name like "{_arg1}"
New Query:select Name,IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process WHERE Name like "{_arg1}"
Starting Keep State Mode
STATE FILE: /tmp/cwpss_checkproccpu_cpu_192168130252_explorer__.state
Checking previous data's expiry - Timestamp 1499674505 vs Expiry After 1499670908 (Keep State Expiry setting is 3600sec)
Using Existing WMI DATA of:$VAR1 = [
[
{
'_ItemCount' => '0',
'_KeepStateCreateTimestamp' => 1499674505
}
]
];
Round #2 of 2
QUERY: /usr/bin/wmic '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//192.168.130.252' 'select Name,IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process WHERE Name like "explorer%"'
OUTPUT:
WMI DATA:$VAR1 = [
[
{
'_ChecksOK' => 1,
'_KeepStateSamplePeriod' => 3,
'_ItemCount' => '0',
'_KeepStateCreateTimestamp' => 1499674505
}
],
[
{
'_ItemCount' => 0
}
]
];
Storing new WMI results in the state file $VAR1 = [
[
{
'_KeepStateCreateTimestamp' => 1499674508,
'_ItemCount' => 0
}
]
];
Copying predefined fields to the last WMI result set [0] to [1]
NEW WMI DATA:$VAR1 = [
[
{
'_ItemCount' => '0'
}
],
[
{
'_KeepStateSamplePeriod' => 3,
'_ChecksOK' => 1,
'_KeepStateCreateTimestamp' => 1499674505,
'_ItemCount' => 0
}
]
];
JOIN PARAMETERS $VAR1 = [];
$VAR2 = [];
$VAR3 = [
[
{
'_ItemCount' => '0'
}
],
[
{
'_KeepStateSamplePeriod' => 3,
'_ChecksOK' => 1,
'_KeepStateCreateTimestamp' => 1499674505,
'_ItemCount' => 0
}
]
];
$VAR4 = 1;
WMI Query returned no data. The item you were looking for may NOT exist or the software that creates the WMI Class may not be running, or all data has been excluded
This what I get when I use the administrator login, which is quite odd. But I suspect it could be because I didn't apply the WMI NagiosXI configuration to the administrator login, only to the wmiagent login. So in effect administrator might have a lower access level than wmiagent, which is why it comes up with this.
Code: Select all
[root@nagiosxi libexec]# ./check_wmi_plus.pl -H 192.168.130.252 -u administrator -p ####### -m checkproc -s cpu -a explorer% -d
Command Line (v1.6): ./check_wmi_plus.pl -H 192.168.130.252 -u USER -p PASS -m checkproc -s cpu -a explorer% -d
Base Dir: /usr/local/nagios/libexec
Conf File Dir: /usr/local/nagios/libexec
Loaded Conf File /usr/local/nagios/libexec/check_wmi_plus.conf
Opening Ini Files ...
opening first ini file: /usr/local/nagios/libexec/check_wmi_plus.ini
checking ini dir /usr/local/nagios/libexec, found 1 file(s)
opening ini file: check_wmi_plus.ini
Global Static Ini Variables: $VAR1 = {};
Found Group checkproc
GROUP MEMBERS $VAR1 = [
'checkproc cmdline',
'checkproc memory',
'checkproc memoryabove',
'checkproc memorytotals',
'checkproc cpu',
'checkproc cpuabove',
'checkproc count',
'checkproc info'
];
Found Member cpu
Processing INI Section: checkproc cpu
Settings for this section are:
-------------------------------------------------------------------
aligndata => Name,IDProcess
customfield => _AvgCPU,PERF_100NSEC_TIMER,PercentProcessorTime,%.1f,100
delay => 5
display => _AvgCPU|%|CPU_{Name}(PID={IDProcess})||||
inihelp => Check cpu details for individual processes
ARG1 The processname to look for. Use % for wildcards.
The process name typically only includes the actual file name minus its suffix eg firefox, svchost
If there are multiple instances eg svchost, then some versions of Windows have them named all the same while others
such as Windows 2008 Server, have them numbered eg svchost#1, svchost#2, svchost#3. To get all svchost processes you
need to set ARG1 to svchost%
To view all processes set ARG1 to "%" and the full process list will be included in the plugin output.
Note: Use --nodatamode and/or NODATAEXIT settings to control what happens if no matching process is found.
perf => _ItemCount||Process Count
_AvgCPU|%|Avg Utilisation CPU_{Name}
predisplay => _DisplayMsg||~|~| - ||
_ItemCount| Instance(s)|Found |~|. || of "{_arg1}" running
query => select Name,IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process WHERE Name like "{_arg1}"
requires => 1.48
samples => 2
test => _AvgCPU
_ItemCount
-------------------------------------------------------------------
All Static Ini Variables: $VAR1 = {};
Query Extenstions: $VAR1 = [];
Original Query:select Name,IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process WHERE Name like "{_arg1}"
New Query:select Name,IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process WHERE Name like "{_arg1}"
Starting Keep State Mode
STATE FILE: /tmp/cwpss_checkproccpu_cpu_192168130252_explorer__.state
Checking previous data's expiry - Timestamp 1499674664 vs Expiry After 1499671087 (Keep State Expiry setting is 3600sec)
Using Existing WMI DATA of:$VAR1 = [
[
{
'_ItemCount' => '0',
'_KeepStateCreateTimestamp' => 1499674664
}
]
];
Round #2 of 2
QUERY: /usr/bin/wmic '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//192.168.130.252' 'select Name,IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process WHERE Name like "explorer%"'
OUTPUT: [librpc/rpc/dcerpc_util.c:1290:dcerpc_pipe_auth_recv()] Failed to bind to uuid 4d9f4ab8-7d1c-11cf-861e-0020af6e7c57 - NT_STATUS_NET_WRITE_FAULT
[librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000022) in dcerpc_pipe_connect_b_recv
[wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied
Could not find the CLASS: line - an error occurred
WMI DATA:$VAR1 = [
[
{
'_KeepStateSamplePeriod' => 23,
'_ItemCount' => '0',
'_KeepStateCreateTimestamp' => 1499674664
}
]
];
UNKNOWN - The WMI query had problems. You might have your username/password wrong or the user's access level is too low. Wmic error text on the next line.
[librpc/rpc/dcerpc_util.c:1290:dcerpc_pipe_auth_recv()] Failed to bind to uuid 4d9f4ab8-7d1c-11cf-861e-0020af6e7c57 - NT_STATUS_NET_WRITE_FAULT
[librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000022) in dcerpc_pipe_connect_b_recv
[wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied