Linux
banshee/linux-collection/linux/ssh/
uptime
Time since boot of a Linux by SSH, and a recent reboot.
par banshee1 installation2 versions
Uptime of a Linux, by SSH
Returns the time since boot, in hours. A reboot shows as a time since boot shorter than the threshold of "Recent reboot".
How it works
The collector runs cat /proc/uptime and reads its first figure, the seconds since boot.
- Portable:
/proc/uptimeis written by the kernel the same way on Alpine, Debian and Fedora. Nothing is written on the target.
Prerequisites
- an SSH account for monitoring, without write rights;
- the fingerprint of the server's host key, set in
protocol:ssh:fingerprint(not needed when the Security settings trust the first SSH fingerprint presented).
Outputs
| Output | Unit | Meaning |
|---|---|---|
uptime | h | time since boot |
Watches
| Watch | Kind | Defaults | Checked |
|---|---|---|---|
rebooted Recent reboot | below, on uptime | warning 0.5 | yes |
Limits
- A reboot shorter than the interval of the probe is only seen if the threshold is longer than the interval.
- In a container, the time is the host's.