diff options
author | Jean-Claude Computing <jeanclaude.computing@gmail.com> | 2014-02-26 16:33:40 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2014-06-28 20:01:16 (GMT) |
commit | 79ba1f90dbb9f29871f09bfd6a95cba2ed86ee5d (patch) | |
tree | 8c09d9821db5e3a57e8416dfc32ad152413f63d0 /plugins | |
parent | 7508da9360a77c6799e74a8109b768a1b8fbba11 (diff) | |
download | monitoring-plugins-79ba1f90dbb9f29871f09bfd6a95cba2ed86ee5d.tar.gz |
check_dns: add warning and critical thresholds to perfdata
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_dns.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index eebe72c..a2a92f4 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c | |||
@@ -242,7 +242,14 @@ main (int argc, char **argv) | |||
242 | } | 242 | } |
243 | printf (ngettext("%.3f second response time", "%.3f seconds response time", elapsed_time), elapsed_time); | 243 | printf (ngettext("%.3f second response time", "%.3f seconds response time", elapsed_time), elapsed_time); |
244 | printf (_(". %s returns %s"), query_address, address); | 244 | printf (_(". %s returns %s"), query_address, address); |
245 | printf ("|%s\n", fperfdata ("time", elapsed_time, "s", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); | 245 | if ((time_thresholds->warning == NULL) || (time_thresholds->critical == NULL)) { |
246 | printf ("|%s\n", fperfdata ("time", elapsed_time, "s", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); | ||
247 | } else { | ||
248 | printf ("|%s\n", fperfdata ("time", elapsed_time, "s", | ||
249 | TRUE, time_thresholds->warning->end, | ||
250 | TRUE, time_thresholds->critical->end, | ||
251 | TRUE, 0, FALSE, 0)); | ||
252 | } | ||
246 | } | 253 | } |
247 | else if (result == STATE_WARNING) | 254 | else if (result == STATE_WARNING) |
248 | printf (_("DNS WARNING - %s\n"), | 255 | printf (_("DNS WARNING - %s\n"), |