diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-01-29 20:57:09 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-01-29 20:57:09 +0000 |
commit | a6ef25afaa4534be02e6ba1e03e86e102326087a (patch) | |
tree | 51529ba97653ca47e96426cc41487a404b599822 /plugins | |
parent | 53cbc4f81194f8766cad96755a9820d9c3a9eafd (diff) | |
download | monitoring-plugins-a6ef25afaa4534be02e6ba1e03e86e102326087a.tar.gz |
Fixed error and success codes (638656 - Paul Dlug)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@271 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_mrtgtraf.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index 05830026..94e6e080 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c @@ -197,27 +197,26 @@ main (int argc, char **argv) if (incoming_rate > incoming_critical_threshold || outgoing_rate > outgoing_critical_threshold) { result = STATE_CRITICAL; - 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", + 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", adjusted_outgoing_rate, outgoing_speed_rating); } else if (incoming_rate > incoming_warning_threshold || outgoing_rate > outgoing_warning_threshold) { result = STATE_WARNING; - 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", + 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", adjusted_outgoing_rate, outgoing_speed_rating); } - - 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", + 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", adjusted_outgoing_rate, outgoing_speed_rating); else - printf ("%s\n", error_message); + printf ("UNKNOWN %s\n", error_message); return result; } |