Re: Windows process Monitoring
Posted: Tue Dec 19, 2017 4:02 am
Ok I seem to getting this error now:
Code: Select all
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_scales__.state
Checking previous data's expiry - Timestamp 1513673960 vs Expiry After 1513670362 (Keep State Expiry setting is 3600sec)
Using Existing WMI DATA of:$VAR1 = [
[
{
'_ItemCount' => '0',
'_KeepStateCreateTimestamp' => 1513673960
}
]
];
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 "scales%"'
OUTPUT:
WMI DATA:$VAR1 = [
[
{
'_ChecksOK' => 1,
'_KeepStateSamplePeriod' => 2,
'_ItemCount' => '0',
'_KeepStateCreateTimestamp' => 1513673960
}
],
[
{
'_ItemCount' => 0
}
]
];
Storing new WMI results in the state file $VAR1 = [
[
{
'_KeepStateCreateTimestamp' => 1513673963,
'_ItemCount' => 0
}
]
];
Copying predefined fields to the last WMI result set [0] to [1]
NEW WMI DATA:$VAR1 = [
[
{
'_ItemCount' => '0'
}
],
[
{
'_KeepStateSamplePeriod' => 2,
'_ChecksOK' => 1,
'_KeepStateCreateTimestamp' => 1513673960,
'_ItemCount' => 0
}
]
];
JOIN PARAMETERS $VAR1 = [];
$VAR2 = [];
$VAR3 = [
[
{
'_ItemCount' => '0'
}
],
[
{
'_KeepStateSamplePeriod' => 2,
'_ChecksOK' => 1,
'_KeepStateCreateTimestamp' => 1513673960,
'_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.