Page 1 of 6
Combine 2 SNMP Service Checks into a graph & calculation
Posted: Fri Jul 10, 2015 2:17 pm
by perric
I searched and found this post... "Aggregate / consolidated graph of many links".
This looks exactly like what I need. I have a service that collects SNMP ifinoctets from a Cisco router's ethernet interface. And a service that also collects ifoutoctets. This provides inbound and outbound bandwidth values for each port, but I have been asked to consolidate this to one graph under reports and change the graph to show utilization as a percentage of the link size. So, I need to divide the value by the link size.
While the post mentioned above was helpful, there was a recommended solution proposed. Can I have assistance with how to do the recommended solution with variables, etc.? I have no problem modifying scripts, etc., but I am just not should how to begin.
David
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Sun Jul 12, 2015 8:55 pm
by Box293
perric wrote:I have a service that collects SNMP ifinoctets from a Cisco router's ethernet interface. And a service that also collects ifoutoctets. This provides inbound and outbound bandwidth values for each port, but I have been asked to consolidate this to one graph under reports and change the graph to show utilization as a percentage of the link size.
What plugin are you using for this and can you post a service definition of two of the ports please?
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Mon Jul 13, 2015 8:38 am
by perric
Hello,
I use the check_snmp command with "-C xxxxxx -o .1.3.6.1.2.1.2.2.1.10.15" as a value for Inbound bandwidth and "-C xxxxxx-o .1.3.6.1.2.1.2.2.1.16.15" as a value for Outbound Bandwidth.
My hope was to see both values (inbound and outbound) with the calculation (dividing value by link size) on one "Performance graph" under Views, Service Details.
Thanks.
David
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Mon Jul 13, 2015 11:24 am
by BanditBBS
You could always write a wrapper script to run the two commands, grab the data and then output as you desire.
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Mon Jul 13, 2015 3:47 pm
by perric
Would you have an example script that would work?
David
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Mon Jul 13, 2015 3:49 pm
by BanditBBS
No, but I could probably throw something together super quick. Show me the example output from the two checks please.
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Tue Jul 14, 2015 9:55 am
by tmcdonald
Thanks Bandit!
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Tue Jul 14, 2015 11:44 am
by perric
Sure. Do you mean the graphed output? If so, see inline below.
Inbound.png
Outbound.png
David
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Tue Jul 14, 2015 12:04 pm
by BanditBBS
I actually meant the output on the command line so I can know what I have to parse out. Get me that information and I'll work on the script tomorrow as I am out of office today on a personal day.
Re: Combine 2 SNMP Service Checks into a graph & calculation
Posted: Tue Jul 14, 2015 12:53 pm
by perric
Sorry. Do you mean this?
Inbound:
[root@cawlkl21 libexec]# ./check_snmp 10.197.0.11 -C public -o 1.3.6.1.2.1.2.2.1.10.15
SNMP OK - 3788642629 | iso.3.6.1.2.1.2.2.1.10.15=3788642629c
Outbound:
[root@call1 libexec]# ./check_snmp 10.197.0.11 -C public -o 1.3.6.1.2.1.2.2.1.16.15
SNMP OK - 4243923118 | iso.3.6.1.2.1.2.2.1.16.15=4243923118c
[root@call1 libexec]#
David