Bar Graph Data "capacity" for Network Bandwidth

Hello,
This may have been asked in previous posts but I cannot find anything in the search here so here it goes. I’ll start with basic information

Grafana 6.2.1 running on docker-ce 1.13.1
CentOS 7.6 host 16 core/32gb memory
Backend (for this particular issue) Graphite 1.1.5 being fed by Centreon which is a nagios derivative. This is also in docker.

The issue:
I have a request for a dashboard that shows bandwidth utilization for various network devices located across the world. While I could easily do this (inbound/outbound) on a graph I’ve been told this isn’t a viable solution for the consumer of the dashboard. They require to see a vertical bar graph with a displayed percentage of total used bandwidth. Now here is where the problem is… Each device is located in a different state/country. Each device has a different capacity. i.e. a device in NYC may have 200MBPS download speed capacity where as a device in the middle of no where Montana may only have a 10MBPS download speed capacity due to the ISP’s availability/distance. And of course as with most bandwidth monitoring tools they do not report a capacity or total available bandwidth so I have no metric to do an “asPercent” combination with to come up with a percentage in the first place.

So this leads me to a few questions:
Is there a way to hardcode the values into like a fake query or something to calculate the percentage?

Is there a better way to represent this data that their requirements seem to bend around? I.E. a bar graph that shows the ceiling limit and fills up to that point?

Hello,
This may have been asked in previous posts but I cannot find anything in
the search here so here it goes. I’ll start with basic information

Grafana 6.2.1 running on docker-ce 1.13.1
CentOS 7.6 host 16 core/32gb memory
Backend (for this particular issue) Graphite 1.1.5 being fed by Centreon
which is a nagios derivative. This is also in docker.

The issue:
I have a request for a dashboard that shows bandwidth utilization for
various network devices located across the world. While I could easily do
this (inbound/outbound) on a graph I’ve been told this isn’t a viable
solution for the consumer of the dashboard.

Hm.

They require to see a vertical bar graph with a displayed percentage of
total used bandwidth. Now here is where the problem is… Each device is
located in a different state/country. Each device has a different capacity.

That doesn’t sound like it should stop you presenting a %age graph, provided
you have a source of %age numbers…

You might also want to investigate the “gauge” option for singlestat panels.

And of course as with most bandwidth monitoring tools they do not report a
capacity or total available bandwidth so I have no metric to do an
“asPercent” combination with to come up with a percentage in the first place.

I would turn that into a problem for the “consumer of the dashboard”.

If they want you to present %age numbers, they need to tell you the maximum
for each device so that you can calculate current usage as a %age of that.

So this leads me to a few questions:
Is there a way to hardcode the values into like a fake query or something
to calculate the percentage?

My approach would be to create a table in the same database as your usage
numbers come from, which contains the maximum bandwidth (and of course
there’ll be two - one downstream and one upstream), so that you can do a query
like (this is in SQL, but I’m sure you can do something similar with any other
data store):

select 100*current_usage/max_available as down_pcent from bandwidth where
direction=‘down’ and device=‘$Device’;

Is there a better way to represent this data that their requirements seem
to bend around? I.E. a bar graph that shows the ceiling limit and fills up
to that point?

How about assuming that “max_available” is the same as “max(current_usage)”
over a sufficient period of time?

So long as both downstream and upstream get saturated now and again, that
should give you close enough (and accurate, compared to suppliers’ estimates)
numbers. The only thing it wouldn’t cope well with is a reduction in capacity
on a line at some point.

Hope that helps,

Antony.

Pooh,
Thanks for the reply. I have all of the values from the ISP for total capacity per device but, from what I gather based on reading your reply this product simply is not intended for this form of use without DB modifications, which due to change control processes/time constraints is not plausible. I just wanted to know if there was a simple dummy query or way to inject the value i have in spread sheet into the front end to come up with the accurate percentages. Since this is not the case I think it would be quicker to build a tableau environment which can use the spreadsheet data as a datasource.

I was able to figure this out. Actually two solutions for this…

The first solution:
Create a csv with the line items you want to add for your “dummy” metrics, then just create a quick (whatever language you want to use) script and you can add them by looping through each line using the following command: echo "metric.name.here 4 date +%s" | nc myserver 2003 (where 4 is the metric you want to inject, and replace the metric.name.here with what you want to call it and myserver to your graphite server). This will add the metrics to the database… You can set the script in cron and run it every 5 or so minutes. This allows you to have the bandwidth capacity metric for use in a query which you could then use to calculate percentage.

Second solution:
This method uses the function under the query seems to work nicely, although only provides the remaining bandwidth left on the circuits and not a percentage… Which is fine I guess for my purposes.
alias(offset(scale(movingAverage(centreon.metric.chi-01.Bandwidth_Biz.traffic_in, 2), -1), 200000000), ‘CHICAGO BIZ’)

My recommendation for I guess the developers of the bargraph plugin add the ability to show the thresholds directly on the bar.