summaryrefslogtreecommitdiffstats
path: root/web/attachments/35427-check_mrtgtraf.c.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/35427-check_mrtgtraf.c.patch')
-rw-r--r--web/attachments/35427-check_mrtgtraf.c.patch41
1 files changed, 41 insertions, 0 deletions
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 @@
1--- check_mrtgtraf.c Thu Nov 14 15:48:42 2002
2+++ check_mrtgtraf.c.orig Thu Nov 14 16:06:15 2002
3@@ -197,26 +197,27 @@
4 if (incoming_rate > incoming_critical_threshold
5 || outgoing_rate > outgoing_critical_threshold) {
6 result = STATE_CRITICAL;
7- asprintf (&error_message, "Traffic CRITICAL %s. In = %0.1f %s, %s. Out = %0.1f %s",
8- (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate,
9- incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max",
10+ asprintf (&error_message, "%s. In = %0.1f %s, %s. Out = %0.1f %s",
11+ (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate,
12+ incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max",
13 adjusted_outgoing_rate, outgoing_speed_rating);
14 }
15 else if (incoming_rate > incoming_warning_threshold
16 || outgoing_rate > outgoing_warning_threshold) {
17 result = STATE_WARNING;
18- asprintf (&error_message, "Traffic WARNING %s. In = %0.1f %s, %s. Out = %0.1f %s",
19- (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate,
20- incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max",
21+ asprintf (&error_message, "%s. In = %0.1f %s, %s. Out = %0.1f %s",
22+ (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate,
23+ incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max",
24 adjusted_outgoing_rate, outgoing_speed_rating);
25 }
26- else if (result == STATE_OK)
27- printf ("Traffic OK - %s. In = %0.1f %s, %s. Out = %0.1f %s\n",
28- (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate,
29- incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max",
30+
31+ if (result == STATE_OK)
32+ printf ("Traffic ok - %s. In = %0.1f %s, %s. Out = %0.1f %s\n",
33+ (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate,
34+ incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max",
35 adjusted_outgoing_rate, outgoing_speed_rating);
36 else
37- printf ("UNKNOWN %s\n", error_message);
38+ printf ("%s\n", error_message);
39
40 return result;
41 }