install mrtg to monitor load
|
yum install mrtg
vi /etc/httpd/conf.d/mrtg.conf - add your ip here for access OR replace Location section with this for pass protection if needed..
##
<Directory /var/www/mrtg>
AllowOverride AuthConfig
</Directory>
htpasswd -c /var/www/.htpasswd username
vi /var/www/mrtg/.htaccess
AuthUserFile /var/www/.htpasswd
AuthGroupFile /dev/null
AuthName 'Restricted'
AuthType Basic
require valid-user
##
vi /etc/mrtg/mrtg.cfg - append this and modify to suit..
Title[loadavg]: Load Averages
PageTop[loadavg]: <h1>Load Average</h1>
Target[loadavg]: `/usr/local/bin/linux_loadavg_mrtg`
MaxBytes[loadavg]: 100
Options[loadavg]: growright,gauge,absolute,nopercent
YLegend[loadavg]: Load Average
ShortLegend[loadavg]: -
Legend1[loadavg]: Load Average (1min)
Legend2[loadavg]: n/a
Legend3[loadavg]: Maximal 5 Minute Load Average
Legend4[loadavg]: n/a
LegendI[loadavg]: Value:
LegendO[loadavg]: n/a:
wget http://oss.oetiker.ch/mrtg/pub/contrib/linux_loadavg_mrtg.tar.gz
tar xzvf linux_loadavg_mrtg.tar.gz
cd linux_loadavg_mrtg
make
make EXE_DIR=/usr/local/bin/ install
vi /etc/cron.d/mrtg
indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg
cd;rm -fR linux_loadavg_mrtg.tar.gz linux_loadavg_mrtg
service httpd reload
|
Tags: mrtg monitoring centos |
|
|
Back