MRTG: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
Boiarino (talk | contribs)
No edit summary
Boiarino (talk | contribs)
No edit summary
Line 35: Line 35:




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


cd /www/mrtg2.15.0
  cd /www/mrtg2.15.0
mkdir etc
  mkdir etc


#example
  #example
#cfgmaker --global 'WorkDir: /home/httpd/mrtg'  \
  #cfgmaker --global 'WorkDir: /home/httpd/mrtg'  \
#        --global 'Options[_]: bits,growright' \
  #        --global 'Options[_]: bits,growright' \
#        --output /home/mrtg/cfg/mrtg.cfg    \
  #        --output /home/mrtg/cfg/mrtg.cfg    \
#          community@router.abc.xyz
  #          community@router.abc.xyz


DOEN NOT WORK YET ...
  DOES NOT WORK YET ...
/www/mrtg2.15.0/bin/cfgmaker --global 'WorkDir: /www/mrtg2.15.0/etc'  \
  /www/mrtg2.15.0/bin/cfgmaker --global 'WorkDir: /www/mrtg2.15.0/etc'  \
         --global 'Options[_]: bits,growright' \
         --global 'Options[_]: bits,growright' \
         --output /www/mrtg2.15.0/etc/mrtg.cfg \
         --output /www/mrtg2.15.0/etc/mrtg.cfg \
         mrtg@clonweb.jlab.org
         mrtg@clonweb.jlab.org
DOEN NOT WORK YET ...
  DOEN NOT WORK YET ...




#copy old stuff from clasweb-bck:
  #copy old stuff from clasweb-bck:
cd /www/mrtg2.15.0/etc
  cd /www/mrtg2.15.0/etc
scp clasweb-bck:/etc/mrtg/"*" .
  scp clasweb-bck:/etc/mrtg/"*" .


#create 'web' directories
  #create 'web' directories
cd /www/mrtg2.15.0/share
  cd /www/mrtg2.15.0/share
mkdir htmls
  mkdir htmls
mkdir images
  mkdir images
mkdir logs
  mkdir logs






#web stuff from clasweb-bck:
  #web stuff from clasweb-bck:
#scp clasweb-bck:/var/www/html/mrtg.html .
  #scp clasweb-bck:/var/www/html/mrtg.html .
#scp clasweb-bck:/var/www/html/mrtg.tar .
  #scp clasweb-bck:/var/www/html/mrtg.tar .
#tar xvf mrtg.tar
  #tar xvf mrtg.tar


#add following to apache config file (/apps/apache2.2.3/conf/httpd.conf):
  #add following to apache config file (/apps/apache2.2.3/conf/httpd.conf):
Alias /mrtg "/www/mrtg2.15.0/share"
  Alias /mrtg "/www/mrtg2.15.0/share"
<Directory "/www/mrtg2.15.0/share">
  <Directory "/www/mrtg2.15.0/share">
     Options Indexes FollowSymLinks
     Options Indexes FollowSymLinks
     AllowOverride None
     AllowOverride None
     Order allow,deny
     Order allow,deny
     Allow from all
     Allow from all
</Directory>
  </Directory>
#adjust it if necessary
  #adjust it if necessary


#create desired index.html in /www/mrtg2.15.0/share, it will be used
  #create desired index.html in /www/mrtg2.15.0/share, it will be used
#by browser if 'http://clonweb/mrtg/' typed
  #by browser if 'http://clonweb/mrtg/' typed


#copy old stuff from previous htlms/*, images/* and lods/*,
  #copy old stuff from previous htlms/*, images/* and lods/*,
#if 'mrtg' was running before; it will preserve history;
  #if 'mrtg' was running before; it will preserve history;
#'logs' contains recent history, while *.png contains
  #'logs' contains recent history, while *.png contains
#longer history; start 'mrtg' right the way:
  #longer history; start 'mrtg' right the way:
env LANG=C /www/mrtg2.15.0/bin/mrtg /www/mrtg2.15.0/etc/mrtg.cfg
  env LANG=C /www/mrtg2.15.0/bin/mrtg /www/mrtg2.15.0/etc/mrtg.cfg

Revision as of 15:25, 3 January 2007

MRTG is included in RHEL4; if want to install separately do following:

 create user 'mrtg' with private group 'mrtg'
 mkdir /www/mrtg2.15.0
 chown mrtg.mrtg /www/mrtg2.15.0
 cd /usr/local/src
 chown mrtg.mrtg mrtg-2.15.0
 cd mrtg-2.15.0
 ./configure --prefix=/www/mrtg2.15.0
 make
 make install

Add MRTG-related part to apache config file /www/apache2.2.3/conf/httpd.conf:

 Alias /mrtg "/www/mrtg2.15.0/share"
 <Directory "/www/mrtg2.15.0/share">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
 </Directory>

Copy contrib/mrtg-startup-script/mrtg to /etc/init.d/ and correct as following:

 # config:       /www/mrtg2.15.0/etc/mrtg.cfg
 MRTG="/www/mrtg2.15.0/bin/mrtg"
 CONFIG="/www/mrtg2.15.0/etc/mrtg.cfg"


NOTE: temporary fix in:

 ERROR: CFG Error in "Interval": should be at least 5 Minutes (unless you use rrdtool)
 at /misc/clonweb/mrtg2.15.0/bin/../lib/mrtg2/MRTG_lib.pm line 772.


 ############################
 cd /www/mrtg2.15.0
 mkdir etc
 #example
 #cfgmaker --global 'WorkDir: /home/httpd/mrtg'  \
 #         --global 'Options[_]: bits,growright' \
 #         --output /home/mrtg/cfg/mrtg.cfg    \
 #          community@router.abc.xyz
 DOES NOT WORK YET ...
 /www/mrtg2.15.0/bin/cfgmaker --global 'WorkDir: /www/mrtg2.15.0/etc'  \
        --global 'Options[_]: bits,growright' \
        --output /www/mrtg2.15.0/etc/mrtg.cfg \
        mrtg@clonweb.jlab.org
 DOEN NOT WORK YET ...


 #copy old stuff from clasweb-bck:
 cd /www/mrtg2.15.0/etc
 scp clasweb-bck:/etc/mrtg/"*" .
 #create 'web' directories
 cd /www/mrtg2.15.0/share
 mkdir htmls
 mkdir images
 mkdir logs


 #web stuff from clasweb-bck:
 #scp clasweb-bck:/var/www/html/mrtg.html .
 #scp clasweb-bck:/var/www/html/mrtg.tar .
 #tar xvf mrtg.tar
 #add following to apache config file (/apps/apache2.2.3/conf/httpd.conf):
 Alias /mrtg "/www/mrtg2.15.0/share"
 <Directory "/www/mrtg2.15.0/share">
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
 </Directory>
 #adjust it if necessary
 #create desired index.html in /www/mrtg2.15.0/share, it will be used
 #by browser if 'http://clonweb/mrtg/' typed
 #copy old stuff from previous htlms/*, images/* and lods/*,
 #if 'mrtg' was running before; it will preserve history;
 #'logs' contains recent history, while *.png contains
 #longer history; start 'mrtg' right the way:
 env LANG=C /www/mrtg2.15.0/bin/mrtg /www/mrtg2.15.0/etc/mrtg.cfg