diff options
-rw-r--r-- | plugins/check_mrtg.c | 6 | ||||
-rw-r--r-- | plugins/check_nt.c | 10 |
2 files changed, 7 insertions, 9 deletions
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index 5924f179..e1382644 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c | |||
@@ -140,9 +140,9 @@ main (int argc, char **argv) | |||
140 | asprintf (&message, "%s. %s = %lu %s|%s", | 140 | asprintf (&message, "%s. %s = %lu %s|%s", |
141 | (use_average == TRUE) ? _("Avg") : _("Max"), | 141 | (use_average == TRUE) ? _("Avg") : _("Max"), |
142 | label, rate, units, | 142 | label, rate, units, |
143 | perfdata(label, rate, units, | 143 | perfdata(label, (long) rate, units, |
144 | value_warning_threshold, value_warning_threshold, | 144 | (int) value_warning_threshold, (long) value_warning_threshold, |
145 | value_critical_threshold, value_critical_threshold, | 145 | (int) value_critical_threshold, (long) value_critical_threshold, |
146 | 0, 0, 0, 0)); | 146 | 0, 0, 0, 0)); |
147 | } | 147 | } |
148 | 148 | ||
diff --git a/plugins/check_nt.c b/plugins/check_nt.c index 91442a5a..50bf9f03 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c | |||
@@ -118,7 +118,7 @@ int main(int argc, char **argv){ | |||
118 | asprintf (&output_message, _("Wrong client version - running: %s, required: %s"), recv_buffer, value_list); | 118 | asprintf (&output_message, _("Wrong client version - running: %s, required: %s"), recv_buffer, value_list); |
119 | return_code = STATE_WARNING; | 119 | return_code = STATE_WARNING; |
120 | } else { | 120 | } else { |
121 | asprintf (&output_message, recv_buffer); | 121 | asprintf (&output_message, "%s", recv_buffer); |
122 | return_code = STATE_OK; | 122 | return_code = STATE_OK; |
123 | } | 123 | } |
124 | break; | 124 | break; |
@@ -238,12 +238,11 @@ int main(int argc, char **argv){ | |||
238 | mem_commitLimit / 1048576, mem_commitByte / 1048567, percent_used_space, | 238 | mem_commitLimit / 1048576, mem_commitByte / 1048567, percent_used_space, |
239 | (mem_commitLimit - mem_commitByte) / 1048576, (mem_commitLimit - mem_commitByte) / mem_commitLimit * 100); | 239 | (mem_commitLimit - mem_commitByte) / 1048576, (mem_commitLimit - mem_commitByte) / mem_commitLimit * 100); |
240 | 240 | ||
241 | return_code=STATE_OK; | ||
241 | if(check_critical_value==TRUE && percent_used_space >= critical_value) | 242 | if(check_critical_value==TRUE && percent_used_space >= critical_value) |
242 | return_code=STATE_CRITICAL; | 243 | return_code=STATE_CRITICAL; |
243 | else if (check_warning_value==TRUE && percent_used_space >= warning_value) | 244 | else if (check_warning_value==TRUE && percent_used_space >= warning_value) |
244 | return_code=STATE_WARNING; | 245 | return_code=STATE_WARNING; |
245 | else | ||
246 | return_code=STATE_OK; | ||
247 | 246 | ||
248 | break; | 247 | break; |
249 | 248 | ||
@@ -273,13 +272,12 @@ int main(int argc, char **argv){ | |||
273 | return_code=STATE_OK; | 272 | return_code=STATE_OK; |
274 | } | 273 | } |
275 | else { /* inverse thresholds */ | 274 | else { /* inverse thresholds */ |
275 | return_code=STATE_OK; | ||
276 | if(check_critical_value==TRUE && counter_value <= critical_value) | 276 | if(check_critical_value==TRUE && counter_value <= critical_value) |
277 | return_code=STATE_CRITICAL; | 277 | return_code=STATE_CRITICAL; |
278 | else if (check_warning_value==TRUE && counter_value <= warning_value) | 278 | else if (check_warning_value==TRUE && counter_value <= warning_value) |
279 | return_code=STATE_WARNING; | 279 | return_code=STATE_WARNING; |
280 | else | 280 | } |
281 | return_code=STATE_OK; | ||
282 | } | ||
283 | } | 281 | } |
284 | break; | 282 | break; |
285 | 283 | ||