[mrtg] Help graphing MAC address count from Cisco switch
Fred Weston
fweston at gmail.com
Sun Mar 20 01:38:55 CET 2016
Hi Dave,
I was able to use this method to accomplish my goal.
Thanks!
FW
On Sat, Mar 19, 2016 at 5:22 PM, Dave Poyner <david at davidpoyner.com> wrote:
> Maybe you can try calling it from a script
>
> Target[example]: `/home/mrtg/example.sh`
>
> ------
> #!/bin/sh
> snmpwalk -v 2c -c public at 10 10.0.1.2 .1.3.6.1.2.1.17.4.3.1.1
> echo 0
> ------
>
> I'm not sure what the snmpwalk returns, but if it's just a single number the
> echo 0 helps to graph only what's returned.
>
>
>
> -dave
>
> On 20 March 2016 at 05:24, Fred Weston <fweston at gmail.com> wrote:
>>
>> Thanks for the suggestion, that has me on the right path but I'm still
>> having some trouble extracting the specific info I'm looking for.
>>
>> This:
>> Target[vlan-10-hosts]:
>>
>> CnTWaLK.1.3.6.1.2.1.17.4.3.1.1&CnTWaLK.1.3.6.1.2.1.17.4.3.1.1:public at 10.0.1.2:::::2
>>
>> Gets me a count of the MAC addresses in the switch's CAM table, but
>> I'm trying to graph MAC addresses by VLAN so I want to create a
>> separate graph for each VLAN and for each of those graphs, I only want
>> to show the number of MAC addresses in the switch's CAM table for that
>> specific VLAN.
>>
>> If I run this snmpwalk command:
>> snmpwalk -v 2c -c public at 10 10.0.1.2 .1.3.6.1.2.1.17.4.3.1.1
>>
>> It returns info only for VLAN 10.
>>
>> Notice above that I'm using "<snmp_community>@<vlan_number>" followed
>> by a space, then the SNMP host's IP address. The problem is I can't
>> seem to figure out how to turn this into a target line in MRTG where I
>> can specify that I only want information for a certain VLAN.
>>
>> On my target line in MRTG, I've tried various permutations of adding
>> the VLAN # but none have seemed to work.
>>
>> Any suggestions on how I could accomplish this?
>>
>> Thanks,
>> FW
>>
>> On Fri, Mar 18, 2016 at 10:20 PM, Alex van den Bogaerdt
>> <alex at vandenbogaerdt.nl> wrote:
>> >> Hello,
>> >>
>> >> I'm trying to create a graph showing the # of devices connected to a
>> >> particular network. The simplest way I can think of to do so is to
>> >> grab the # of MAC addresses in the CAM table for that particular VLAN
>> >> from the L3 switch which is the default gateway for the network.
>> > [...]
>> >>
>> >> I found this command online, and it returns an integer which
>> >> represents the # of MAC addresses the switch knows about for the
>> >> particular VLAN in question (VLAN 40 as shown below):
>> >>
>> >> snmpwalk -v 2c -c public at 30 10.0.1.2 .1.3.6.1.2.1.17.4.3.1.1 |wc -l
>> >
>> > I found this while reading the documentation:
>> > Counted SNMP Walk
>> >
>> > You probably want to use that instead of the external monitoring script.
>> >
>> >
>>
>> _______________________________________________
>> mrtg mailing list
>> mrtg at lists.oetiker.ch
>> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
>
>
More information about the mrtg
mailing list