I need bandwidth totals for specific time periods. It should be as simple as subtracting the counters recorded between any two given times, but its not doing what I want or I don't know what I'm doing! We have bandwidth-limited satellite internet and I think they are screwing us over, so I'm trying to monitor all I can. I have a Cisco ASA firewall and one of the ports has a DD-WRT router connected to one of the Cisco ports, so I can monitor all the Cisco ports (we have wired, wireless/dd-wrt, and ethernet over powerline networks, plus the internet port) and tons of interfaces on the dd-wrt.
I'm using the built-in Interface Traffic with Totals graph templates.
According to the graph, I have downloaded 14MB in the last hour from the Internet. This simply isn't possible. We've run out of bandwith until our allocation refreshes in 2 days. I want all my monitoring to be stable when this happens so that the next month is recorded without any glitches. But, we're throtted right now. 14MB in an hour? No one is even using the Internet except me typing this.
It would also be nice to have the ability to take the data from other rrd files and then total them (or stack them each in another color) to give an overall graph to compare to the 4th (internet usage). Of course, this will include computer-to-computer traffic that shouldn't be applied to internet usage, but it would still be nice to see.
Bandwidth Totals
Moderators: Developers, Moderators
Re: Bandwidth Totals
OK, most of the problems are resolved, but here is an issue I'm having. I have a custom data source that runs a script that screen-scrapes the modem for usage information (yes, I can use SNMP and I'm monitoring that too so I have redundancy, and only the screen-scrape shows when the data will refresh). The script calculates what percentage of your total usage you using up this point in the month - at 100% you'll just make the refresh cycle until the limits are refreshed. Less than 100% is good, over 100% means you need to back down.
Anyway, here's the script output:
According to the graph, we have a bit more than what the data collection is showing! I tend to believe the data collector. How can I make it show exactly what the data collection shows? I'm guessing its doing an average, but I specifically have LAST mentioned and saved in the RRD file. Why isn't it showing the latest information?
FYI, yes, I'm out of bandwidth and on "token bytes" - which is a good time to test things, and percentage is at 100.3% since we're gonna refresh soon, but I'll recalculate that to make sure. And I'll know for sure tomorrow when it refreshes. Any ideas?
Graph is:
Anyway, here's the script output:
Code: Select all
anytime:0 offtime:310 bonus:389 anyprj:1003 offprj:1003
FYI, yes, I'm out of bandwidth and on "token bytes" - which is a good time to test things, and percentage is at 100.3% since we're gonna refresh soon, but I'll recalculate that to make sure. And I'll know for sure tomorrow when it refreshes. Any ideas?
Graph is:
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--title='HT1100 Modem - Overview' \
--base='1000' \
--height='120' \
--width='500' \
--alt-autoscale \
--vertical-label='percent' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a='/var/lib/cacti/rra/ht1100_modem_anyprj_47.rrd':'anytime':LAST \
DEF:b='/var/lib/cacti/rra/ht1100_modem_anyprj_47.rrd':'bonus':LAST \
DEF:c='/var/lib/cacti/rra/ht1100_modem_anyprj_47.rrd':'offtime':LAST \
DEF:d='/var/lib/cacti/rra/ht1100_modem_anyprj_47.rrd':'anyprj':LAST \
DEF:e='/var/lib/cacti/rra/ht1100_modem_anyprj_47.rrd':'offprj':LAST \
CDEF:cdefg='a,1024,*' \
CDEF:cdefh='b,1024,*' \
CDEF:cdefi='c,1024,*' \
AREA:a#00BF47CC:'Anytime' \
AREA:b#EACC00FF:'Token Bytes':STACK \
AREA:c#2175D9CC:'Offtime\n':STACK \
LINE1:d#F9FD5FFF:'Projected Use' \
LINE1:e#FF00FFFF:'Projected Offtime Use' \
HRULE:1000#FF0000FF:'100% Usage\n' \
GPRINT:cdefg:LAST:'Anytime Available\: %8.2lf %s' \
GPRINT:cdefh:LAST:'Tokens Available\: %8.2lf %s\n' \
GPRINT:cdefi:LAST:'Offtime Available\:%8.2lf %s\n'
- Attachments
-
- Notice the Summary Info:
- graph_image.php.png (15.13 KiB) Viewed 1260 times
Re: Bandwidth Totals
I'm still getting crazy values. I even tried to change all the graph types from GAUGE to ABSOLUTE. Played with all kinds of stuff, and I'm getting nowhere!
Here's the script generating data:
The graph shows Anytime of 32.8 MB (should say 14.9) and Offtime of 43.9 MB (should say 19.9)
Where is it getting these numbers? I told it ABSOLUTE and LAST. I don't want it to calculate anything at all, just display the values!
Here's the script generating data:
Code: Select all
anytime:14900000 offtime:19900000 bonus:0 anyprj:3596279 offprj:2697211
Where is it getting these numbers? I told it ABSOLUTE and LAST. I don't want it to calculate anything at all, just display the values!
[Solved] Re: Bandwidth Totals
OK, originally I wasn't using GUAGE/LAST which should be the only thing you should use for graphing exact values like this. Then I was trying to use the automatic labelling wrong - these all want to display a rate of change or a summation, not exact values. I had tried labelling the graph with GPRINT but must not have been using GUAGE/LAST when I originally tried it. Towards the end, I tried it again, but was still getting slightly elevated data because I had "Multiply by 1024" turned on to change the graph from M to G.
Well, duh. It should be Multiply by 1000 to only change the display. I added a Multiply by 1000 option to fix that and then added one to divide my percentage calculations (they are relative to 15 GB so that my red line for 100% projected usage is in the middle of the graph) back to a real percentage for display in the legend (and a GPRINT format for that too). Now everything is displaying the exact values reported from the modem (which gets monitored via SNMP for the actual traffic - makes a good comparison).
Its all working now, and I have a pretty good feel for how this is all working now.
Well, duh. It should be Multiply by 1000 to only change the display. I added a Multiply by 1000 option to fix that and then added one to divide my percentage calculations (they are relative to 15 GB so that my red line for 100% projected usage is in the middle of the graph) back to a real percentage for display in the legend (and a GPRINT format for that too). Now everything is displaying the exact values reported from the modem (which gets monitored via SNMP for the actual traffic - makes a good comparison).
Its all working now, and I have a pretty good feel for how this is all working now.
- Attachments
-
- Finished Product
- graph_59_5.png (13.96 KiB) Viewed 1222 times
Re: Bandwidth Totals
Did you ever get this working via SNMP rather than screen-scraping? I've got a similar challenge and am trying to map cumulative usage over a month rather than the max/min/avg usage. I was wondering is you could shed some light on ow you built your graphs, and what SNMP metrics you'd plot if you were to use them rather than the screen-scrape.
Who is online
Users browsing this forum: No registered users and 1 guest