Skip to content

Invoke-IcingaCheckUptime not workling correct #276

@puseidr

Description

@puseidr

Version: 1.5.0

the cmdlets is not working (correctly) anymore.

the check should be critical when the update is lower than 12h and warning when its lower than 24h, so the old command was:

Invoke-IcingaCheckUptime -Warning '24h: -Critical 12h:

but since 1.5.0 the output is:

[CRITICAL] System Uptime: 327.99d [CRITICAL] System Uptime (327.99d)
\_ [CRITICAL] System Uptime: 327.99d is lower than threshold 12h
| 'system_uptime'=2.833848E+07s;86400:;43200:
2

even the performancedate is messed up

i thought, maybe you siwtched the logic for the check so i've tested without the colon ( : ) but the output doesn't make any sense for me:

PS C:\Windows\system32> Invoke-IcingaCheckUptime -verbosity 3 -Critical 5d
[OK] System Uptime: 327.99d (All must be [OK])
\_ [OK] Last Boot: 07/10/2020 11:20:27
\_ [OK] System Uptime: 327.99d
| 'system_uptime'=2.833808E+07s;;432000
0
PS C:\Windows\system32> Invoke-IcingaCheckUptime -verbosity 3 -Critical 500d
[OK] System Uptime: 327.99d (All must be [OK])
\_ [OK] Last Boot: 07/10/2020 11:20:27
\_ [OK] System Uptime: 327.99d
| 'system_uptime'=2.833809E+07s;;43200000
0
PS C:\Windows\system32> Invoke-IcingaCheckUptime -verbosity 3 -warning 500d
[OK] System Uptime: 327.99d (All must be [OK])
\_ [OK] Last Boot: 07/10/2020 11:20:27
\_ [OK] System Uptime: 327.99d
| 'system_uptime'=2.83381E+07s;43200000;
0
PS C:\Windows\system32> Invoke-IcingaCheckUptime -verbosity 3 -warning 5d
[OK] System Uptime: 327.99d (All must be [OK])
\_ [OK] Last Boot: 07/10/2020 11:20:27
\_ [OK] System Uptime: 327.99d
| 'system_uptime'=2.83381E+07s;432000;

it is always "OK" even if your thresholds are lower or higher then the current value

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions