Page 1 of 1

Adding a 95% percentile line to Nagios Bandwdth Graph

Posted: Thu Apr 23, 2015 11:08 am
by pythiangrp
I am currently using NAgios XI version 2014R2.5 to monitor my internal infrastructure, including all my swicthes and routers.

I am looking to potentially add 2 items to some of the switch bandwidth graphs, but can't seem to find the proper trick to do so.
What I am looking for is to add a line on our gateway switch to show the amount of traffic we are allowed as per our ISP agreement. For example, in our case, we are paying for a 35Mbs connection which is burstable to 100Mbps. This would be the red line that I have drawn in, as seen in the attachment.
The second line that I am looking to add is the 95th Percentile of traffic line. In mrtg this is the avgpeak, and I have tried to draw it in blue, as in seen in the attachment.

At this point, I have no clue on how to achieve the first goal, so any help would be appreciated.
For the second line, I have tried to modify the proper mrtg.cfg file, but I still do not see the line. I have added the Options line as seen below:

Code: Select all

### Interface 10006 >> Descr: 'FastEthernet0/6' | Name: 'Fa0/6' | Ip: 'No Ip' | Eth: '0c-85-25-f8-75-06' ###

Target[10.2.2.22_10006]: 10006:[email protected]:161::::2
SetEnv[10.2.2.22_10006]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="FastEthernet0/6"
MaxBytes[10.2.2.22_10006]: 12500000
Options[10.2.2.22_10006]: avgpeak
Title[10.2.2.22_10006]: Traffic Analysis for 10006 -- ottprodout01.pythian.com
PageTop[10.2.2.22_10006]: <h1>Traffic Analysis for 10006 -- ottprodout01.pythian.com</h1>
I suspect that I need to do something to get the config file re-read, but I am not having any luck finding what.

Thanks in advance for the assistance.
Andre Plante

Re: Adding a 95% percentile line to Nagios Bandwdth Graph

Posted: Thu Apr 23, 2015 11:10 am
by WillemDH
I vaguely remember a thread where Nagios support said it was on the roadmap. This definitely is something we would like too.

Re: Adding a 95% percentile line to Nagios Bandwdth Graph

Posted: Thu Apr 23, 2015 1:15 pm
by rseiwert
in MRTG MaxBytes is just a limit. If a number higher than MaxBytes is returned, it is ignored.
The avgpeak in the mrtg.cfg is for if you are using MRTG to generate your charts. It will have no effect on NagiosXI that I know of.

I'm curious if templating is available in the new highcharts style charts? In the legacy PNP charting you can use a custom template to put these lines in. The custom templates are a powerful but not widely understood feature on PNP and why I still use the older style charting.

In the PNP template to add a line add to your custom template
$def[$i] .= 'HRULE:35Mb#FFFF00:"35Mbps" ';

I got to admit I may not understand 95th percentile billing but this should work if you are looking for the 95th percentile of Mbps.
$def[$i] .= 'DEF:din=$rrdfile:$DS[1]:MAX ';
$def[$i] .= 'DEF:dout=$rrdfile:$DS[2]:MAX ';
$def[$i] .= 'CDEF:tot=dout, din, + ';
$def[$i] .= 'VDEF:per95=tot,95,PERCENT ';
$def[$i] .= 'HRULE:per95#FF0000:"95th Percentile" ';

of course to do this you need to disable highcharts in your options and then read up on custom templating
also it always takes me a few trys to get these right so these examples may need some work.

Re: Adding a 95% percentile line to Nagios Bandwdth Graph

Posted: Thu Apr 23, 2015 4:37 pm
by abrist
rseiwert wrote: of course to do this you need to disable highcharts in your options and then read up on custom templating
also it always takes me a few trys to get these right so these examples may need some work.
This is correct. Templating is not an option currently if you use the higcharts graphs. You can disable highcharts (admin --> manage system config) and opt to use the old pnp4nagios graphs which support custom templates. You can read more about the pnp4nagios templates at:
https://docs.pnp4nagios.org/pnp-0.4/tpl

Re: Adding a 95% percentile line to Nagios Bandwdth Graph

Posted: Fri Apr 24, 2015 8:07 am
by pythiangrp
Thanks for the replies. I have used the information provided by rseiwert, and am able to get what I am looking for on the old pnp4nagios graphs.

Is templating for highcharts something that is expected in a future release?

Re: Adding a 95% percentile line to Nagios Bandwdth Graph

Posted: Fri Apr 24, 2015 2:07 pm
by abrist
pythiangrp wrote: Is templating for highcharts something that is expected in a future release?
I believe so, but alas, I do not have a timeline/eta for the feature.