summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a28ef8e)
raw | patch | inline | side by side (parent: a28ef8e)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Wed, 12 Nov 2003 05:41:28 +0000 (05:41 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Wed, 12 Nov 2003 05:41:28 +0000 (05:41 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@766 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_mrtgtraf.c | patch | blob | history | |
plugins/check_swap.c | patch | blob | history |
index 8cc6ec3a6e433913904785b0e3aa80cbf7a7ffa9..cdb50f31a5adb0037d9e36dfd29e33dbeee1263e 100644 (file)
--- a/plugins/check_mrtgtraf.c
+++ b/plugins/check_mrtgtraf.c
result = STATE_WARNING;
}
- asprintf (&error_message, _("%s. In = %0.1f %s, %s. Out = %0.1f %s\n"),
+ asprintf (&error_message, _("%s. In = %0.1f %s, %s. Out = %0.1f %s|%s %s\n"),
(use_average == TRUE) ? _("Avg") : _("Max"), adjusted_incoming_rate,
incoming_speed_rating, (use_average == TRUE) ? _("Avg") : _("Max"),
adjusted_outgoing_rate, outgoing_speed_rating,
- perfdata("in", adjusted_incoming_rate, incoming_speed_rating,
- incoming_warning_threshold, incoming_warning_threshold,
- incoming_critical_threshold, incoming_critical_threshold,
- TRUE, 0, TRUE, incoming_speed_rating),
- perfdata("in", adjusted_outgoing_rate, outgoing_speed_rating,
- outgoing_warning_threshold, outgoing_warning_threshold,
- outgoing_critical_threshold, outgoing_critical_threshold,
- TRUE, 0, TRUE, outgoing_speed_rating));
+ perfdata("in", (long) adjusted_incoming_rate, incoming_speed_rating,
+ (int) incoming_warning_threshold, (long) incoming_warning_threshold,
+ (int) incoming_critical_threshold, (long) incoming_critical_threshold,
+ TRUE, 0, TRUE, (long) incoming_speed_rating),
+ perfdata("in", (long) adjusted_outgoing_rate, outgoing_speed_rating,
+ (int) outgoing_warning_threshold, (long) outgoing_warning_threshold,
+ (int) outgoing_critical_threshold, (long) outgoing_critical_threshold,
+ TRUE, 0, TRUE, (long) outgoing_speed_rating));
printf (_("Traffic %s - %s\n"), state_text(result), error_message);
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 3bf7d432c9f63839bdcde92cd759c833fdcbea00..6a578abeddd87a2851fd21ea0921e0d35a87d944 100644 (file)
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
asprintf (&status, _(" %d%% free (%lu MB out of %lu MB)%s"),
(100 - percent_used), free_swap, total_swap, status);
- asprintf (&perf, "%s", perfdata ("swap", free_swap, "MB",
- TRUE, max (warn_size/1024, warn_percent/100.0*total_swap),
- TRUE, max (crit_size/1024, crit_percent/100.0*total_swap),
+ asprintf (&perf, "%s", perfdata ("swap", (long) free_swap, "MB",
+ TRUE, (long) max (warn_size/1024, warn_percent/100.0*total_swap),
+ TRUE, (long) max (crit_size/1024, crit_percent/100.0*total_swap),
TRUE, 0,
- TRUE, total_swap));
- die (result, "SWAP %s:%s |%s\n", state_text (result), status, perf);
- return STATE_UNKNOWN;
+ TRUE, (long) total_swap));
+ printf ("SWAP %s:%s |%s\n", state_text (result), status, perf);
+ return result;
}