mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 08:16:59 +00:00
output: allow user to ignore small ranges and shared networks
Some have configuration which combines small ranges such as one host, and greater address ranges that are important to monitor. Especially the one host ranges tend to cause a lot of false-positive alarms, as they are immediately 100% full when a machine requests an address. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
4becf97fb3
commit
28f1e8c54c
5 changed files with 48 additions and 18 deletions
|
|
@ -72,7 +72,8 @@ int main(int argc, char **argv)
|
|||
struct range_t *tmp_ranges;
|
||||
enum {
|
||||
OPT_WARN = CHAR_MAX + 1,
|
||||
OPT_CRIT
|
||||
OPT_CRIT,
|
||||
OPT_MINSIZE
|
||||
};
|
||||
int ret_val;
|
||||
|
||||
|
|
@ -89,6 +90,7 @@ int main(int argc, char **argv)
|
|||
{"help", no_argument, NULL, 'h'},
|
||||
{"warning", required_argument, NULL, OPT_WARN},
|
||||
{"critical", required_argument, NULL, OPT_CRIT},
|
||||
{"minsize", required_argument, NULL, OPT_MINSIZE},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
|
|
@ -192,6 +194,10 @@ int main(int argc, char **argv)
|
|||
config.critical =
|
||||
strtod_or_err(optarg, "illegal argument");
|
||||
break;
|
||||
case OPT_MINSIZE:
|
||||
config.minsize =
|
||||
strtod_or_err(optarg, "illegal argument");
|
||||
break;
|
||||
case 'v':
|
||||
/* Print version */
|
||||
print_version();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue