checkuptime module calc fail
- This topic has 2 replies, 2 voices, and was last updated 3 years, 9 months ago by
dbrasco.
- AuthorPosts
- 2021-09-23 at 12:56 AM #542
dbrasco
Participanthello, I’ve been trying to setup this command:
./check_wmi_plus.pl -H 10.25.14.3 -u wmiagent -p Str0ngP@ssw0rd -m checkuptime -c 1day:but I’ve been getting this error:
OK – System Uptime is CALC_FAIL.|’Uptime Minutes’=0min;;1440; ‘Uptime Hours’=0hours; ‘Uptime Days’=0days;the command and the checkuptime module seems pretty straight forward,not sure what the issue could be
2021-09-23 at 7:51 AM #543admin
KeymasterPlease post the output of the command when the -d option is added
2021-09-23 at 9:58 AM #544dbrasco
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;
- AuthorPosts
- You must be logged in to reply to this topic.