|
|
| Author |
Message |
cantripnet Helper
Joined: 09 Dec 2004 Posts: 11
|
Posted: Thu Dec 09, 2004 6:26 pm Post subject: How to add/subtract a value |
|
|
I am pretty new at this and looked for a while but can't seem to find an easy way to add or subtract a constant from the results onto a graph-
i.e.
we have 3 vpn routers and I can get an SNMP result for the number of interfaces
but 31 of the interfaces on one set up is not a ppp tunnel but a different int type
4 on another needs to be subracted and 12 on the last
I made a nice graph of the 3 devices but have not been able to subtract the non ppp interfaces from the totals
The Fixed Value or Value Multiplier: does not seem to be able to add a fixed value - it treats everything as a multiplier ( maybe just syntax but I couldn't find the proper one)
Paul Ellis |
|
| Back to top |
|
 |
cantripnet Helper
Joined: 09 Dec 2004 Posts: 11
|
Posted: Fri Dec 10, 2004 5:10 pm Post subject: I ended up... |
|
|
I ended up making a script counter for it rather than looking for a way to do it in NetMRG with an
SNMP counter
echo $(($(snmpget -v 1 -c foo -O qev 192.168.3.5 1.3.6.1.2.1.2.1.0)-12))
seems to work ok and gave me ideas for several other scripts where I need to do math
on multiple SNMP results merged into one value - |
|
| Back to top |
|
 |
silfreed Site Admin
Joined: 19 Jan 2003 Posts: 394 Location: Shippensburg, PA, USA
|
Posted: Sat Dec 11, 2004 1:44 am Post subject: |
|
|
Yes, we actually have bug#205 that covers the 'basic math support' features like you suggest.
So, at least we know that it would be useful
-Doug |
|
| Back to top |
|
 |
|