When --warning or --critical thresholds are defined with text output lines
that exceed threshold will be either yellow (warning) or red (critical).
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
There is too much repetative confusing maths near printouts. Move that
stuff to a function.
This change also fixes --snet-alarms option counting issue in range that
were not part of any shared network were ignored.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This makes 'range6 123::/45' style cidr notation to be understood as address
range. Earlier ranges that used cidr failed to parse completely.
Reported-by: Jeff Bailey <jeffrey.bailey@bt.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Current output makes some false-positives for situations when multiple
ranges are specified inside single network, for example:
subnet 10.0.0.0 netmask 255.255.254.0 {
...
range 10.0.0.1 10.0.0.254;
range 10.0.1.1 10.0.1.253;
...
}
An alert for range 10.0.0.1 - 10.0.0.254 will be raised even in situations
when range 10.0.1.1 - 10.0.1.253 is completely empty. To cope with this
issue, an -A option is added to treat all single networks as shared-network.
This option changes output for both range and shared networks output if
specified. Frankly saying, using network CIDR as network name is much more
sane for me than 'All Networks'.
Signed-off-by: Boris Lytochkin <lytboris@yandex-team.ru>
It is too difficult to know what users might want to do. Maybe some run
this software all the time from a monitoring system, and in cases like that
it is best to have caches helping.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
It seems that one can reach the abort() with severely broken configuration
file, that is extremely unlikely to run without parser error when given to
ISC dhcpd. So such files ought to be impossible, and it is good enough for
this software to report position where parsing cannot be continued.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Incomplete html page, that was just a html table, was removed some time ago
but deprecated option arguments were unfortunately left to manual that are
now removed.
Reference: 1299737d76
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Most of these functions take pointers as input argument, so they cannot be
considered neiter const or pure. In same go fix few issues noticed when
compiling with smatch.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This makes compiler to options not to be shown when running make, and that
allows noticing warnings more easily.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
src/dhcpd-pools.c:193:18: warning: comparison of integers of different
signs: 'int' and 'unsigned long' [-Wsign-compare]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The html format is done using Bootstrap and DataTables. That deprecatated
need for having cgi to wrap dhcpd-pools.
Reference: 1299737d76
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Options -p or --perfdata (in alarming mode) now enable the output of
additional performance data, i.e. used, touched and backup addresses per
subnet.
Signed-off-by: Manuel Hachtkemper <hacman@math.uni-bonn.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>