Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Patch: custom summation label

 
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti
Author Message
Hip



Joined: 01 Sep 2004
Posts: 18
Location: Switzerland

PostPosted: Wed Sep 01, 2004 6:13 am    Post subject: Patch: custom summation label Reply with quote

Hello all,

I've been using Cacti for a few months now and it's really a great tool !

I find the "bandwidth summation" special variable very useful, but in fact it would be better to have the possibility to sum up different kind of metrics, not only traffic. Actually, the only limitation to that is the label after the sum number ("bytes", "KB", "MB", etc.). Correct me if I'm wrong

I hacked a quick patch to Cacti (attached to this post), allowing to fully customize the summation label, without interfering with existing graphs that are using the "official" syntax. This patch has been written on a already patched version of Cacti with bonsai, so the rrd.php patch will probably fail if you don't have bonsai installed. If there's interest in this patch, I'd release another one for the vanilla 0.8.5a Cacti.

With this patch, the first parameter of the special "sum" variable is interpreted as following:
- [0-9]: the power of 10 divisor to apply (no change)
- 'auto': automatic scaling (no change)
- other: the string is appended to the total

Example: to sum up your incoming spams, you'd use "Total: |sum:spams:current:0:auto|", that would result in "Total: 482 spams".

Patching instructions (Linux/Unix):
- Decompress the patch:
# gunzip /path/to/summation_label.patch.gz
- From the Cacti directory, apply the patch:
# patch -p0 < /path/to/summation_label.patch

I'm waiting for your comments & feedback !

Hip



summation_label.patch.gz
 Description:
Customize summation label

Download
 Filename:  summation_label.patch.gz
 Filesize:  504 Bytes
 Downloaded:  135 Time(s)

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group