[mrtg] Re: Indexmaker... please HELP!!!

James Smith JSMITH at PRESIDIO.com
Mon Jul 26 14:29:49 MEST 1999

Indexmaker is working as advertised. If the -r (-M or -m) option, which
controls regexp pattern matching, is omitted, the default regexp is a dot
".", which will match any single character. As this is used to match text on
the Title[]: line, any text in the title line (excluding the target
definition) will cause a match. If there is a match, the record is included
in the indexmaker output. Since you put the IP address as the argument for
-r, if that text string ( is not on any Title[]: line, no records
will be output.

>From the indexmaker source file:
 This tool will read the contents of each mrtg.cfg file and will 
 return the HTML code of a webpage contanig the 'daily' graphs 
 of all the routers whose titles match the regular expression.

To get your output by IP address, put the IP address in the Title[]: line of
the records in the mrtg.cfg file. Then you may sort on IP (using the -r
option), realizing that all matching is going to be based on textual
precedence, not numerical precedence.

Here is a snip from my mrtg.cfg file:

Target[ATM_Card_2_Port_1]: 48:xxx at
MaxBytes[ATM_Card_2_Port_1]: 18750000
Title[ATM_Card_2_Port_1]: Building 11 -- Network Core (): atc2p1
PageTop[ATM_Card_2_Port_1]: <H1>Traffic Analysis for atc2p1


If I use -r '' as an indexmaker argument, I get nothing,
because is not a part of a Title[...]: line. If I use -r
'atc2', I would get every record that had atc on that line, and this record
would be used. For my mrtg.cfg file, this would return every port on ATM
Card 2...

Your solution is to add the IP to every Title[...]: line as appropriate...

Jim Smith

-----Original Message-----
From: lfiddler at us.ibm.com [mailto:lfiddler at us.ibm.com]
Sent: Friday, July 23, 1999 7:11 PM
To: Eric Werner
Cc: mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: Indexmaker... please HELP!!!

Just to clarify so that we are on the same page here....

This is what I am typing :     Indexmaker -r ''
/usr/local/mrtg2.7/cfg_files/asp_mrtg.cfg > /tmp/index.html

I get back the usage error.  Exactly what you sent me (below).

Works if I don't use -r ''... creates the full file, but we want
it by
device not all of the devices in one HTML file.

Any suggestions would be appreciated...

Thank you

Lisa Fiddler
Network Performance Measurements
Raised Floor, Building 025
(Outside):  303-924-6290
(Tie/Line): 303-263-6290
Pager:        303-878-0157
Madness takes it's toll.... Please have exact change ready.

* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg

More information about the mrtg mailing list