NAME
Monitoring::Sneck::Checks::uptime - checks how long the host has been up
VERSION
Version 0.0.1
SYNOPSIS
rebooted|perl:uptime
rebooted_or_stale|perl:uptime -w 900:7776000
DESCRIPTION
Checks the seconds the host has been up against the ranges, so by default being up under 15 minutes, as after a reboot no one planned, is WARNING. A upper end, such as 7776000 for 90 days, catches hosts that have gone too long without one.
On Linux it is read from /proc/uptime, and on FreeBSD from kern.boottime through BSD::Sysctl. Other OSes are UNKNOWN.
OPTIONS
- -w, --warning :: Range of seconds up. Default :: 900:
- -c, --critical :: Range of seconds up.
METHODS
check
Does the check.
seconds_up
Returns the seconds the host has been up. Dies if it can not be found.