I need to have a report (or graph) where I can show to a customer the total amount of data (in bytes) transferred over a time period (ex: one month). This data is gathered from a router interface that connects to the client. The best I could do was getting the amount of data transferred per day (bytes / day), but I would need to sum that info to get the one month period…
Did anyone have a similar challenge? Is there a way to achieve this?
I don’t know if I understand you correctly, but if your device resp. the interface that is being monitored has “perfdata” then you do already have a graph inside of CMK. For this graph, you have predefined time ranges, and you can also set up custom ones.
Well thanks for the help guys, but I’m not considering doing changes to the RRA settings / RRD databases.
I can get the total amount of transferred data (using bytes per day) on that specific router interface, I would just need a way to “sum” the total daily bytes, on a date range, and get the total amount of transferred data for that date range… it shouldn’t be to hard (but it is, at least for me)
If you have the bytes per day as a number you can store this as a value inside an RRD.
The linked article describes how to calculate the complete sum over a time range.
In the end it is build the average over all values in the time range and multiply with the amount of intervals (days). If you do it manually it looks like this.
Day
1
2
3
4
5
6
7
Sum
Bytes
2000000
3000000
6000000
1000000
12000000
5000000
100000
29100000
Average of all days
4157143
Total traffic = Average * 7
29100000
This is what you can achieve with RRD databases and RRDTool
You could also create your own check plugin that re-uses the network interface sections (this is really easy in the upcoming 2.0 release) and not calculate the bandwidth rate but just add the number of bytes whenever an overflow has occured on the counter.
I must say, the advice Andreas posted, does seem to fit your case “like a glove”, if
I might say so even if - as you say - you don’t want to “mess” with RRDs.
It looks doable though, and the URL he added, explains everything quite well.
Perhaps two other notes, that may be of interest to you:
In CEE you can “combine” graphs, and do calculations on them. If you do have CEE, this seems like a simple way to get this done.
I found this “perfcalc” plugin in the MK exchange which has been written by this awesome guy called… rsander (!) in MK exchange… (Hmm… Coincidence? ) Haven’t tested it, but could work for you. There is a note though, that it doesn’t work with 1.6 but perhaps you are still on 1.5.
Thanks for the mention but perfcalc only calculates on multiple metrics from different service checks. It does not do mathematical integration (area under a curve).
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.