Check uptime

Overview

Checks and tells how long the system has been running (in days).

Fact Sheet

Check Plugin Download

https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/uptime

Check Interval Recommendation

Every 5 minutes

Can be called without parameters

Yes

Compiled for

Linux, Windows

3rd Party Python modules

psutil

Help

usage: uptime [-h] [-V] [--always-ok] [-c CRIT] [-w WARN]

Tell how long the system has been running.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --always-ok           Always returns OK.
  -c CRIT, --critical CRIT
                        Set the critical threshold for uptime in days. Default: 366
  -w WARN, --warning WARN
                        Set the warning threshold for uptime in days. Default: 180

Usage Examples

./uptime --warning 180 --critical 366

Output:

Up 1W 5D since 2023-05-22 10:36:26

States

  • WARN or CRIT if system uptime is above a given threshold.

Perfdata / Metrics

  • Uptime (seconds)

Credits, License