check_uptime
Check computer uptime (time since last reboot).
Implementation
| Windows | Linux | FreeBSD | MacOSX |
|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ |
Argument Defaults
| Argument | Default Value |
|---|---|
| warning | uptime < 2d |
| critical | uptime < 1d |
| empty-state | 0 (OK) |
| empty-syntax | |
| top-syntax | %(status) - %(list) |
| ok-syntax | |
| detail-syntax | uptime: %(uptime), boot: %(boot | utc) |
Check Specific Arguments
None
Attributes
Filter Keywords
these can be used in filters and thresholds (along with the default attributes):
| Attribute | Description |
|---|---|
| uptime | Human readable time since last boot |
| uptime_value | Uptime in seconds |
| boot | Unix timestamp of last boot |
Examples
Default Check
check_uptime
OK - uptime: 3d 02:30h, boot: 2023-11-17 19:33:46 UTC |'uptime'=268241s;172800:;86400:
Example using check_snclient and Naemon
Naemon Config
define command{
command_name check_snclient
command_line $USER1$/check_snclient -k -p 'your-password' -u 'https://$HOSTADDRESS$:8443' $ARG1$ $ARG2$
}
define service {
host_name testhost
service_description check_uptime
use generic-service
check_command check_snclient!check_uptime!'warn=uptime < 180s' 'crit=uptime < 60s'
}