[mrtg] multi-context templates

Steve Shipway s.shipway at auckland.ac.nz
Mon Mar 2 23:38:39 CET 2009


> 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.

I think I can smell a requirement for a cfgmaker modification.  And I don't
want to be the one to do it (not least because I don't have SNMPv3 here to
test with :-) )

> 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...

I think (but not sure) that the SNMP info like this is held globally to a
particular device by cfgmaker, not on a per-interface basis, which would
make modification of the variables difficult.

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

Again, I *think* that the templates are loaded into a separate namespace,
and (since 2.16) there are certainly various functions (mainly for SNMP)
made available to the template by cfgmaker.  While you can of course call
anything you like and modify anything in the other namespaces, there are a
published list of variables available to the template read-only or
read-write that you're supposed to stick to, otherwise you risk your
template not working with future versions of cfgmaker.  This is what I mean
by 'cfgmaker API', the documented variables and functions, although (as you
say) its not strictly an API in the real sense of the term.

Steve

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3133 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20090303/53b709ce/attachment.bin 


More information about the mrtg mailing list