mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 08:16:59 +00:00
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>
This commit is contained in:
parent
e079cc16e0
commit
c55c823753
4 changed files with 47 additions and 2 deletions
|
|
@ -111,6 +111,7 @@ int main(int argc, char **argv)
|
|||
OPT_WARN_COUNT,
|
||||
OPT_CRIT_COUNT,
|
||||
OPT_COLOR,
|
||||
OPT_SKIP_OK,
|
||||
OPT_SET_IPV
|
||||
};
|
||||
int ret_val;
|
||||
|
|
@ -119,6 +120,7 @@ int main(int argc, char **argv)
|
|||
{"config", required_argument, NULL, 'c'},
|
||||
{"leases", required_argument, NULL, 'l'},
|
||||
{"color", required_argument, NULL, OPT_COLOR},
|
||||
{"skip-ok", no_argument, NULL, OPT_SKIP_OK},
|
||||
{"format", required_argument, NULL, 'f'},
|
||||
{"sort", required_argument, NULL, 's'},
|
||||
{"reverse", no_argument, NULL, 'r'},
|
||||
|
|
@ -228,6 +230,9 @@ int main(int argc, char **argv)
|
|||
if (config.color_mode == color_unknown)
|
||||
error(EXIT_FAILURE, errno, "unknown color mode: %s", quote(optarg));
|
||||
break;
|
||||
case OPT_SKIP_OK:
|
||||
config.skip_ok = 1;
|
||||
break;
|
||||
case OPT_SNET_ALARMS:
|
||||
config.snet_alarms = 1;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue