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

"Ton Voon" <[email protected]>
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: ton/state
 Commit: 5551252e03ec070cdb6310631057a01ca082ec96
 Author: Ton Voon <[email protected]>
   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;


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.