[mrtg] multi-context templates

McDonald, Dan Dan.McDonald at austinenergy.com
Mon Mar 2 23:13:04 CET 2009


On Tue, 2009-03-03 at 10:50 +1300, Steve Shipway wrote:
> > > I don't know of any way for the host template to add extra things to the
> > > list to be processed by the interface template, since this list is
> > populated
> > > by walking the ifIndex - which should still pick these up.
> > 
> > Nope.  Each context has its own ifIndex table.  They are not visible
> > when using a different named context.
> 
> Looks like I'm misunderstanding what a 'context' is in SNMP.  Is this a
> uniquely snmpv3 concept? 

No, it's in snmp v2u as well, but not widely used.  I think you can also
form a valid v2c PDU with a context-id. but that would be immensely
unusual.

Think of the BRIDGE-MIB, where the bridge-mib is defined as the whole
switch.  When Cisco introduced vlans, they had to create a hack to make
each instance of the bridge-mib separate, so they added @2, @3, etc to
the end of the community string.

In SNMP v3, there is no "community string" that can be modified, so they
do a similar thing with Context-id's.  Thus, when querying the
BRIDGE-MIB, you specify -n Vlan-2 to see the vlan 2 bridging
information.


>  In this case I really don't know how we can go
> about doing it - I think the cfgmaker template API will need to be given
> some new functions to push items into the interface list, then (and possibly
> with different SNMPv3 options?)

Yes, they need different snmp v3 options, but that's not terrible - If I
recall correctly, that is stored with the interface already anyway.  I
should just be able to do a push @{some hash reference}, but was hoping
someone else was nuts enough to dig into templates and figure it out...

And there really isn't a template API.  Templates just get executed, so
it's like tossing raw code into cfgmaker.  

-- 
Daniel J McDonald, CCIE #2495, CISSP #78281, CNX
Austin Energy
http://www.austinenergy.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20090302/e15a8d06/attachment.bin 


More information about the mrtg mailing list