[mrtg] Centos 5 mrtg setup

Bob Hoffman bob at bobhoffman.com
Fri Sep 5 04:31:17 CEST 2008


This is a link to where I am now

Here is the problem I am having.

In installed centos 5.1/5.2, running as a standalone webserver.
MRTG is running with a cron and it is not causing any errors.

However, the installation is left as it was when centos did it. Working, but
perhaps not correctly yet.

When trying to make the graphs and all, with indexmaker, I get this error.

Use of uninitialized value in hash element at /usr/bin/indexmaker line 352

That line corresponds to this section here...
my $host = $$rcfg{host}{$first};

I am assuming somewhere that I am not referencing the NIC or the server
correctly. The cfg file is as it was when installed with just an addition of
a workdir.

WorkDir: /var/www/mrtg/
HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg

I turned on snmpd and left it on...and some files were created, but nothing
is in them.

/etc/mrtg/ is where they were created. Mrtg.cfg_9746, mrtg.conf_l, mrtg.ok

The index page is there with the png files for MRTG, but nothing is ever in
them..and the indexmaker keeps doing the error.

So.... Should I add something to the mrtg.cfg telling it to look at
localhost,, all the ips of my NIC that are assigned, one of my
domains, localhost.localdomain (my server name), add an alias in /etc/hosts
or etc/resolv and then add it to the cfg.

I have read dozens of online pages and manuals, all the docs that came with
it...and I found literally hundreds of people on forums with the same exact
issue....but no one has ever posted a solution.

Any help appreciated.


More information about the mrtg mailing list