[mrtg] Re: cfgmaker - Cisco switches

Mike Mitchell Mike.Mitchell at sas.com
Tue Aug 19 16:52:10 MEST 2003


Very interesting.  The '/i' modifier means "ignore case".  [a-z,A-Z] shouldn't be necessary, because we're ignoring case.  That sounds like a Perl/Redhat bug to me.  I do use the '/i' modifier in other places which don't seem to have the problem, although those patterns are much simpler.  I could re-write the patterns to use Perl's Unicode composite properties, like
	if ($var =~ /^((\p{IsAlpha}[\p{IsAlnum}\-]*\.)*(\p{IsAlpha}[\p{IsAlnum}\-]*)))
But then I'd have to add "use utf8" and that could restrict the portability of the module

MRTG itself checks to see if the environment variable "LANG" is set to UTF-8 and refuses to run if it is.  Maybe that should be extended to cfgmaker until Perl gets fixed.

-----Original Message-----
From: Stewart, Eric [mailto:eric at lib.usf.edu] 
Sent: Tuesday, August 19, 2003 9:52 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: cfgmaker - Cisco switches


	A colleague of mine has indicated that this is an issue with MRTG's SNMP_util.pm; a regular expression line is apparently not handled properly, and a replacement resolved the situation:

#  if ($var =~ /^(([a-z][a-z\d\-]*\.)*([a-z][a-z\d\-]*))/i)
  if ($var =~ /^(([a-z,A-Z][a-z,A-Z\d\-]*\.)*([a-z,A-Z][a-z,A-Z\d\-]*))/i)

	Now if this is Perl's, MRTG's, or Redhat's fault (I include Redhat since I'm using RH9 and I've run into several interesting problems with it), I don't know ... but the above line replacement has provided the desired effect.

Eric Stewart - Network Admin - USF Tampa Library - eric at lib.usf.edu SCUBA Diver: 220 Dives  Most Recent: 05/10/03 Chankanaab Park, Cozumel
GeoCacher:    58 Found  Most Recent: 07/04/03 GCGBHE - Fun in the Sun
http://www.scubadiving.com/talk/ and http://www.geocaching.com/


> -----Original Message-----
> From: Stewart, Eric
> Sent: Tuesday, August 19, 2003 9:24 AM
> To: mrtg at list.ee.ethz.ch
> Subject: [mrtg] cfgmaker - Cisco switches
> 
> 
> 	I have a bunch of cisco switches: 2924-XL-EN,
> 3548-XL-EN, and even
> an 8510 CSR.  An earlier version of MRTG's cfgmaker would 
> take the args
> --ifref=name --descint (along with some others) and set 
> ifName to the port
> identity of the switch, IE "FastEthernet 0/5".  I had 
> occasion to rebuild
> the box that collects the MRTG stats and have discovered that 
> --descint has
> been removed as an option, and now --ifref=name reports "not unique".
> 	Has anyone else figured out how to get the information 
> via cfgmaker
> rather than having to hand input all of that into the mrtg.cfg?
> 	IOS for the 2924's:
> IOS (tm) C2900XL Software (C2900XL-C3H2S-M), Version 
> 12.0(5)WC8, RELEASE SOFTWARE (fc1)
> 
> 	MRTG version: 2.9.29
> 
> 	Thanks for any insight or help ... I've dug through the doco and 
> previous postings but haven't seen anything that clearly answers my 
> questions.
> 
> Eric Stewart - Network Admin - USF Tampa Library - eric at lib.usf.edu 
> SCUBA Diver: 220 Dives  Most Recent: 05/10/03 Chankanaab Park, Cozumel
> GeoCacher:    58 Found  Most Recent: 07/04/03 GCGBHE - Fun in the Sun
> http://www.scubadiving.com/talk/ and http://www.geocaching.com/
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
> 
> 

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list