Hi All,
Hopefully someone can help me here as googling isnt finding what I want.
I have PNP4NAGIOS installed and im using the check_iftraffic64 plugin to monitor bandwith on my mikrotik routers pppoe interface. The plugin in working great, here is an output from the plugin
OK - Average IN: 2.28MB (182.23%), Average OUT: 154.96KB (12.40%)Total RX: 121.97GBytes, Total TX: 43.55GBytes|inUsage=182.23%;230;300 outUsage=12.40%;230;300 inBandwidth=2.28MB outBandwidth=154.96KB inAbsolut=121969397166B outAbsolut=43550892811B
Im using PNP4NAGIOS to graph the data and using the check_iftraffic_counter template that comes with it.
The problem ive noticed is, the above reading shows the Average IN as 2.2MB at the time I ran the check and AVERAGE OUT as 154.96kb
My problem lies with the way the graph interprits the data, the graph is showing the data in b/s
So when its showing my IN data at 2.28mb its actually displaying it as 2.28 b/s and the out data as 154.96 b/s. The issue is that the graph is making it look like the out data is larger and higher in value than the IN data which is obviously incorrect.
Can anyone help me here customise the graph to understand this output from the plugin to PNP4NAG? I would have thought the template that came with PNP4NAG as it was labelled the same as the plugin that it would be compatibable. Clearly not
Graphing Support
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Graphing Support
I actually did a talk at the Nagios World Conference which included going into customizing grapsh, you can watch it here:
https://www.youtube.com/watch?v=kqA2KcpUFg4
http://www.slideshare.net/nagiosinc/tro ... and-graphs
Even though it's for Nagios XI, the template stuff is the same.
Specifically with templates, it's just PHP code, so you can do some coding to display the data how you want to.
https://www.youtube.com/watch?v=kqA2KcpUFg4
http://www.slideshare.net/nagiosinc/tro ... and-graphs
Even though it's for Nagios XI, the template stuff is the same.
Specifically with templates, it's just PHP code, so you can do some coding to display the data how you want to.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Graphing Support
Hi Box,
Thanks for the post above, was very informative.
Unfortunatly it still didnt cover my issue, I think the problem is that the plugin is mixing data sizes so the plugin is exporting data showing MB and KB in the same output
I basically need either PNP4 Nagios to do the same thing but I dont think it can change metrics as the plugin output does as the number increment from KB to MB
So what I think I need it to do is pick 1 metric and convert the plugin output to that metric for the graph
So if Im getting a plugin output of 4.5mb and 500kb
I need the graph to convert it all to say either bits, byes or kb. So if we picked KB as the metric 500kb would stay the same but 4.5mb would be converted to kb. Because as it currently is 500kb is showing as a higher value than 4.5mb as the graph is showing a bits so it thinks 4.5 is actually bits and not MB.
Anyone know how to do this?
Thanks for the post above, was very informative.
Unfortunatly it still didnt cover my issue, I think the problem is that the plugin is mixing data sizes so the plugin is exporting data showing MB and KB in the same output
I basically need either PNP4 Nagios to do the same thing but I dont think it can change metrics as the plugin output does as the number increment from KB to MB
So what I think I need it to do is pick 1 metric and convert the plugin output to that metric for the graph
So if Im getting a plugin output of 4.5mb and 500kb
I need the graph to convert it all to say either bits, byes or kb. So if we picked KB as the metric 500kb would stay the same but 4.5mb would be converted to kb. Because as it currently is 500kb is showing as a higher value than 4.5mb as the graph is showing a bits so it thinks 4.5 is actually bits and not MB.
Anyone know how to do this?
Re: Graphing Support
Or....just to add to the above post.
If PNP4 nagios cant do the conversion i need the check_iftraffic plugin to stick to one metric so for it to output all the data in KB rather than mixing MB and KB in the same plugin when KB reaches 999 and then goes to 1mb.
Can this be done? I've looked up the plugin help but cant find anything supporting that.
If PNP4 nagios cant do the conversion i need the check_iftraffic plugin to stick to one metric so for it to output all the data in KB rather than mixing MB and KB in the same plugin when KB reaches 999 and then goes to 1mb.
Can this be done? I've looked up the plugin help but cant find anything supporting that.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Graphing Support
Can you post the exact command for check_iftraffic64.pl being used along with all the arguments.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Graphing Support
$USER1$/check_iftraffic64.pl -H $HOSTADDRESS$ -C public1 -i pppoe-out1 -w 230 -c 300
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Graphing Support
Try the -u argument:
-u, --units STRING
g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s. Required if -b, -I, -M,
or -O are used.
-b, --bandwidth INTEGER
-I, --inBandwidth INTEGER
Interface maximum speed in kilo/mega/giga/bits per second. Applied to
both IN and OUT if out (-O) max speed is not provided. Requires -u.
-O, --outBandwidth INTEGER
Interface maximum speed in kilo/mega/giga/bits per second. Applied to
OUT traffic. Uses the same units value given for -b. Requires -u.
-M, --max INTEGER
Max Counter Value (in bits) of net devices in giga/mega/kilo/bits. Requires -u.
-u, --units STRING
g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s. Required if -b, -I, -M,
or -O are used.
-b, --bandwidth INTEGER
-I, --inBandwidth INTEGER
Interface maximum speed in kilo/mega/giga/bits per second. Applied to
both IN and OUT if out (-O) max speed is not provided. Requires -u.
-O, --outBandwidth INTEGER
Interface maximum speed in kilo/mega/giga/bits per second. Applied to
OUT traffic. Uses the same units value given for -b. Requires -u.
-M, --max INTEGER
Max Counter Value (in bits) of net devices in giga/mega/kilo/bits. Requires -u.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Graphing Support
Thanks for the reply,
I did see these switches and played around with them but didnt really understand what those switches are for or what they mean.
When it says inBandwith does that mean if its a gigabit port then I should put -I 1000?
I'm definetly doing something wrong as its still outputting using mb and kb at the same time.
I did see these switches and played around with them but didnt really understand what those switches are for or what they mean.
When it says inBandwith does that mean if its a gigabit port then I should put -I 1000?
I'm definetly doing something wrong as its still outputting using mb and kb at the same time.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Graphing Support
Looking at the script it appears to always be bs or b:
12_09_2014 Changed the $suffix from 'Bs' or 'bs' to 'B' or 'b'
I think you need to contact the developer of the plugin.
Otherwise code the template to check the unit for the metrics and then calculate off that. It's basically all maths, it just gets complicated thats all.
12_09_2014 Changed the $suffix from 'Bs' or 'bs' to 'B' or 'b'
I think you need to contact the developer of the plugin.
Otherwise code the template to check the unit for the metrics and then calculate off that. It's basically all maths, it just gets complicated thats all.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Graphing Support
Ok thanks for your help.
Any chance you know of a better plugin that can monitor the status plus bandwidth of a switch port, let's say for a Cisco switch/router that can also be mapped correctly using pnp4nagios?
Any chance you know of a better plugin that can monitor the status plus bandwidth of a switch port, let's say for a Cisco switch/router that can also be mapped correctly using pnp4nagios?