dbrasco

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: checkuptime module calc fail #544
    dbrasco
    Participant

    *we use an auth file for wmi creds

    `./check_wmi_plus.pl -H <IP ADDRESS> -A /usr/local/nagios/etc/wmi_auth.txt -m checkuptime -c 1day: -d
    Command Line (v1.65): ./check_wmi_plus.pl -H <IP ADDRESS> -A /usr/local/nagios/etc/wmi_auth.txt -m checkuptime -c 1day: -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
    WMI Ini Dir: /usr/local/nagios/libexec
    Round #1 of 1
    QUERY: /usr/bin/wmic ‘-A’ ‘/usr/local/nagios/etc/wmi_auth.txt’ ‘–namespace’ ‘root/cimv2’ ‘//<IP ADDRESS>’ ‘Select SystemUpTime,Frequency_Sys100NS,Timestamp_Object from Win32_PerfRawData_PerfOS_System’
    OUTPUT:
    WMI DATA:$VAR1 = [
    [
    {
    ‘_ChecksOK’ => 1,
    ‘_ItemCount’ => 0
    }
    ]
    ];
    Creating ‘_UptimeSec’ (WMIQuery:0, Row:0) using ‘PERF_ELAPSED_TIME’ (Parameters: SystemUpTime,%.2f)
    WARNING: The value in the requested field (SystemUpTime) does not look like a number – we got ”
    Setting _UptimeSec to CALC_FAIL
    Argument “CALC_FAIL” isn’t numeric in division (/) at ./check_wmi_plus.pl line 5003.
    Testing TEST VALUES $VAR1 = {
    ‘_UptimeHours’ => 0,
    ‘_ChecksOK’ => 1,
    ‘_UptimeMin’ => 0,
    ‘_UptimeDays’ => ‘0’,
    ‘_DisplayTime’ => ‘CALC_FAIL’,
    ‘_UptimeSec’ => ‘CALC_FAIL’,
    ‘_ItemCount’ => 0
    };
    WARNING SPECS: $VAR1 = undef;
    CRITICAL SPECS: $VAR1 = [
    ‘1day:’
    ];
    ———— Critical Check ————
    Testing SPEC: 1day:
    SPEC=_UptimeSec,,1,day,,
    Range Spec – FIELD=_UptimeSec, AT= MIN=1 MINMULTIPLIER=day MAX= MAXMULTIPLIER=
    Testing MIN: ‘1’ for Field _UptimeSec which has value: CALC_FAIL
    Value of 1 multiplied up to 86400 using day * 86400
    Boundary Test not performed since Test Value ‘CALC_FAIL’ is not numeric
    Test Result = 0, Perf Spec=86400, Trigger Display=, Field Tested=_UptimeSec
    ———— Warning Check ————
    ———— End Check ————
    Test Results:
    Warn Perf Specs=$VAR1 = {
    ‘_UptimeSec’ => ”
    };
    Warn Results=$VAR1 = [];
    Critical Perf Spec=$VAR1 = {
    ‘_UptimeSec’ => ‘86400’
    };
    Critical Results=$VAR1 = [

    ];
    Data Passed back from check: $VAR1 = {
    ‘_UptimeHours’ => 0,
    ‘_UptimeMin’ => 0,
    ‘_DisplayMsg’ => ‘OK’,
    ‘_UptimeDays’ => ‘0’,
    ‘_TestResult’ => 0,
    ‘_DisplayTime’ => ‘CALC_FAIL’,
    ‘_UptimeSec’ => ‘CALC_FAIL’,
    ‘_ChecksOK’ => 1,
    ‘_StatusType’ => ‘OK’,
    ‘_ItemCount’ => 0,
    ‘_Triggers’ => ”
    };
    ———- Building Up Display
    Incoming Data $VAR1 = {
    ‘_submode’ => ”,
    ‘_staticsubcriteria’ => ‘1’,
    ‘_UptimeDays’ => ‘0’,
    ‘_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.
    ‘,
    ‘_TestResult’ => 0,
    ‘_DisplayTime’ => ‘CALC_FAIL’,
    ‘_arg5’ => undef,
    ‘_ChecksOK’ => 1,
    ‘_host’ => ‘<IP ADDRESS>’,
    ‘_ignorezerosizedrives’ => ”,
    ‘_nodatamode’ => ”,
    ‘_mode’ => ‘checkuptime’,
    ‘_savedbytefactor’ => ”,
    ‘_ItemCount’ => 0,
    ‘_convertslash’ => undef,
    ‘_arg3’ => ”,
    ‘_UptimeHours’ => 0,
    ‘_forcevariablescriteriaspec’ => ”,
    ‘_UptimeMin’ => 0,
    ‘_DisplayMsg’ => ‘OK’,
    ‘_arg1’ => ”,
    ‘_truncate_output’ => 8192,
    ‘_arg2’ => ”,
    ‘_UptimeSec’ => ‘CALC_FAIL’,
    ‘_timeout’ => ”,
    ‘_StatusType’ => ‘OK’,
    ‘_delay’ => ”,
    ‘_bytefactor’ => 1024,
    ‘_nodataexit’ => ”,
    ‘_arg4’ => undef,
    ‘_Triggers’ => ”
    };
    ——- Processing _DisplayMsg||~|~| – ||
    Complex Format:_DisplayMsg,,~,~, – ,,
    _DisplayMsg||~|~| – || —-> OK –
    ——- Processing _DisplayTime||System Uptime is |~|.||
    Complex Format:_DisplayTime,,System Uptime is ,~,.,,
    _DisplayTime||System Uptime is |~|.|| —-> System Uptime is CALC_FAIL.
    ———- Building Up Performance Data
    ——- Processing _UptimeSec|s|Uptime Seconds
    Complex Format:_UptimeSec,s,Uptime Seconds
    Ignoring perf data since it is not numeric
    ——- Processing _UptimeMin|min|Uptime Minutes
    Complex Format:_UptimeMin,min,Uptime Minutes
    _UptimeMin|min|Uptime Minutes (Field=_UptimeMin) —-> ‘Uptime Minutes’=0min;;1440;
    ——- Processing _UptimeHours|hours|Uptime Hours
    Complex Format:_UptimeHours,hours,Uptime Hours
    _UptimeHours|hours|Uptime Hours (Field=_UptimeHours) —-> ‘Uptime Hours’=0hours;;;
    ——- Processing _UptimeDays|days|Uptime Days
    Complex Format:_UptimeDays,days,Uptime Days
    _UptimeDays|days|Uptime Days (Field=_UptimeDays) —-> ‘Uptime Days’=0days;;;
    ———- Done
    OUT:OK – System Uptime is CALC_FAIL.|’Uptime Minutes’=0min;;1440; ‘Uptime Hours’=0hours; ‘Uptime Days’=0days;

    OK – System Uptime is CALC_FAIL.|’Uptime Minutes’=0min;;1440; ‘Uptime Hours’=0hours; ‘Uptime Days’=0days;

Viewing 1 post (of 1 total)