You need to modify your if-filter option.

--if-filter=(($if_is_ethernet || $if_is_ciscovlan) && $if_admin && $if_oper)"

To exclude interfaces with a description starting NDE_, do something like:

--if-filter=(($if_is_ethernet || $if_is_ciscovlan) && $if_admin && $if_oper && 
($if_description !~ /^NDE_/))"

There are a number of other variables available for testing in the filter.  The 
filter should be a Perl code snippet that evaluates to true/false.

HTH

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
[email protected]<mailto:[email protected]>
Ph: +64 9 373 7599 ext 86487

________________________________
From: mrtg [[email protected]] on behalf 
of Stephen D. Rasmussen [[email protected]]
Sent: Tuesday, 21 April 2015 3:40 a.m.
To: [email protected]
Subject: [mrtg] Need help trying to figure out how to filter out a certain type 
of interface

All,

We are running MRTG and every time we run it the script I am running renders 
all of the interfaces I WANT it to, but also a couple which I don’t want.  I am 
hoping someone can tell me how to alter my current cfgmaker script to 
automatically ignore these interfaces.  My current script looks like this:

perl cfgmaker --ifdesc=alias --global WriteExpires:Yes --global "RunAsDaemon: 
yes" --global "options[_]: growright,bits" --global "WorkDir: 
c:\inetpub\wwwroot\mrtg" --output mrtg.cfg --subdirs=HOSTNAME 
--snmp-options=:::::2 "--if-filter=(($if_is_ethernet || $if_is_ciscovlan) && 
$if_admin && $if_oper)" XXXXXXXX@##.##.##.##<mailto:XXXXXXXX@##.##.##.##>


What I would like to do is put a filter in which automatically ignores 
interfaces with a DESCRIPTION like NDE_##.  Can anyone tell me what filter 
expression I could add to our cfgmaker script to ignore these automatically 
instead of having to comment them out of the config file after creation?

Thanks in advance,


[logo]

Stephen Rasmussen
System Network Administrator
Telecommunications and Networking
Stephen F. Austin State University
P.O. Box 6095, SFA Station
Nacogdoches, Texas 75962-6095
936-468-1246
[email protected]<mailto:[email protected]>  |  
www.sfasu.edu<http://www.sfasu.edu/>

“The views and opinions expressed in this message are my own and do not 
necessarily reflect the views and opinions of Stephen F. Austin State 
University, its Board of Regents, or the State of Texas.”


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

Reply via email to