HOWTO: Install MRTG (FULLY AUTOMATED)

I also have the same problem..

I also having the same problem, the mrtg just empty, just appear the empty directory listing.

I solved it with,
installed it again

cd /usr/local/updatescript/
./update.script MRTG

It appears alot of problem.. I try to run the entry in crontab, and appear this.

-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case. Try the following command to start:

env LANG=C /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg
-----------------------------------------------------------------------

So, i just run it as suggested, and edited the entry in my crontab, and it works.. It just works, with no data yet..
 
so, finally got this to install on Debian 4.0r3.

But I'm not sure if it is working.

First I got this error
Code:
Executing MRTG for the first time (you may see some warnings)...
-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
       variable LANG is set to UTF-8. Please run mrtg in an environment
       where this is not the case. Try the following command to start:

       env LANG=C /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg
-----------------------------------------------------------------------
If you see warnings above, it is generally safe to ignore.
Cleaning up installation...
Installation of MRTG complete!

So I update the crontab to: */5 * * * * root env LANG=C /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg

and to test run: env LANG=C /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg

which yields
Code:
2008-06-21 19:12:29, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove index.old updating log file
2008-06-21 19:12:29, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove tcp.old updating log file
2008-06-21 19:12:29, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove load.old updating log file
2008-06-21 19:12:29, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove swap.old updating log file
2008-06-21 19:12:29, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove processes.old updating log file
2008-06-21 19:12:29, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove uptime.old updating log file
2008-06-21 19:12:29, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove cpu.old updating log file
2008-06-21 19:12:29, Rateup WARNING: /usr/local/mrtg-2/bin/rateup Can't remove memory.old updating log file

are these a cause for concern?
 
Last edited:
i have same problem on my web server

i can't install mrtg with install.mrtg.sh script my problem is same with conkgai mrtg is not making but i have installed gd or other requirements.what is this problem ? i think maybe we can install gd with --disable-shared but where i am going to write in my files for gd ?
 
hey guys. I've been running MRTG for a while now.

The only problem I have is the CPU Utilization graphs do not work at all.
They did work in the past, however a few weeks back I did a reinstall of the O/S and MRTG...since it has not worked.

Any suggestions?

Thank you in advance
 
server1# cfgmaker [email protected] > /usr/local/etc/mrtg/mrtg.cfg
Can't locate SNMP_util.pm in @INC (@INC contains: /usr/local/bin/../lib/mrtg2 /usr/local/bin /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/bin/cfgmaker line 105.
server1# cat /usr/local/etc/mrtg/mrtg.cfg

anyone knows an solution?

i'm running freebsd 6.3

cpan> install Net::SNMP
Net::SNMP is up to date.
so that can't be the problem?
 
Last edited:
Code:
cd /root
fetch "http://search.cpan.org/CPAN/authors/id/W/WM/WMARQ/SNMP-Util-1.8.tar.gz"
tar xvfz SNMP-Util-1.8.tar.gz
cd SNMP-Util-*
perl Makefile.PL
make
make install

or

Code:
cd /usr/ports/net-mgmt/p5-SNMP-Util
make install clean
 
server1# perl Makefile.PL
Checking for SNMP, V1.8 ok

Enter the IP address of the Device: 127.0.0.1
Enter the SNMP community string: westhost
Writing Makefile for SNMP::Util
server1# make install
Installing /usr/local/lib/perl5/site_perl/5.8.8/SNMP/Util.pm
Installing /usr/local/lib/perl5/site_perl/5.8.8/SNMP/Util_env.pm
Installing /usr/local/lib/perl5/5.8.8/man/man3/SNMP::Util.3
Writing /usr/local/lib/perl5/site_perl/5.8.8/mach/auto/SNMP/Util/.packlist
FreeBSD: Registering installation in the package database
Appending installation info to /usr/local/lib/perl5/5.8.8/mach/perllocal.pod

server1# /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
Can't locate SNMP_util.pm in @INC (@INC contains: /usr/local/bin/../lib/mrtg2 /usr/local/bin /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/bin/mrtg line 292.

still the same error
 
Might have to do:

ln -s /usr/local/lib/perl5/site_perl/5.8.8/SNMP/Util.pm /usr/local/lib/perl5/site_perl/5.8.8/SNMP/SNMP_util.pm
 
i tryed

make -C /usr/ports/net-mgmt/p5-SNMP_Session install clean

and that solvs the error

does anyone has the system file that works on freebsd with spam stats?

Greets,
 
prob with mrtg.cfg html

Hi for me this worket like a clock
and i have also made my own scripts
but i cant get the
mrtg.cfg with

# HTML formatting stuff


to work i got
/usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/core/mrtg.cfg
i got
ERROR: Line 18 (<table cellspacing="0") in CFG file (/var/www/html/mrtg/core/mrtg.cfg) does not make sense

do you have som fast answear what i can have done wrong?
iam trying this one

###############################################################################
#
# HTML formatting stuff
#
###############################################################################

PageTop[^]: <table cellspacing="0" cellpadding="10" border="0" width="100%" align="center"><tr><td width="185" valign="top" class="small"><table cellspacing="0" cellpadding="5" border="0" width="100%"><tr><td class="tableh">Network</td></tr><tr><td class="tablesh"><a href="index.html">- Traffic</a><br><a href="tcp.html">- Open Connections</a></td></tr><tr><td> </td></tr><tr><td class="tableh">System Stats</td></tr><tr><td class="tablesh"><a href="load.html">- Load Averages</a><br><a href="swap.html">- Swap Memory</a><br><a href="processes.html">- Processes</a><br><a href="uptime.html">- Uptime and Idle Time</a><br><a href="cpu.html">- CPU</a><br><a href="memory.html">- Memory Usage</a><br><a href="pop3.html">- Email POP3 Logins</a><br><a href="imap.html">- Email IMAP Logins</a><br><a href="mail.html">- Email Delivered</a><br><a href="queue.html">- Email Queued</a><br><a href="spam.html">- Email Spam Blocked</a><br><a href="sa.html">- SpamAssassin Scans</a></td></tr><tr><td> </td></tr></table></td><td>
PageFoot[^]: </td></tr></table>
AddHead[^]: <meta http-equiv='Expires' content='-1'><style><!-- body { text-align: center; background-color: #CCCCCC; font-size: 10pt; font-family: arial, verdana; } th, td { font-size: 10pt; font-family: arial, verdana; } h3 { font-size: 12pt; font-family: arial, verdana; font-weight: bold; } .small { font-size: 8pt; font-family: arial, verdana; } .tableh { font-size: 10pt; font-family: arial, verdana; color: white; background-color: black; font-weight: bold; } .tablesh { font-size: 10pt; font-family: arial, verdana; color: black; background-color: #999999; font-weight: normal; } a:visited, a:active, a:link { text-decoration: none; font-weight: normal; font-family: arial, verdana; color: black; } a:hover { font-weight: normal; font-family: arial, verdana; background-color: #999999; color: white; } --></style>

###############################################################################



tnx for the help :)
 
dns stats

Anyone have this setup to pull dns stats as well, I'd be interested in how to do this on centos.
 
What sort of dns stats do you want? You can use mrtg to graph just about anything you can imagine just need a script to create the numbers to feed to mrtg.
 
I'm working .. all data seems to be coming through ..

although the pop3/imap/spam email logs just seem to be increasing .. I thought it would be a 5 minute average of what just went on .. it just seems to be an increasing total ..
 
EMPTY
help me.

Index of /mrtg
[ICO] Name Last modified Size Description
[DIR] Parent Directory -
Apache/2 Server at IP Port 80
 
i want to install mrtg like :

http://70.38.22.154/mrtg/

Have you used the update.script of Wael?

It does it for you.
If you already started the process, meaning if you tried to install it and it didn't work for you, you MUST erase the mrtg/ directory and it's content and then let the update.script run again.

This should work fine for you.

-Alon.
 
Back
Top