summaryrefslogtreecommitdiffstats
path: root/plugins/check_mrtgtraf.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_mrtgtraf.c')
-rw-r--r--plugins/check_mrtgtraf.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c
index 0583002..94e6e08 100644
--- a/plugins/check_mrtgtraf.c
+++ b/plugins/check_mrtgtraf.c
@@ -197,27 +197,26 @@ main (int argc, char **argv)
197 if (incoming_rate > incoming_critical_threshold 197 if (incoming_rate > incoming_critical_threshold
198 || outgoing_rate > outgoing_critical_threshold) { 198 || outgoing_rate > outgoing_critical_threshold) {
199 result = STATE_CRITICAL; 199 result = STATE_CRITICAL;
200 asprintf (&error_message, "%s. In = %0.1f %s, %s. Out = %0.1f %s", 200 asprintf (&error_message, "Traffic CRITICAL %s. In = %0.1f %s, %s. Out = %0.1f %s",
201 (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate, 201 (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate,
202 incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max", 202 incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max",
203 adjusted_outgoing_rate, outgoing_speed_rating); 203 adjusted_outgoing_rate, outgoing_speed_rating);
204 } 204 }
205 else if (incoming_rate > incoming_warning_threshold 205 else if (incoming_rate > incoming_warning_threshold
206 || outgoing_rate > outgoing_warning_threshold) { 206 || outgoing_rate > outgoing_warning_threshold) {
207 result = STATE_WARNING; 207 result = STATE_WARNING;
208 asprintf (&error_message, "%s. In = %0.1f %s, %s. Out = %0.1f %s", 208 asprintf (&error_message, "Traffic WARNING %s. In = %0.1f %s, %s. Out = %0.1f %s",
209 (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate, 209 (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate,
210 incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max", 210 incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max",
211 adjusted_outgoing_rate, outgoing_speed_rating); 211 adjusted_outgoing_rate, outgoing_speed_rating);
212 } 212 }
213 213 else if (result == STATE_OK)
214 if (result == STATE_OK) 214 printf ("Traffic OK - %s. In = %0.1f %s, %s. Out = %0.1f %s\n",
215 printf ("Traffic ok - %s. In = %0.1f %s, %s. Out = %0.1f %s\n", 215 (use_average == TRUE) ? "Avg" : "Max", adjusted_incoming_rate,
216 (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate, 216 incoming_speed_rating, (use_average == TRUE) ? "Avg" : "Max",
217 incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max",
218 adjusted_outgoing_rate, outgoing_speed_rating); 217 adjusted_outgoing_rate, outgoing_speed_rating);
219 else 218 else
220 printf ("%s\n", error_message); 219 printf ("UNKNOWN %s\n", error_message);
221 220
222 return result; 221 return result;
223} 222}