[mrtg] Duplicate graph problem

DA Forsyth iwrtech at iwr.ru.ac.za
Thu Apr 10 11:55:34 CEST 2008


On 9 Apr 2008 , Marcus entreated about
 "Re: [mrtg] Duplicate graph problem":

> From: Marcus 
> Sent: Wednesday, April 09, 2008 10:21 AM
> To: 'j.halifax .'
> Subject: RE: [mrtg] Duplicate graph problem
> 
> Hi Leos,
> 
> Thank you for touching base on this issue with me.  The details on my
> configuration are built on 14 switches with minimal modifications: 

I see you're putting all of the stuff into one CFG file.  I think 
this is bad as you'll probably get name conflicts which is what I 
think is causing your duplicate graphs.  also, a big CFG takes ages 
to run, I much prefer to be able to run them sequentially, or 
parallel them at my choice.

I use indexmaker to create an index for each cfg, and then use some 
PHP on the server to find and list the indexes available.
The indexmaker call inserts the PHP, something like
indexmaker --title="Main Stats" --columns=2 \
  --pagetop="Generated: `date`<br><?PHP include('head.inc'); ?>" \
  iwr.cfg > /usr/local/www/data/mrtg/index.html

'head.inc' contains php to find and list any file named
index*.html
that is NOT 'index.html'

So this cfg is the main one, and all others are sub pages.
Sub pages get a slightly different header, it just has a 'back' link 
to the index.html file

You are welcome to the php,
see it in action here http://iwr.ru.ac.za/mrtg

Also, if you're going to do separate cfg's you should maybe delete 
all old data so you know you are starting fresh.

oh, have you checked how many rrd files you've got and whether they 
all get updated or not?  if you have as many files as you've got  
targets in the CFG, then they may be updating correctly but the index 
is wrong causing incorrect displays.  if some of the rrd's don't 
exist or don't get updated, the problem lies outside of indexmaker.


--
       DA Fo rsyth            Network Supervisor
Principal Technical Officer -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/




More information about the mrtg mailing list