Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- check_wmi_plus.pl -H HOST -u USER -p PASS -m checkcpu -d
- Creating '_AvgCPU' (WMIQuery:1, Row:0) using 'PERF_100NSEC_TIMER_INV' (Parameters: PercentProcessorTime,%.2f,100)
- WARNING: The value in the requested field (PercentProcessorTime) does not look like a number - we got ''
- Setting _AvgCPU to CALC_FAIL
- pi@raspberrypi:~ $ /usr/local/nagios/libexec/check_wmi_plus.pl -H
- > 192.168.1.10 -u ***** -p ***** -m checkcpu -d Command Line (v1.61):
- > /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.1.10 -u USER -p
- > PASS -m checkcpu -d Base Dir: /usr/local/nagios/libexec Conf File Dir:
- > /etc/check_wmi_plus Loaded Conf File
- > /etc/check_wmi_plus/check_wmi_plus.conf
- > WMI Ini Dir: /etc/check_wmi_plus/check_wmi_plus.d
- > Starting Keep State Mode
- > STATE FILE: /tmp/cwpss_checkcpu__192168110___.state
- > Checking previous data's expiry - Timestamp 1483456739 vs Expiry After
- > 1483453146 (Keep State Expiry setting is 3600sec) Using Existing WMI
- > DATA
- > of:$VAR1 = [
- > [
- > {
- > '_ChecksOK' => 1,
- > '_KeepStateCreateTimestamp' => 1483456739,
- > '_ItemCount' => 0
- > }
- > ]
- > ];
- > Round #2 of 2
- > QUERY: /usr/bin/wmic '-U' 'USER%PASS' '--namespace' 'root/cimv2'
- > '//192.168.1.10' 'select PercentProcessorTime,Timestamp_Sys100NS from
- > Win32_PerfRawData_PerfOS_Processor where Name="_Total"'
- > OUTPUT:
- > WMI DATA:$VAR1 = [
- > [
- > {
- > '_KeepStateCreateTimestamp' => 1483456739,
- > '_ItemCount' => 0,
- > '_ChecksOK' => 2,
- > '_KeepStateSamplePeriod' => 7
- > }
- > ],
- > [
- > {
- > '_ItemCount' => 0
- > }
- > ]
- > ];
- > Storing new WMI results in the state file $VAR1 = [
- > [
- > {
- > '_ItemCount' => 0
- > }
- > ]
- > ];
- > Copying predefined fields to the last WMI result set [0] to [1] NEW
- > WMI
- > DATA:$VAR1 = [
- > [
- > {
- > '_ItemCount' => 0
- > }
- > ],
- > [
- > {
- > '_ItemCount' => 0,
- > '_KeepStateCreateTimestamp' => 1483456739,
- > '_ChecksOK' => 2,
- > '_KeepStateSamplePeriod' => 7
- > }
- > ]
- > ];
- > Creating '_AvgCPU' (WMIQuery:1, Row:0) using 'PERF_100NSEC_TIMER_INV'
- > (Parameters: PercentProcessorTime,%.2f,100)
- > WARNING: The value in the requested field (PercentProcessorTime) does
- > not look like a number - we got ''
- > Setting _AvgCPU to CALC_FAIL
- > Testing TEST VALUES $VAR1 = {
- > '_ItemCount' => 0,
- > '_KeepStateCreateTimestamp' => 1483456739,
- > '_AvgCPU' => 'CALC_FAIL',
- > '_ChecksOK' => 2,
- > '_KeepStateSamplePeriod' => 7
- > };
- > WARNING SPECS: $VAR1 = undef;
- > CRITICAL SPECS: $VAR1 = undef;
- > ------------ Critical Check ------------
- > ------------ Warning Check ------------
- > ------------ End Check ------------
- > Data Passed back from check: $VAR1 = {
- > '_DisplayMsg' => 'OK (Sample Period 7 sec)',
- > '_KeepStateSamplePeriod' => 7,
- > '_KeepStateCreateTimestamp' => 1483456739,
- > '_TestResult' => 0,
- > '_Triggers' => '',
- > '_AvgCPU' => 'CALC_FAIL',
- > '_ChecksOK' => 2,
- > '_ItemCount' => 0,
- > '_StatusType' => 'OK (Sample Period 7 sec)'
- > };
- > ---------- Building Up Display
- > Incoming Data $VAR1 = {
- > '_nodatamode' => '',
- > '_delay' => 7,
- > '_timeout' => '',
- > '_KeepStateSamplePeriod' => 7,
- > '_KeepStateCreateTimestamp' => 1483456739,
- > '_arg5' => undef,
- > '_savedbytefactor' => '',
- > '_arg1' => '',
- > '_StatusType' => 'OK (Sample Period 7 sec)',
- > '_mode' => 'checkcpu',
- > '_arg4' => undef,
- > '_DisplayMsg' => 'OK (Sample Period 7 sec)',
- > '_submode' => '',
- > '_arg3' => '',
- > '_TestResult' => 0,
- > '_host' => '192.168.1.10',
- > '_nodatastring' => '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.
- > ',
- > '_arg2' => '',
- > '_Triggers' => '',
- > '_AvgCPU' => 'CALC_FAIL',
- > '_ChecksOK' => 2,
- > '_bytefactor' => 1024,
- > '_truncate_output' => 8192,
- > '_ItemCount' => 0,
- > '_nodataexit' => ''
- > };
- > ------- Processing _DisplayMsg||~|~| - || Complex
- > Format:_DisplayMsg,,~,~, - ,, _DisplayMsg||~|~| - || ----> OK (Sample
- > Period 7 sec) -
- > ------- Processing _AvgCPU|%|Average CPU Utilisation| |~|| Complex
- > Format:_AvgCPU,%,Average CPU Utilisation, ,~,, _AvgCPU|%|Average CPU
- > Utilisation| |~|| ----> Average CPU Utilisation CALC_FAIL%
- > ---------- Building Up Performance Data
- > ------- Processing _AvgCPU|%|Avg CPU Utilisation Complex
- > Format:_AvgCPU,%,Avg CPU Utilisation Ignoring perf data since it is
- > not numeric
- > ---------- Done
- > OUT:OK (Sample Period 7 sec) - Average CPU Utilisation CALC_FAIL%
- >
- > OK (Sample Period 7 sec) - Average CPU Utilisation CALC_FAIL%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement