[mrtg] Re: Indexmaker woes

Grendel grendel at interq.ad.jp
Thu Apr 5 19:12:32 MEST 2001


Hi,
	You're not doing anything wrong, as far as that unitialized value error
is concerned. The syntax error you're seeing doesn't affect the output
of indexmaker in any way. If there is a problem in the output of
indexmaker, then the problem is somewhere else.
	Quoting ECHO won't affect it, for it's merely the beginning marker of a
here document. The error says line 174, but only because that's where
the here document begins. The error could be generated by anything
happening inside, but the displayed error message would refer to the
beginning.
	The problematic bit of code is this:

$$opt{pagetop}

	Pagetop is something that's set for individual targets and displayed on
individual target pages. However indexmaker doesn't provide a command
line options for setting pagetop for an index that covers several
targets. The only case I can think of where it might be specifiable for
a central index page is if a config file has a single PageTop[_] tag at
the top that sets the PageTop for all contained targets. Or it could be
intended for a future indexmaker where the index pagetop is somehow a
compilation of individual target pagetops.
	To make the error message go away, edit indexmaker and add the
following line just before the beginning of the here document:

    if (! defined($$opt{pagetop})) { $$opt{pagetop} = '' }

	As for why nothing appears on your index page, the problem is the
filter you're using. Perhaps you meant to write something like --filter
name=~64.210.184 instead of --filter title=~64.210.184. Name stands for
the part between the brackets for a given target, and title stands for
the part that comes after the colon on the Title[blort]: line.
	Hope that helps.

Best regards,
James Overbeck
GMO - http://www.gmo.co.jp/
Tokyo, Japan

Robert Gahl wrote:
> 
> Alas, another newbie question more than likely :(
> 
> I just started using MRTG and have been successful in getting mrtg to
> collect data on three of our routers, and when looking at the subsequent
> html pages it generates, they all look just fine. However, when I run
> indexmaker, all I get is the MRTG banner data and a page with basically no
> body.
> 
> If I run the indexmaker command by hand, I get the following error:
> 
> /usr/local/mrtg-2/bin/indexmaker --columns=1 --filter title=~64.210.184 \
>       --title="Global Center"                                            \
>       --output=/home/fireclick/www/groups/noc/GlobalCenter.html          \
>       /usr/local/mrtg-2/mrtg.cfg
> Use of uninitialized value at /usr/local/mrtg-2/bin/indexmaker line 174.
> --base: Writing /home/fireclick/www/groups/noc/GlobalCenter.html
> 
> Inspecting the perl code in indexmaker, this is assigning some text to the
> variable $index (if memory serves). I have tried putting ECHO in single
> quote, double quotes, back quotes and even changing the ECHO tag to
> something else without success.
> 
> I have tried various --filter logic, have removed the --columns=1, changed
> --columns greater than 2, etc. I've scanned the FAQ for a remedy here, but
> haven't had a lot of luck.
> 
> The applicable bit from the mrtg.cfg file is:
> 
> ### Interface 1 >> Descr: 'FastEthernet0/0' | Name: 'Fa0/0' | Ip:
> '64.209.183.10
> 0' | Eth: '00-01-96-d3-8e-e0' ###
> 
> Target[64.210.184.129_FastEthernet0_0]: \FastEthernet0/0:public at 64.210.184.129:
> SetEnv[64.210.184.129_FastEthernet0_0]: MRTG_INT_IP="64.209.183.100"
> MRTG_INT_DE
> SCR="FastEthernet0/0"
> MaxBytes[64.210.184.129_FastEthernet0_0]: 12500000
> Title[64.210.184.129_FastEthernet0_0]: FastEthernet0/0 External to Globalcenter
>   -- cisco_3640_gblctr
> PageTop[64.210.184.129_FastEthernet0_0]: <H1>FastEthernet0/0 External to
> Globalc
> enter  -- cisco_3640_gblctr</H1>
>   <TABLE>
>     <TR><TD>System:</TD>     <TD>cisco_3640_gblctr in </TD></TR>
>     <TR><TD>Maintainer:</TD> <TD></TD></TR>
>     <TR><TD>Description:</TD><TD>FastEthernet0/0 External to Globalcenter
> </TD></
> TR>
>     <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
>     <TR><TD>ifName:</TD>     <TD>Fa0/0</TD></TR>
>     <TR><TD>Max Speed:</TD>  <TD>100.0 Mbits/s</TD></TR>
>     <TR><TD>Ip:</TD>         <TD>64.209.183.100 ()</TD></TR>
>   </TABLE>
> 
> Any suggestions as to what I am doing wrong here?
> 
> ===
> Bob Gahl Bicycle (Ryan Vanguard) Mobile ||     @
>    ARPA/Internet: bgahl at fireclick.com    ||  !_ \
>      URL: http://www.fireclick.com/      ||  (*)-~--+--(*)
> "If you're trying to be politically correct you're like a chameleon
> in front of a mirror. What can you say that won't be offensive to
> somebody?" Robin Williams
> 
> --
> 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