
|
View Full Version : HOW-TO: MRTG on RH 7.3 & 9.0 with CPanel
mainarea 01-20-2004, 08:57 PM RedHat 7.3 with CPanel:
Uninstall any previous version of MRTG that you may have:
rpm -e mrtg
Install the new version:
rpm http://download.cheetaweb.com/mrtg-2.9.17-1cpanel.i386.rpm -Uvh
Start and stop MRTG three or four times (until errors stop):
service mrtg restart
Add MRTG to startup:
chkconfig --add mrtg
-------------------------------------------------------------------
You can replace /etc/mrtg/mrtg.cfg with the "growright" version, located in the attached file.
RH 9.0 with CPanel:
# pico /etc/sysconfig/i18n
change LANG to LANG="en_US"
# reboot
# rpm -e mrtg
# cd /usr/lib
# ln -s libpng.so.3 libpng.so.2
# rpm http://download.cheetaweb.com/mrtg-2.9.17-1cpanel.i386.rpm -Uvh
# service mrtg restart
# chkconfig --add mrtg
You can also replace /etc/mrtg/mrtg.cfg with the growright version (attached).
With RedHat 8, I've come across too many problems with RPMs not compatible with it. I have yet to try this on Fedora 1, I'll let everybody know how that install goes when I try it.
- Matt
Cirtex 01-20-2004, 09:03 PM Great how to Matt. Very user friendly.
Akash 01-20-2004, 09:09 PM growright version (attached).
will you be attaching these?
mainarea 01-20-2004, 10:00 PM Originally posted by Akash
will you be attaching these?
hoobastank - if you could please edit your post to remove the sig? :)
I thought it attached... let me try again. Sorry about that :D Also, the RH 9.0 version should work on Fedora 1, but I only have a plain Fedora box to test on, not one with CPanel. It should work, but I can't guarantee it.
This version of MRTG includes:
Network
- Traffic
- Open Connections
System Stats
- Load Averages
- Swap Memory
- Processes
- Uptime and Idle Time
- CPU
- Memory Usage
- Mail Counts
- Mqueue Usage
- Email Totals
- Matt
Pheaton 01-22-2004, 10:31 AM any idea as to why all the graphs are broken images?
Running RH9 with cpanel.
mainarea 01-23-2004, 07:32 AM Originally posted by cMark
any idea as to why all the graphs are broken images?
Running RH9 with cpanel.
Do the images actually exist on the drive? If so, and they're broken, you probably need to reinstall libpng.
- Matt
Pheaton 01-23-2004, 08:13 AM they are on the hdd, which version should be reinstalled?
mainarea 01-23-2004, 05:07 PM According to the RPM, "Application was compiled with png.h from libpng-1.2.2".
- Matt
zagadka 01-25-2004, 06:11 AM all done well
how can i see graphs?
address?
Pheaton 01-25-2004, 09:02 AM http://IPADDRESS/mrtg/
nevermind read the wrong section :/
<edit>signature removed</edit>
oops Nevermind
<edit>signature removed</edit>
Steven 01-27-2004, 08:25 PM Alias /mrtg/ /usr/local/apache/htdocs/mrtg/
might need to add that to ur httpd.conf
<edit>signature removed</edit>
hivehost 01-29-2004, 01:53 AM Thanks! This has been informative!
linux-tech 02-02-2004, 11:20 AM Here's my 0.02 on this one (good post btw).
I'm rather intense on data. I want to know what's going where and how much of it. So, managed to update MRTG configs to do (somewhat) what I'm after . Here's what this one will do:
Exim Additions:
Track Spam blocks
Track SpamCop blocks (they're usually the top blockers, but I like to know how much the rest is keeping track of).
Track Rejected email.
Other Additions:
Track Drive space (big one here!!:))
Track Apache Stats (busy/idle/uptime/hits/averages)
For Exim:
in /etc/mrtg/system, add
if [ "$TYPE" = "mail1" ]; then
INDATA=`grep "not permitted" /var/log/exim_rejectlog -c`
OUTDATA=`grep "verify fail" /var/log/exim_rejectlog -c`
fi
if [ "$TYPE" = "mailstats" ]; then
INDATA=`grep "<=" /var/log/exim_mainlog -c`
OUTDATA=`grep "=>" /var/log/exim_mainlog -c`
fi
if [ "$TYPE" = "mailblocked" ]; then
INDATA=`grep "H=" /var/log/exim_rejectlog -c`
OUTDATA=`grep "viruses" /var/log/exim_mainlog -c`
fi
if [ "$TYPE" = "mailspam" ]; then
INDATA=`grep "ISP" /var/log/exim_rejectlog -c`
OUTDATA=`grep "bl.spamcop" /var/log/exim_rejectlog -c`
fi
I'll cover all the mrtg.cfg additions later on in the post.
For Drives:
create a file called /etc/mrtg/drivestats.sh and put the following in it:
#!/bin/sh
df="/bin/df"
cut="/usr/bin/cut"
grep="/bin/grep"
part=$1
line=`$df -m -x nfs| grep "$part"`
libre=`echo $line|$cut -d" " -f 2`
utilise=`echo $line|$cut -d" " -f 3`
size=`mmcalc $libre/1024 | cut -d '=' -f2`
free=`mmcalc $utilise/1024 | cut -d '=' -f2`
echo $size
echo $free
For Webserver/Apache (please note: you MUST have server-status set to allow localhost for this to work in httpd.conf, and it MUST be running!)
Create a file called /etc/mrtg/webstat.pl
In there, add:
#!/usr/bin/perl
# depends on availability of status and extended status info from your
# Apache webserver -- your httpd.conf needs to include something like the
# following: (uncommented)
#<Location /server-status>
# SetHandler server-status
# Order allow,deny
# Allow from localhost
#</Location>
#ExtendedStatus On
# can return hits or bytes (counters)
@res = `lynx -dump http://localhost:80/server-status`;
foreach $res (@res) {
if ($res =~ /Server uptime: (.*)$/) { $up = $1; last } else { next }
if ($res =~ /Server at/) { $server = $res; last } else { next }
}
@res = `lynx -dump http://localhost:80/server-status?auto`;
foreach $res (@res) {
if ($res =~ /Total Accesses: (\d+)/) { $d1 = $1; next }
if ($res =~ /Total kBytes: (\d+)/) { $d2 = $1 / 1024; next }
if ($res =~ /BusyServers: (\d+)/) { $d3 = $1; next }
if ($res =~ /IdleServers: (\d+)/) { $d4 = $1; next }
if ($res =~ /ReqPerSec: (\d+)/) { $d5 = $1; next }
if ($res =~ /BytesPerSec: (\d+)/) { $d6 = $1; next }
if ($res =~ /BytesPerReq: (\d+)/) { $d7 = $1; next }
if ($res =~ /Uptime: (\d+)/) { $d8 = $1 / 60; next }
}
$d1 = int($d1);
$d2 = int($d2);
$d3 = int($d3);
d4 = int($d4);
$d5 = int($d5);
$d6 = int($d6);
$d7 = int($d7);
$d8 = int($d8 / 60);
if ($ARGV[0] eq "hits") {
print "$d1\n";
}
if ($ARGV[0] eq "bytes") {
print "$d2\n";
print "$d2\n";
}
if ($ARGV[0] eq "status") {
print "$d3\n";
print "$d4\n";
}
if ($ARGV[0] eq "busy") {
print "$d3\n";
}
if ($ARGV[0] eq "idle") {
print "$d4\n";
}
if ($ARGV[0] eq "rps") {
print "$d5\n";
}
if ($ARGV[0] eq "bps") {
print "$d6\n";
}
if ($ARGV[0] eq "bpr") {
print "$d7\n";
}
if ($ARGV[0] eq "uptime") {
print "$d8\n";
print "$d8\n";
print "$d8\n";
}
#print "$up\n";
#print "$server";
from shell, type the following (as root):
chmod a+x /etc/mrtg/webstats.pl
chmod a+x /etc/mrtg/drivestats.sh
and add the following to /etc/mrtg/system:
if [ "$TYPE" = "webhits" ]; then
INDATA=`/etc/mrtg/webstat.pl hits`
OUTDATA=`/etc/mrtg/webstat.pl hits `
fi
if [ "$TYPE" = "bytes2" ]; then
INDATA=`/etc/mrtg/webstat.pl bps`
OUTDATA=`/etc/mrtg/webstat.pl bpr `
LEGEND1=`/etc/mrtg/webstat.pl rps `
fi
if [ "$TYPE" = "webservers" ]; then
INDATA=`/etc/mrtg/webstat.pl busy`
OUTDATA=`/etc/mrtg/webstat.pl idle `
fi
Now, for the nuts and bolts of it all. At the top of mrtg.cfg, with the other file links, add:
<tr><td class="tableh">Apache Stats</td></tr><tr><td class="tablesh">
<a href=apache.html>- Apache Hits</a><br><a href=apache_up.html>- Apache Uptime</a><br>
<a href=apache_busy.html>- Server Status (Idle/Busy)</a><br>
<a href=apache_bytes2.html>- Data Breakdown (Bytes)</a><br><a href=apache_bytes.html>- Total Data Processed
</a><td> </td></tr>
<tr><td class="tableh">Exim Stats</td></tr><tr><td class="tablesh">
<a href=spam.html>- Spam Blocked</a><br><a href=rejected.html>- Other Rejected</a>
<br><a href=smtp.html>- SMTP Connections</a><br>
<a href=rejected2.html>- Viruses/Other Rejected</a><br><tr><td> </td></tr>
Tweak the following for YOUR server
<tr><td class="tableh">Drive Stats</td>
</tr><tr><td class="tablesh"><a href=hda1.html>- / </a><br>
<a href=hda2.html>- /var </a><br> <a href=hda4.html>- /home<br>
<a href=hdb1.html>- /backup</td></tr><tr><td> </td></tr>
Remember, ALL of the above must fit in one line. It's a VERY long line, but it must ALL fit there!! It can be done though, because I've done it myself.
Now, at the bottom (or somewhere near there) of mrtg.cfg, add:
Target[apache_up]: `/etc/mrtg/webstat.pl uptime`
Title[apache_up]: Apache Uptime
PageTop[apache_up]: Hours
YLegend[apache_up]: Hours
ShortLegend[apache_up]: Hours
LegendI[apache_up]: Uptime
LegendO[apache_up]: Uptime
Legend1[apache_up]: Uptime
Legend2[apache_up]: Uptime
#---------Apache uptime-----------------------
Target[apache_busy]: `/etc/mrtg/webstat.pl status`
YLegend[apache_busy]: Servers
ShortLegend[apache_busy]: Servers
LegendI[apache_busy]: Busy :
LegendO[apache_busy]: Idle :
Legend1[apache_busy]: Busy Servers
Legend2[apache_busy]: Idle Servers
Title[apache_busy]: Servers (Busy/Idle)
PageTop[apache_busy]: Servers (Busy/Idle)
#------------End Apache Hits------------------
#---------Apache uptime-----------------------
Target[apache_bytes2]: `/etc/mrtg/system bytes2`
YLegend[apache_bytes2]: Bytes
ShortLegend[apache_bytes2]: Bytes
LegendI[apache_bytes2]: Per Second
LegendO[apache_bytes2]: Per Request
Legend1[apache_bytes2]: Requests Per Second
Legend2[apache_bytes2]: Bytes Per Request
Title[apache_bytes2]: Byte Data
PageTop[apache_bytes2]: Byte Data
#------------End Apache Hits------------------
#---------Apache hits-----------------------
Title[apache]: Apache Webhits
Target[apache]: `/etc/mrtg/system webhits`
YLegend[apache]: Total Hits
ShortLegend[apache]: Total Hits
LegendI[apache]: Hits
LegendO[apache]: Hits
Legend1[apache]: Total Hits
Legend2[apache]: Total Hits
#------------End Apache Hits------------------
#---------Apache traffic-----------------------
Target[apache_bytes]: `/etc/mrtg/webstat.pl bytes`
YLegend[apache_bytes]: Bytes
ShortLegend[apache_bytes]: Meg
LegendI[apache_bytes]:
LegendO[apache_bytes]: Apache Traffic:
Legend1[apache_bytes]: Apache Traffic:
Legend2[apache_bytes]: Apache Traffic:
Title[apache_bytes]: WebServer Traffic
PageTop[apache_bytes]: APACHE TRAFFIC
#------------End Apache Traffic------------------
#exim stats
Target[smtp]: `/etc/mrtg/system mailstats`
Title[smtp]: Total Connections
PageTop[smtp]: Total Connections
ShortLegend[smtp]:
YLegend[smtp]: Total connections
LegendI[smtp]: Incoming
LegendO[smtp]: Outgoing
Legend1[smtp]: Messages
Legend2[smtp]:
#exim stats
Target[spam]: `/etc/mrtg/system mailspam`
Title[spam]: Total Spam Blocks
PageTop[spam]: Total Spam Blocks
ShortLegend[spam]:
YLegend[spam]: Total Blocked
LegendI[spam]: Spam Blocked
LegendO[spam]: Spamcop Blocked
Legend1[spam]: Messaages
Legend2[spam]:
#exim stats
Target[rejected]: `/etc/mrtg/system mail1`
Title[rejected]: Rejected Mail
PageTop[rejected]: Total Relays Rejected
ShortLegend[rejected]:
YLegend[rejected]: Rejected Mail
LegendI[rejected]: Relays Rejected
LegendO[rejected]: Auth Fail
Legend1[rejected]: Messaages
Legend2[rejected]:
#exim stats
Target[rejected2]: `/etc/mrtg/system mailblocked`
Title[rejected2]: Rejected Mail
PageTop[rejected2]: Rejected Mail
ShortLegend[rejected2]:
YLegend[rejected2]: Rejected Mail
LegendI[rejected2]: Total Blocked
LegendO[rejected2]: Viruses Blocked
Legend1[rejected2]: Messaages
Legend2[rejected2]:
Confused yet? Well, you're about there. Now, configure this code to your liking, and add it at the bottom of mrtg.cfg
#---------/dev/hda1-----------------------
Target[hda1]: `/etc/mrtg/drivestats.sh hda1`
Options[hda1]: nopercent, growright, noinfo,gauge
Colours[hda1]: GREEN#008080,RED#FF0000,GREEN#008080,RED#FF0000
Title[hda1]: disk usage for /
PageTop[hda1]: disk usage for /
ShortLegend[hda1]: Gig
YLegend[hda1]: Gig
LegendI[hda1]: Drive Space:
LegendO[hda1]: Used Space:
Legend1[hda1]: Drive Space:
Legend2[hda1]: Used Space:
#---------/dev/hda2-----------------------
For message length, I only put ONE of my drives up as an example, but you can do the homework from there.
Wanna see it in action? Check here (http://64.62.140.27/mrtg/index.cgi/index.html).
Enjoy
<edit>signature removed</edit>
linux-tech 02-02-2004, 11:46 AM Sorry for the double:
I just realized I'd changed my RBL blocked message to something non custom, so you'll need to change
if [ "$TYPE" = "mailspam" ]; then
INDATA=`grep "ISP" /var/log/exim_rejectlog -c`
OUTDATA=`grep "bl.spamcop" /var/log/exim_rejectlog -c`
fi
to
if [ "$TYPE" = "mailspam" ]; then
INDATA=`grep "blacklist" /var/log/exim_rejectlog -c`
OUTDATA=`grep "bl.spamcop" /var/log/exim_rejectlog -c`
fi
in the above post. I BELIEVE that the word "blacklist" occurs in the default RBL message, though I could be wrong there too :)
<edit>signature removed</edit>
Lem0nHead 02-23-2004, 04:34 PM isn't it needed to execute
chkconfig --level 345 mrtg on
to set mrtg to run on start?
thanks
Apocalypse 02-24-2004, 12:31 PM One small typo on wolfstream webstat.pl
this:
d4 = int($d4);
Has to be:
$d4 = int($d4);
<edit>signature removed</edit>
Apocalypse 02-24-2004, 02:24 PM Also MMCALC (http://sourceforge.net/projects/mmcalc/) is required for the drive calculations work.
(Could a mod please merge this one with my last post?, i cant edit here after 15 minutes)
<edit>signature removed</edit>
Apocalypse 02-25-2004, 12:23 PM Wolfstream additions are great, but on a 2.8mhz p4 with usual load of 0.1 it has go up to 0.25 (the server is almost empty).
grep is eating a lot of resources. 36% to 99% for almost a minute or so every 5 minutes. :bawling:
(merge this also with the last post)
<edit>signature removed</edit>
lexis2004 03-04-2004, 10:35 PM I have tried on several diff occasions to install mrtg as per this tutorial. I have red hat 9.0 and cpanel. After doing the rpm then the restart, I always get these errors..
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'index'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'tcp'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'load'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'swap'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'processes'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'uptime'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'cpu'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'localhost.mem'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-totals'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-queue'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-count'
Signal was 0, Returncode was 127
I restart many many times. I can never get past this step..
any suggestions?
Thanks, Kevin
Cirtex 03-04-2004, 11:10 PM K, do rpm -e mrtg
and re-install mrtg following these instructions:
http://forums.burst.net/showthread.php?s=&threadid=751
Originally posted by lexis2004
I have tried on several diff occasions to install mrtg as per this tutorial. I have red hat 9.0 and cpanel. After doing the rpm then the restart, I always get these errors..
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'index'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'tcp'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'load'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'swap'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'processes'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'uptime'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'cpu'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'localhost.mem'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-totals'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-queue'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-count'
Signal was 0, Returncode was 127
I restart many many times. I can never get past this step..
any suggestions?
Thanks, Kevin
lexis2004 03-04-2004, 11:25 PM Ok, I have it working!! I am so new to this stuff.. Which httpd.conf. file do I need to edit and whee exactly do I need to add the info as stated for the addons..
Thanks, Kevin
lexis2004 03-04-2004, 11:53 PM Hi. I have tried to make the changes as per wolfstreams instruction. I do not get any more stats. here (66.194.41.5/mrtg/)
UniSol 03-09-2004, 09:34 AM I get the following error each time I restart MRTG and every 5 minute refesh.
ls: /var/spool/exim/input/*-H: No such file or directory
ls: /var/spool/exim/input/*-H: No such file or directory
ls: /var/spool/exim/input/*-H: No such file or directory
Cheers
Apocalypse 03-09-2004, 09:32 PM cd /etc/mrtg
pico check-mail
Find this line "/var/spool/exim/input/*-H" without the quotes, it should be a few lines from the top and replace with:
"/var/spool/exim_incoming/input/*-H" without the quotes.
that should fix that one.
then just
/etc/rc.d/init.d/mrtg restart
To restart mrtg
:)
What i did to keep the load down was just disable the email checks, my load now is 0.01 on that server
<edit>signature removed</edit>
UniSol 03-10-2004, 06:29 AM I have had 1000 emails sent to me saying:
Daemonizing MRTG ...
ERROR: I Quit! Another copy of mrtg seems to be running. Check /etc/mrtg/mrtg.pid
How do I sotp this cron or someting?
mainarea 03-24-2004, 05:10 PM Originally posted by UniSol
I have had 1000 emails sent to me saying:
Daemonizing MRTG ...
ERROR: I Quit! Another copy of mrtg seems to be running. Check /etc/mrtg/mrtg.pid
How do I sotp this cron or someting?
Try this:
crontab -e
Remove the MRTG line, save the cron file.
- Matt
<edit>signature removed</edit>
evilek 03-24-2004, 07:07 PM very nice :)
thank you, its worked!
mrl14 04-03-2004, 12:15 AM I keep getting errors on RHE. Any special guidelines for that?
photogrammer 04-03-2004, 02:35 PM I followed wolfstream's stuff, and got these messages:
oot@root [/]# service mrtg restart
Shutting down MRTG: [ OK ]
Starting MRTG: Daemonizing MRTG ...
root@root [/]# WARNING: Running '/etc/mrtg/system network eth0': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system network eth0'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system tcp': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system tcp'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system load': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system load'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system swap': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system swap'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system processes': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system processes'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system uptime': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system uptime'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system bytes2': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system bytes2'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system webhits': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system webhits'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system mailstats': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system mailstats'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system mailspam': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system mailspam'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system mail1': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system mail1'
Maybe the external command did not even start. (No such file or directory)
WARNING: Running '/etc/mrtg/system mailblocked': No such file or directory
WARNING: Could not get any data from external command '/etc/mrtg/system mailblocked'
Maybe the external command did not even start. (No such file or directory)
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
WARNING: Problem with External get '/etc/mrtg/drivestats.sh hda1':
Expected a Number for 'in' but got ''
WARNING: Problem with Externale get '/etc/mrtg/drivestats.sh hda1':
Expected a Number for 'out' but got ''
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
WARNING: Problem with External get '/etc/mrtg/drivestats.sh hda2':
Expected a Number for 'in' but got ''
WARNING: Problem with Externale get '/etc/mrtg/drivestats.sh hda2':
Expected a Number for 'out' but got ''
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
WARNING: Problem with External get '/etc/mrtg/drivestats.sh hda3':
Expected a Number for 'in' but got ''
WARNING: Problem with Externale get '/etc/mrtg/drivestats.sh hda3':
Expected a Number for 'out' but got ''
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
WARNING: Problem with External get '/etc/mrtg/drivestats.sh hda5':
Expected a Number for 'in' but got ''
WARNING: Problem with Externale get '/etc/mrtg/drivestats.sh hda5':
Expected a Number for 'out' but got ''
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
WARNING: Problem with External get '/etc/mrtg/drivestats.sh hda7':
Expected a Number for 'in' but got ''
WARNING: Problem with Externale get '/etc/mrtg/drivestats.sh hda7':
Expected a Number for 'out' but got ''
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
/etc/mrtg/drivestats.sh: line 1: mmcalc: command not found
WARNING: Problem with External get '/etc/mrtg/drivestats.sh hda8':
Expected a Number for 'in' but got ''
WARNING: Problem with Externale get '/etc/mrtg/drivestats.sh hda8':
Expected a Number for 'out' but got ''
Can anyone help ?
Thanks,
Stefan
igorkl 05-04-2004, 03:44 PM Hi folks,
That file is not available anymore mrtg-2.9.17-1cpanel.i386.rpm, can someone share please?
chillinhh 05-05-2004, 02:17 PM Download isnt available anymore. I need it too.
choon 05-05-2004, 02:23 PM Take a look at this URL ;)
http://download.cheetaweb.com/redhat/7.3/mrtg/
Actual file is:
http://download.cheetaweb.com/redhat/7.3/mrtg/mrtg-2.9.17-1cpanel.i386.rpm
chillinhh 05-05-2004, 02:28 PM ^^Thanks, im getting this though.
Shutting down MRTG: [ OK ]
Starting MRTG: Daemonizing MRTG ...
root@test [~]# /usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'index'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'tcp'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'load'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'swap'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'processes'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'uptime'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'cpu'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'localhost.mem'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-totals'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-queue'
Signal was 0, Returncode was 127
/usr/bin/rateup: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory
WARNING: rateup died from Signal 0
with Exit Value 127 when doing router 'mail-host-email-count'
Signal was 0, Returncode was 127
chillinhh 05-05-2004, 02:53 PM How can i view total Gigs transfered like over the last 30 days
igorkl 05-05-2004, 03:15 PM Originally posted by choon
Take a look at this URL ;)
http://download.cheetaweb.com/redhat/7.3/mrtg/
Actual file is:
http://download.cheetaweb.com/redhat/7.3/mrtg/mrtg-2.9.17-1cpanel.i386.rpm
Thanks a lot, didn't go in that directory, just looked in the root one.
Bizarre 05-17-2004, 05:22 PM Anyone got the link to a cPanel Fedora Core 1 rpm please?
Thanks.
<<< Signature removed >>>
choon 05-17-2004, 06:20 PM That RPM can be used for Fedora Core 1 ;)
Bizarre 05-20-2004, 05:14 PM thanks ;)
<<< Signature removed >>>
RandyO 08-22-2004, 09:18 PM Alternate download:
http://1gighost.com/downloads/mrtg-2.9.17-1cpanel.i386.rpm
mainarea 08-23-2004, 10:12 AM I've done some revisions to my last post about Fedora & CPanel, here's the actual way to make it work:
------------------------------
Here's yet another revision to my MRTG tutorials. Using Fedora on one server, CPanel kept overwriting MRTG with a newer version that didn't have all of the features built into the RPM. After talking with Dan from BurstNet, he gave me a few suggestions which worked out. Here's an all in one tutorial:
Remove previous versions of MRTG:
rpm -e mrtg
pico /etc/sysconfig/i18n
change LANG to LANG="en_US"
reboot
rpm -e mrtg
cd /usr/lib
ln -s libpng.so.3 libpng.so.2
rpm http://download.cheetaweb.com/redhat/7.3/mrtg/mrtg-2.9.17-1cpanel.i386.rpm -Uvh
service mrtg restart
service mrtg restart
service mrtg restart
service mrtg restart
service mrtg restart
chkconfig --add mrtg
Yes, you may need to restart mrtg that many times before it works properly.
If you'd like to replace the email graphs with graphs that have oldest on the left & newest on the right, just like the other graphs, replace the /etc/mrtg.cfg file with the contents of the attached text file (see first page). Otherwise, the email graphs will be graphed in the reverse direction of the other graphs.
Once you've made any revisions to mrtg.cfg, do the following:
chattr +i /usr/bin/mrtg
chattr +i /etc/mrtg/mrtg.cfg
That way, CPanel will not be able to overwrite your configurations. If you need to edit the config file, you must first do "chattr -i /etc/mrtg/mrtg.cfg" and then "chattr +i /etc/mrtg/mrtg.cfg" once you've saved the file again.
To stop those pesky cron errors that MRTG will start giving you, do the following:
rm -f /etc/cron.d/mrtg*
One last step. CPanel uses yum to upgrade things on Fedora, so here's the final step to stop CPanel from even attempting to download MRTG.
pico /etc/yum.conf
Add this line in the [main] section:
exclude=mrtg
Uninstall instructions:
chattr -i /usr/bin/mrtg
chattr -i /etc/mrtg/mrtg.cfg
rpm -e mrtg
That should be it!
- Matt
hybricom 08-26-2004, 12:42 PM First I want to thank you for putting together a nice addon! I just wanted to add a tiny part in case anyone is interested in knowing how to password protect the mrtg pages.
edit /usr/local/apache/conf/httpd.conf and add AuthConfig to the global AllowOverride directive so it looks like this.
AllowOverride None AuthConfig
restart apache
Then in /usr/local/apache/htdocs/mrtg/ create your .htaccess file for password protection.
Also, add
Alias /mrtg/ /usr/local/apache/htdocs/mrtg/
to the VirtualHost you want to view besides using http://server-ip/mrtg/ which you can disable by removing the global Alias /mrtg/ /usr/local/apache/htdocs/mrtg/ and restarting apache
BLazeD 03-14-2005, 02:59 AM Will the tutorial on this page (2nd to last post) work on a CentOS CPanel server?
ddominey86 04-18-2005, 06:24 PM i keep getting an error complaining that /etc/mrtg/system doesn't exist :S, if anyone can give me the contents of this scipt i would HIGHLY appreciate it :D
uneedawebsit 04-20-2005, 10:40 AM Look up earlier in the thread. The system script is given there.
ddominey86 04-20-2005, 10:50 AM Originally posted by uneedawebsit
Look up earlier in the thread. The system script is given there.
ummm...no its not, there might be additions for it, but the full script is not there :(
evilek 06-08-2005, 12:19 PM http://www.dedicated-resources.com/files/mrtg-2.9.17-1cpanel.i386.rpm
MMarko 06-16-2005, 06:56 AM Originally posted by ddominey86
ummm...no its not, there might be additions for it, but the full script is not there :(
Does anybody know how to solve this /etc/mrtg/system doesn't exist ?
neuromancer 06-16-2005, 09:14 PM Can anybody explain installing mrtg again for latest tar.gz version? I tried lost of time but I couldn't do.
MMarko 06-16-2005, 09:17 PM Me neither. Just can't get any graphs and numbers.
|