mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
output: make output limits to apply to alarm return values
The earlier behavior made alarming nearly impossible to use for shared networks only, as they often are expected to be whole lot less full than ranges. Unfortunately if a alarm level was exceeded either by range or shared network the exit value changed. In most of the cases that lead alarms to be sent, without sensible message. Reported-by: Dan Pritts <danno@umich.edu> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
7de719a80c
commit
08c9bcc502
1 changed files with 2 additions and 2 deletions
|
|
@ -1061,11 +1061,11 @@ int output_alarming(void)
|
|||
shared_p++;
|
||||
}
|
||||
}
|
||||
if (0 < rc || 0 < sc) {
|
||||
if ((0 < rc && config.output_limit[1] & BIT1) || (0 < sc && config.output_limit[1] & BIT2)) {
|
||||
ret_val = 2;
|
||||
fprintf(outfile, "CRITICAL: %s: ",
|
||||
program_name);
|
||||
} else if (0 < rw || 0 < sw) {
|
||||
} else if ((0 < rw && config.output_limit[1] & BIT1) || (0 < sw && config.output_limit[1] & BIT2)) {
|
||||
ret_val = 1;
|
||||
fprintf(outfile, "WARNING: %s: ",
|
||||
program_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue