mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
build-sys: make alarm warning & critical default configurable
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
7e403b50b4
commit
9df90042e2
3 changed files with 16 additions and 6 deletions
14
configure.ac
14
configure.ac
|
|
@ -108,6 +108,20 @@ AC_ARG_WITH([output-limit],
|
|||
AC_DEFINE_UNQUOTED([OUTPUT_LIMIT], ["$output_limit"], [default output limit])
|
||||
AC_SUBST([OUTPUT_LIMIT], [$output_limit])
|
||||
|
||||
AC_ARG_WITH([warning],
|
||||
[AC_HELP_STRING([--with-warning=NUM], [monitoring warning default])],
|
||||
[warning_percent="$withval"],
|
||||
[warning_percent="80"])
|
||||
AC_DEFINE_UNQUOTED([ALARM_WARN], [$warning_percent], [monitoring warning default])
|
||||
AC_SUBST([ALARM_WARN], [$warning_percent])
|
||||
|
||||
AC_ARG_WITH([critical],
|
||||
[AC_HELP_STRING([--with-critical=NUM], [monitoring critical default])],
|
||||
[critical_percent="$withval"],
|
||||
[critical_percent="90"])
|
||||
AC_DEFINE_UNQUOTED([ALARM_CRIT], [$critical_percent], [monitoring critical default])
|
||||
AC_SUBST([ALARM_CRIT], [$critical_percent])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
lib/Makefile
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ If only range monitoring is needed one can limit output by using option
|
|||
and for shared network monitoring similar is
|
||||
.IR \-L20 .
|
||||
If critical level is not speficied it defaults to
|
||||
.BR 90 .
|
||||
.BR @ALARM_WARN@ .
|
||||
The
|
||||
.I percent
|
||||
argument allows fractions to be used. Alarm output is intended to be
|
||||
|
|
@ -145,7 +145,7 @@ 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 .
|
||||
.BR @ALARM_CRIT@ .
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
Print version information to standard output and exit successfully.
|
||||
|
|
|
|||
|
|
@ -45,8 +45,4 @@ static const unsigned int SHARED_NETWORKS = 8192;
|
|||
/* Maximum number of ranges */
|
||||
unsigned int RANGES;
|
||||
|
||||
/* Alarming defaults */
|
||||
#define ALARM_WARN 80
|
||||
#define ALARM_CRIT 90
|
||||
|
||||
#endif /* DEFAULTS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue