Commit graph

445 commits

Author SHA1 Message Date
Sami Kerola
8fe7dc2c03
other: add --skip-ok to usage() output
Forgot in previous commit.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-11-06 22:34:06 +00:00
Sami Kerola
c55c823753
output: add --skip-ok option
Omit ranges and shared networks that do not exceed warning or critical
thresholds.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-11-06 22:11:47 +00:00
Sami Kerola
e079cc16e0
output: include earlier missing data to json output
This commit adds all the data that is in text output to json output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-11-06 21:39:15 +00:00
Sami Kerola
344ed2900d
output: add color support to text output
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>
2017-11-06 21:31:57 +00:00
Sami Kerola
48962004b8
output: add output helper functions
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>
2017-11-05 16:21:20 +00:00
Sami Kerola
05f8208518
getdata: fix typo
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-11-05 10:01:07 +00:00
Sami Kerola
abf5d04736
output: make output_analysis() to be regular function
This commit makes it possible to define alarming thresholds at the same time
with other output formats.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-11-05 09:51:35 +00:00
Sami Kerola
9deeae8c36
update sitemap
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-23 09:18:35 +01:00
Sami Kerola
548ce63963
release: update web page meta data
This should have been done before tag.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-23 08:53:18 +01:00
Sami Kerola
58a31513fe
release: 2.29
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-23 08:17:38 +01:00
Sami Kerola
804aa3236d
docs: update maintainer gpg key
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-17 09:50:55 +01:00
Sami Kerola
af1ae94112
docs: add build instruction link to the project web page
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-17 09:17:15 +01:00
Sami Kerola
fefd8d26cf
docs: tell what needs to be done when releasing new version
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-17 09:00:25 +01:00
Sami Kerola
1d47eb9a1c
docs: update doxygen configuration file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-17 08:43:19 +01:00
Sami Kerola
0c32a67ff1
build-sys: update bootstrap from gnulib
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-17 08:41:41 +01:00
Sami Kerola
bb0fa9adae
getdata: add cidr range support
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>
2017-09-17 00:03:06 +01:00
Sami Kerola
48d0629881
lib: update .gitignore
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-09 10:29:04 +01:00
Sami Kerola
782f63c3ad
add --ip-version option to force either IPv4 or IPv6 analysis
Proposed-by: Jeff Balley <jeffrey.bailey@bt.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-09-09 10:28:27 +01:00
Boris Lytochkin
b9cff0d814
introduce -A arg: treat single subnets as shared-network with CIDR as their name
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>
2017-07-15 17:26:15 +01:00
Sami Kerola
dff991666e
lib: update .gitignore
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-21 17:30:24 +01:00
Sami Kerola
242ef3109b
variable: add const to print_mac_addreses_tmp
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-21 17:21:57 +01:00
Sami Kerola
1c8b799799
fix typo
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-06 16:44:19 +01:00
Sami Kerola
e93fc5dba4
lib: update .gitignore
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-15 20:42:58 +01:00
Sami Kerola
c3c3fc6e40
getdata: fpos_t is not easy to print correctly
On some systems fpos_t may be a complex object, so printing it is not as
easy as ftell() position.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-15 20:42:07 +01:00
Sami Kerola
e9223a852c
contrib: Klaus Slott told about opensuse package
Add opensuse rpm as an example how to build one.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-10 13:12:34 +01:00
Sami Kerola
9a52619385
style: use same argument names in header and source file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-07 22:56:19 +01:00
Sami Kerola
2b75a0d78e
getdata: remove POSIX_FADV_NOREUSE
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>
2017-02-04 23:11:43 +00:00
Sami Kerola
344e01c1f6
output: add include avoid referringt to undefined definition
Reference: c4a654a149
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-02-04 18:00:02 +00:00
Sami Kerola
c4a654a149
output: fix timestamp localization on html page
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-01-12 22:40:33 +00:00
Sami Kerola
a905b50943
getdata: report position in config file when parsing fails
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>
2017-01-08 11:49:41 +00:00
Sami Kerola
ae2edb0fbc
man: remove old html table only option argument from manual
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>
2017-01-07 11:01:22 +00:00
Sami Kerola
5eae1b41a7
man: improve synopsis and output limit
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-01-06 23:36:36 +00:00
Sami Kerola
ea7fd91876
remove const and pure function attributes
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>
2017-01-06 23:14:28 +00:00
Sami Kerola
11c0b23d77
portability: add gnulib modules earlier missing
Found with help if autoscan.  In same go update lib/.gitignore file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-01-06 22:33:08 +00:00
Sami Kerola
aaad35a8c9
output: remove unnecessary increment
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-01-02 21:21:27 +00:00
Sami Kerola
a6b77ab785
docs: fix couple typos and improve a sentence in README
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-10-02 21:35:29 +01:00
Sami Kerola
7740927721
build-sys: always use restrict found by autoconf
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-08-16 13:25:23 +01:00
Sami Kerola
9bb30b29ca
build-sys: default to ./configure --enable-silent-rules
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>
2016-08-15 21:18:29 +01:00
Sami Kerola
1b35a16d95
analyze: use while() when for() is less fit to purpose
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-07-03 14:00:00 +01:00
Sami Kerola
d26c858c13
build-sys: update gnulib .gitignore file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-05-29 21:22:13 +01:00
Sami Kerola
840d2143e6
build-sys: update bootstrap from gnulib
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-05-29 21:20:39 +01:00
Sami Kerola
a3ef3d617f
output: check alarming mode can output successfully
Fixes also a resource leak.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-24 12:29:50 +01:00
Sami Kerola
f6e256243d
fix doap file git repository and license section
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-23 22:55:21 +01:00
Sami Kerola
ccd5370d9c
add dhcpd-pools Description Of A Project file
Reference: https://github.com/edumbill/doap/wiki
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-23 22:33:08 +01:00
Sami Kerola
c4ebafb106
argument parsing: fix compiler warning
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>
2016-04-23 16:35:38 +01:00
Sami Kerola
87c06a1b13
getdata: get rid of remaining stdbool usage
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-23 16:32:08 +01:00
Sami Kerola
8a8c28a17e
contrib: remove awk file duplicate
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-01 23:11:37 +01:00
Sami Kerola
5a33b619d1
contrib: remove unnecessary cgi script
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>
2016-04-01 23:11:37 +01:00
Sami Kerola
e5f9a77511
contrib: add archlinux package build file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-01 23:11:36 +01:00
Manuel Hachtkemper
32e2d399a0
alarming: add additional performance data
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>
2016-03-31 22:34:27 +01:00