[mrtg] MRTG for specific Interfaces on Cisco Device

McDonald, Dan Dan.McDonald at austinenergy.com
Thu Jun 4 16:21:23 CEST 2009


On Thu, 2009-06-04 at 10:04 -0400, Thiel, Mark wrote:
> Thanks Dan.
> 
> I am trying the following and receiving an if-filter error...  Any ideas...???  Sorry for so many questions...

Doesn't it need quotes?  Otherwise, you are trying to divide the
undefined function GigabitEthernet5 by 1...

Isn't == a numeric comparison in perl?

remember, filters are just snippets of perl code that get spliced into
cfgmaker.

maybe something like:
--if-filter='($if_snmp_descr =~ m#5/[12]$#)'

> 
> netsrvtool:/usr/bin # cfgmaker --global "WorkDir: /www/mrtg"           \
> >          --global "Options[_]: growright,bits"    \
> >          --ifref=descr                            \
> >          --ifdesc=alias                           \
> >          --community=get-info                     \
> >          --if-filter='($if_snmp_descr==GigabitEthernet5/1)'                    \
> >          10.128.128.1                             \
> >          --output=/www/mrtg/test.cfg
> 
> ERROR: with if-filter ($if_snmp_descr==GigabitEthernet5/1): Bareword "GigabitEthernet5" not allowed while "strict subs" in use at (eval 796) line 1.
> netsrvtool:/usr/bin #
> 
> Mark Thiel
> 
> -----Original Message-----
> From: mrtg-bounces at lists.oetiker.ch [mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of McDonald, Dan
> Sent: Thursday, June 04, 2009 9:51 AM
> To: mrtg at lists.oetiker.ch
> Subject: Re: [mrtg] MRTG for specific Interfaces on Cisco Device
> 
> On Thu, 2009-06-04 at 09:41 -0400, Thiel, Mark wrote:
> > Thanks Dan.
> >
> > I have been looking over that in detail and am unable to find a variable for a specific name of an interface.
> 
> either $if_snmp_name or $if_snmp_alias.
> 
> >
> > I can see that:
> >
> > '--if-filter=$if_type=6'
> >
> > would grab ethernet interfaces, but I only need 2 of them from a particular switch.
> >
> > Is there a variable (possibly not documented), where I could do something like this:
> 
> All variables available in templates can also be used in filters.
> 
> --
> Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX www.austinenergy.com
> 
> Notice:  This communication may contain privileged and/or confidential information. If you are not the intended recipient, please notify the sender by email, and immediately delete the message and any attachments without copying or disclosing them. LBI may, for any reason, intercept, access, use, and disclose any information that is communicated by or through, or which is stored on, its networks, applications, services, and devices.
-- 
Daniel J McDonald, CCIE # 2495, CISSP # 78281, CNX
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/20090604/e0ddb689/attachment-0001.bin 


More information about the mrtg mailing list