Install MRTG Directadmin CentOS 5 32/64bit

Problem : MRTG Graph in DirectAdmin cp + CentOS
Solutions:
yum -y install gd gd-devel libpng libpng-devel zlib zlib-devel net-snmp net-snmp-utils mrtg
chkconfig snmpd on
cd /etc/snmp/
mv snmpd.conf snmpd.conf.bak

vim snmpd.conf
############
syslocation Thailand
syscontact admin
sysservices 79
rocommunity public localhost
agentaddress localhost
############

/etc/init.d/snmpd restart
snmpwalk -v1 -cpublic localhost

wget -O /var/www/mrtg/php.load.php www.icez.net/files/php.load.txt
chmod a+x /var/www/mrtg/php.load.php
vim /var/www/mrtg/php.load.php
#find "/usr/bin/php" replace to /usr/local/bin/php

cd /etc/mrtg
mv mrtg.cfg mrtg.cfg.bak
vim mrtg.cfg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt,/usr/share/snmp/mibs/UDP-MIB.txt

WorkDir: /var/www/html/mrtg

Options[_]: growright

EnableIPv6: no

Target[server.traffic]: 2:public@localhost:
SetEnv[server.traffic]: MRTG_INT_IP="12.34.56.78" MRTG_INT_DESCR="eth0"
MaxBytes[server.traffic]: 125000000
Title[server.traffic]: Traffic Load
PageTop[server.traffic]:

Traffic Load


Options[server.traffic]: growright, bits

### Cpu Load ###
Target[cpu]: .1.3.6.1.4.1.2021.10.1.5.1&.1.3.6.1.4.1.2021.10.1.5.2:public@localhost
MaxBytes[cpu]: 100
Unscaled[cpu]: dwmy
Options[cpu]: gauge, absolute, growright, noinfo, nopercent
YLegend[cpu]: CPU Load(%)
ShortLegend[cpu]: (%)
LegendI[cpu]:   CPU System
LegendO[cpu]:   CPU User
Title[cpu]: CPU Analysis
PageTop[cpu]:

CPU Analysis



### Memory Free ###
Target[mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.4.0:public@localhost
MaxBytes1[mem]: 2230288
MaxBytes2[mem]: 2252216
Unscaled[mem]: dwmy
Options[mem]: gauge, absolute, growright, noinfo
YLegend[mem]: Memory Free
ShortLegend[mem]: Bytes
kilo[mem]: 1024
kMG[mem]: k,M
LegendI[mem]: Real
LegendO[mem]: Swap
Legend1[mem]: (MBytes)
Legend2[mem]: (MBytes)
Title[mem]: Memory Analysis
PageTop[mem]:

Memory Analysis



### CPU Load Average ###
Target[public.load]: `/var/www/mrtg/php.load.php`
Title[public.load]: Server load average
PageTop[public.load]:

Server load average


MaxBytes[public.load]: 10000
ShortLegend[public.load]:
YLegend[public.load]:
LegendI[public.load]: cnt
LegendO[public.load]: cnt
Legend1[public.load]: Count
Legend2[public.load]: Count
Options[public.load]: gauge,growright,nopercent

### New TCP Connection Monitoring (per minute) ###
Target[server.newconns]: tcpPassiveOpens.0&tcpActiveOpens.0:public@localhost
Title[server.newconns]: Newly Created TCP Connections
PageTop[server.newconns]:

New TCP Connections


MaxBytes[server.newconns]: 10000000000
ShortLegend[server.newconns]: c/s
YLegend[server.newconns]: Conns / Min
LegendI[server.newconns]: In
LegendO[server.newconns]: Out
Legend1[server.newconns]: New inbound connections
Legend2[server.newconns]: New outbound connections
Options[server.newconns]: growright,nopercent,perminute

### Established TCP Connections ###
Target[server.estabcons]: tcpCurrEstab.0&tcpCurrEstab.0:public@localhost
Title[server.estabcons]: Currently Established TCP Connections
PageTop[server.estabcons]:

Established TCP Connections


MaxBytes[server.estabcons]: 10000000000
ShortLegend[server.estabcons]:
YLegend[server.estabcons]: Connections
LegendI[server.estabcons]: In
LegendO[server.estabcons]:
Legend1[server.estabcons]: Established connections
Legend2[server.estabcons]:
Options[server.estabcons]: growright,nopercent,gauge
kdir /var/www/html/mrtg
indexmaker --columns=2 --output=/var/www/html/mrtg/index.html /etc/mrtg/mrtg.cfg
recheck “http://ip/mrtg” wait 5-10 m.

Blog | , , ,
Line it!