mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-27 00:58:30 -04:00
check_dns: add warning and critical thresholds to perfdata
This commit is contained in:
parent
7508da9360
commit
79ba1f90db
1 changed files with 8 additions and 1 deletions
|
|
@ -242,7 +242,14 @@ main (int argc, char **argv)
|
|||
}
|
||||
printf (ngettext("%.3f second response time", "%.3f seconds response time", elapsed_time), elapsed_time);
|
||||
printf (_(". %s returns %s"), query_address, address);
|
||||
printf ("|%s\n", fperfdata ("time", elapsed_time, "s", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0));
|
||||
if ((time_thresholds->warning == NULL) || (time_thresholds->critical == NULL)) {
|
||||
printf ("|%s\n", fperfdata ("time", elapsed_time, "s", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0));
|
||||
} else {
|
||||
printf ("|%s\n", fperfdata ("time", elapsed_time, "s",
|
||||
TRUE, time_thresholds->warning->end,
|
||||
TRUE, time_thresholds->critical->end,
|
||||
TRUE, 0, FALSE, 0));
|
||||
}
|
||||
}
|
||||
else if (result == STATE_WARNING)
|
||||
printf (_("DNS WARNING - %s\n"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue