alarming: make native nagios support to dhcpd-pools

This commit makes integrating the command with nagios much easier.

$ dhcpd-pools -c dhcpd.conf -l dhcpd.leases --critical 80 --warning 75
CRITICAL: dhcpd-pools: Ranges; crit: 14 warn: 22 ok: 220 Shared nets; crit: 1 warn: 0 ok: 4

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-06-24 15:32:50 +02:00
parent 5a307703c9
commit 42dd80aeac
6 changed files with 161 additions and 2 deletions

View file

@ -129,6 +129,25 @@ Print total summary header
.PD
.RE
.TP
\fB\-\-warning\fR=\fIpercent\fR
Turn on alarm output format, and specify percentage number which will
cause an alarm. If either a range or shared network will exceed
warning level return value of the command is
.BR 1 .
If critical level is not speficied it defaults to
.BR 90 .
The
.I percent
argument allows fractions to be used. Alarm output is intented to be
used with monitoring, such as Nagios.
.TP
\fB\-\-critical\fR=\fIpercent\fR
The option is similar to warning, with exception of return value which
is
.BR 2 .
If warning level is not specified it defaults to
.BR 80 .
.TP
\fB\-v\fR, \fB\-\-version\fR
Print version information to standard output and exit successfully.
.TP