Commit graph

5 commits

Author SHA1 Message Date
Andreas Motl
6c8b45a169 check_uptime: Fix lowercase typo in plugin output 2022-02-15 16:31:23 +01:00
Andreas Motl
c99a166a43 check_uptime: Add option to report uptime in days instead of seconds
Currently, the plugin output is:

  CRITICAL: Uptime is 38829029 seconds.

When using the proposed `--days|-d` option, it will be:

  CRITICAL: Uptime is 449 days.
2022-02-15 16:09:47 +01:00
Bernd Arnold
558090a7d8 Added tests for range values 2018-06-13 17:26:51 +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
250adb31ef Added test file 2018-06-03 16:51:43 +02:00