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: [email protected] [mailto:[email protected]] On 
> Behalf Of McDonald, Dan
> Sent: Thursday, June 04, 2009 9:51 AM
> To: [email protected]
> 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

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

Reply via email to