diff options
author | Greg Cox <gcox@fibbsbozza.local> | 2014-07-29 18:52:12 -0400 |
---|---|---|
committer | Greg Cox <gcox@fibbsbozza.local> | 2014-07-29 18:52:12 -0400 |
commit | 4273dd06ff3e52094d6b267d00e8c51dd74de364 (patch) | |
tree | 425d127da5dbec7013999ed01b469fc3f72992d9 /plugins/check_dns.c | |
parent | f05e7016320f4671fbf86cc5abc277efea20f79e (diff) | |
parent | 6f3d5825b203b75aef8d68bf0d117e7a1a4c0616 (diff) | |
download | monitoring-plugins-4273dd0.tar.gz |
Merge remote-tracking branch 'upstream/master'
Conflicts:
plugins/netutils.c
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r-- | plugins/check_dns.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index eebe72cc..31a953d7 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c | |||
@@ -242,7 +242,23 @@ 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", | ||
247 | TRUE, time_thresholds->warning->end, | ||
248 | TRUE, time_thresholds->critical->end, | ||
249 | TRUE, 0, FALSE, 0)); | ||
250 | } else if ((time_thresholds->warning == NULL) && (time_thresholds->critical != NULL)) { | ||
251 | printf ("|%s\n", fperfdata ("time", elapsed_time, "s", | ||
252 | FALSE, 0, | ||
253 | TRUE, time_thresholds->critical->end, | ||
254 | TRUE, 0, FALSE, 0)); | ||
255 | } else if ((time_thresholds->warning != NULL) && (time_thresholds->critical == NULL)) { | ||
256 | printf ("|%s\n", fperfdata ("time", elapsed_time, "s", | ||
257 | TRUE, time_thresholds->warning->end, | ||
258 | FALSE, 0, | ||
259 | TRUE, 0, FALSE, 0)); | ||
260 | } else | ||
261 | printf ("|%s\n", fperfdata ("time", elapsed_time, "s", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); | ||
246 | } | 262 | } |
247 | else if (result == STATE_WARNING) | 263 | else if (result == STATE_WARNING) |
248 | printf (_("DNS WARNING - %s\n"), | 264 | printf (_("DNS WARNING - %s\n"), |