[nagiosplug] Suffix perf data with "-rate" to signify a rate ...

Ton Voon tonvoon at users.sourceforge.net
Tue Jun 22 15:50:28 CEST 2010


 Module: nagiosplug
 Branch: ton/state
 Commit: 5551252e03ec070cdb6310631057a01ca082ec96
 Author: Ton Voon <ton.voon at opsera.com>
   Date: Tue Jun 22 14:49:09 2010 +0100
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=5551252

Suffix perf data with "-rate" to signify a rate calculation

---

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

diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index a775f95..4741454 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -489,6 +489,8 @@ main (int argc, char **argv)
 				temp_string=labels[i];
 			else
 				temp_string=oidname;
+			if(calculate_rate)
+				asprintf(&temp_string,"%s-rate",temp_string);
 			strncat(perfstr, temp_string, sizeof(perfstr)-strlen(perfstr)-1);
 			strncat(perfstr, "=", sizeof(perfstr)-strlen(perfstr)-1);
 			len = sizeof(perfstr)-strlen(perfstr)-1;





More information about the Commits mailing list