Configure Check_Uptime Thresholds? (Less than and not greater than)


Hey All,

We use NSClient to notify on uptime. Currently, we’re setup like this:

check_uptime "warn=uptime < 1h" "crit=uptime < 10m"

However, I would love to have a threshold set on the “other side” of the uptime spectrum. It would be very helpful to have NSClient warn anything that’s been up for less than 1 day, and up for longer than 3 months, and critical on anything that’s been up for less than 1 hour, and more than a year.

Other checks are able to use this notation: -w 86400:776000 -c 3600:31536000

But I’m unsure how to configure NSClient to warn on these values. I tired: check_uptime "warn=1d<uptime<3months"

but that broke the check. Does NSClient have the capability to monitor like this?


The expression language is similar to SQL:

check_uptime "warn=uptime < 1d or uptime > 3m"


Thank you!