From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/35427-check_mrtgtraf.c.patch | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 web/attachments/35427-check_mrtgtraf.c.patch (limited to 'web/attachments/35427-check_mrtgtraf.c.patch') diff --git a/web/attachments/35427-check_mrtgtraf.c.patch b/web/attachments/35427-check_mrtgtraf.c.patch new file mode 100644 index 0000000..3fb92b9 --- /dev/null +++ b/web/attachments/35427-check_mrtgtraf.c.patch @@ -0,0 +1,41 @@ +--- check_mrtgtraf.c Thu Nov 14 15:48:42 2002 ++++ check_mrtgtraf.c.orig Thu Nov 14 16:06:15 2002 +@@ -197,26 +197,27 @@ + if (incoming_rate > incoming_critical_threshold + || outgoing_rate > outgoing_critical_threshold) { + result = STATE_CRITICAL; +- asprintf (&error_message, "Traffic CRITICAL %s. In = %0.1f %s, %s. Out = %0.1f %s", +- (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate, +- incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max", ++ asprintf (&error_message, "%s. In = %0.1f %s, %s. Out = %0.1f %s", ++ (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate, ++ incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max", + adjusted_outgoing_rate, outgoing_speed_rating); + } + else if (incoming_rate > incoming_warning_threshold + || outgoing_rate > outgoing_warning_threshold) { + result = STATE_WARNING; +- asprintf (&error_message, "Traffic WARNING %s. In = %0.1f %s, %s. Out = %0.1f %s", +- (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate, +- incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max", ++ asprintf (&error_message, "%s. In = %0.1f %s, %s. Out = %0.1f %s", ++ (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate, ++ incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max", + adjusted_outgoing_rate, outgoing_speed_rating); + } +- else if (result == STATE_OK) +- printf ("Traffic OK - %s. In = %0.1f %s, %s. Out = %0.1f %s\n", +- (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate, +- incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max", ++ ++ if (result == STATE_OK) ++ printf ("Traffic ok - %s. In = %0.1f %s, %s. Out = %0.1f %s\n", ++ (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate, ++ incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max", + adjusted_outgoing_rate, outgoing_speed_rating); + else +- printf ("UNKNOWN %s\n", error_message); ++ printf ("%s\n", error_message); + + return result; + } -- cgit v1.2.3-74-g34f1