Bernd Arnold
6a8564fb44
Fixed error message, added comment
2018-06-17 09:42:25 +02:00
Bernd Arnold
37f9b45266
Drop uptime binary call
...
No need to call /bin/uptime, since the string can be generated with strftime(...).
2018-06-17 09:36:13 +02:00
Bernd Arnold
28f4d144f2
Added help text for range support
2018-06-17 09:20:16 +02:00
Bernd Arnold
b40d660bb3
Remove useless (empty) print
2018-06-17 09:19:55 +02:00
Sven Nierlein
0b9c85109b
fix typo in check_uptime
2018-06-13 20:23:21 +02:00
Bernd Arnold
cf157ef845
Refactoring
...
Better alignment.
Avoid duplications ("Exceeds ... threshold").
2018-06-13 17:28:53 +02:00
Bernd Arnold
db499b6f5b
Introducing ranges for warning and critical
...
Works as before:
-w 1w -c 2w
New (as before, but also warn if uptime < 5m, and crit if uptime < 2m):
-w 5m:1w -c 2m:2w
(idea by @sni)
Also refactored the time calculation, if a suffix is present:
New sub calc_as_seconds($)
2018-06-13 16:56:22 +02:00
Bernd Arnold
a784b19d6f
Modified alignment
2018-06-13 16:10:17 +02:00
Bernd Arnold
9ee884b3de
Fix: Use macro for perl binary
...
I've messed that up in the previous commit 554b702f9d .
2018-06-13 15:57:16 +02:00
Bernd Arnold
5a73671ec6
Fix: Initialize values
...
Otherwise, there's a warning about unitialized values:
Use of uninitialized value $hours in numeric gt (>) at ...
Use of uninitialized value $days in numeric gt (>) at ...
2018-06-09 10:02:23 +02:00
Bernd Arnold
554b702f9d
Fix: uptime_file variable was declared too late
...
When called with --help, the following error was shown:
Use of uninitialized value $uptime_file in concatenation (.) or string at
2018-06-03 20:55:42 +02:00
Bernd Arnold
d5fbf8ae93
Added suffix "s" for seconds in perfdata output
2018-06-03 16:42:34 +02:00
Bernd Arnold
44816b4979
Rename to .pl
...
All other check script also have the .pl ending
2018-06-03 16:05:54 +02:00