Durations (time units)

Many checks have parameters which expect a time-duration. Traditionally such durations are written in seconds.

Examples:

--critical=60 (60 seconds = 1 minute)

--lookbehind=3600 (3600 seconds = 1 hour)

Long time-durations, like several days or weeks written in seconds, are difficult to calculate and produce long numbers to type, which are prone to errors.

Human readable durations

All of our checks support the specification of time-durations in a human readable format with the following factors:

factor-sign meaning
s (or nothing) second(s)
min minute(s)
h hour(s)
d day(s)
w week(s)

Examples:

--critical=1min can also be written as --critical=60s or just as --critical=60.

--lookbehind=1h can also be written as --lookbehind=60min or --lookbehind=3600s or just as --lookbehind=3600.

Why not month, year, … ?

The math for month and year is anything but clear. A month is something between 28 and 31 days but this bandwidth would lead to surprising results in some cases. So we leave it to our users to decide, if 4w or 30d better fits their expectation on how long a month should be.