[nagiosplug] NEWS: Mention the new "check_snmp --offset" option

Nagios Plugin Development nagios-plugins at users.sourceforge.net
Sun Aug 18 19:50:18 CEST 2013


 Module: nagiosplug
 Branch: master
 Commit: c7c1102fcba72eed4e0a52a700d591fca0a0f668
 Author: Holger Weiss <holger at zedat.fu-berlin.de>
   Date: Sun Aug 18 19:38:57 2013 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=c7c1102

NEWS: Mention the new "check_snmp --offset" option

... and apply two small cosmetic changes to check_snmp.c.

Closes #59.

---

 NEWS                 |    1 +
 plugins/check_snmp.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index d901b1e..df2652f 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ This file documents the major additions and syntax changes between releases.
 	Let check_procs use /proc/<PID>/exe (if available) instead of getpid(2), unless -T is specified
 	Let check_mysql support SSL
 	Let check_mysql add perfromance metrics for all checks
+	New check_snmp --offset option to allow for adding/substracting an offset value to sensor data
 
 	FIXES
 	Change the MAIL FROM command generated by check_smtp to be RFC compliant
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index cd50389..7c3bc4b 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -432,7 +432,7 @@ main (int argc, char **argv)
 			ptr = strpbrk (show, "0123456789");
 			if (ptr == NULL)
 				die (STATE_UNKNOWN,_("No valid data returned (%s)\n"), show);
-			response_value[i] = strtod (ptr, NULL)+offset;
+			response_value[i] = strtod (ptr, NULL) + offset;
 
 			if(calculate_rate) {
 				if (previous_state!=NULL) {
@@ -1088,7 +1088,7 @@ print_help (void)
 	printf (" %s\n", "--rate-multiplier");
 	printf ("    %s\n", _("Converts rate per second. For example, set to 60 to convert to per minute"));
 	printf (" %s\n", "--offset=OFFSET");
-	printf ("    %s\n", _("Allows to add/substract a value to numeric sensor data."));
+	printf ("    %s\n", _("Add/substract the specified OFFSET to numeric sensor data"));
 
 	/* Tests Against Strings */
 	printf (" %s\n", "-s, --string=STRING");





More information about the Commits mailing list