    MRTGWebCfg
------------------------------------------

MRTG -  Multi Router Traffic Grapher, ,    SNMP   
         ,           . 

:    ( , , , )    ,
	  ,    . 

MRTGWebCfg   PHP   :

-    MRTG  Web-.
-  RRD     .
-     Web-.

:		 
E-Mail: 	neo@chel.skbkontur.ru
ICQ: 		161867489
WWW:		http://www.novell.chel.ru
Forum:		http://www.novell.chel.ru/forum

 :  
-------------------

: GNU GPL
---------

 :
---------------------

 :			Linux, FreeBSD   *nix  .
 :				PostgreSQL 7.x/8.x
Web-:				Apache 2.x.x
 :
 - PHP4  PHP5
 - PHP-GD
 - PHP-PGSQL
 - PHP-RRDTOOL
 - RRDTOOL
 - MRTG
 - NET-SNMP

 
  c   FreeBSD:
------------------------------------

1.	     
	     net-snmp
	  net-snmp      /snmp

2.	,   net-snmp:
	ps -auxw | grep snmp
	 :
	9599  ??  S      0:03.91 /usr/local/sbin/snmpd -p /var/run/snmpd.pid
	9621  ??  Ss     0:00.43 /usr/local/sbin/snmptrapd -p /var/run/snmptrapd.pid

3.	  mrtgwebcfg     Web-

4.	     c PHP  MRTGWebCfg:
	chown -R www:wheel /___Web-/mrtgwebcfg/images/
	chmod -R 775 /___Web-/mrtgwebcfg/images-err/

5.	      MRTG:
	mkdir /usr/local/etc/mrtg/backup
	mkdir /usr/local/etc/mrtg/backup-err

6.	     MRTG:
	chown -R www:wheel /usr/local/etc/mrtg
	chmod -R 775 /usr/local/etc/mrtg

7.	   PostgreSQL   mrtg   mrtg    .
	:
	psql -U pgsql template1
	create user mrtg with createdb password '12345';
	\c - mrtg
	create database mrtg with encoding='WIN' template template0;
	\q

8.	  /mrtgwebcfg/sql/postgres-table.sql  /mrtgwebcfg/sql/postgres-data.sql
	:
	psql -a mrtg mrtg < postgres-table.sql
	psql -a mrtg mrtg < postgres-data.sql
	psql -U pgsql template1
	alter user mrtg with nocreatedb;
	\q

9. 	  Web-  : http://server/mrtgwebcfg/
	    ,        MRTGViewer
	      : "   ",  
	          MRTGWebCfg.
	         MRTGWebCfg  .

10.	 Web-   " " -> "   MRTG"
	   WorkDir  ImageDir   MRTG  MRTG Errors.
	 WorkDir   MRTG   RRD .
	 ImageDir   MRTGWebCfg    .

	  MRTG - WorkDir     :
	/___Web-/mrtgwebcfg/rrd

	  MRTG Errors - WorkDir     :
	/___Web-/mrtgwebcfg/rrd-err

	  MRTG - ImageDir     :
	/___Web-/mrtgwebcfg/images

	  MRTG Errors - ImageDir     :
	/___Web-/mrtgwebcfg/images-err

11.	     12,   web-   "C "  
	 "  "
 
	      :
	)    ""   MRTG ( mrtg.cfg  mrtg.error.cfg)
	     /tmp
	)   MRTG (mrtg.cfg  mrtg.error.cfg)  /usr/local/etc/mrtg 
	    /usr/local/etc/mrtg/backup  /usr/local/etc/mrtg/backup-err
	)   /tmp   /usr/local/etc/mrtg

12.	     :
	ls /usr/local/etc/mrtg/ | grep mrtg
	:
	mrtg.cfg
	mrtg.error.cfg

13.	  /etc/crontab    mrtg  5 :

	  /etc/crontab

	1-59/5  *       *       *       *       root   /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg --logging /var/log/mrtg.log
	1-59/5  *       *       *       *       root   /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.error.cfg --logging /var/log/mrtg-err.log

	    /var/log/mrtg.log  /var/log/mrtg-err.log
	touch /var/log/mrtg.log
	touch /var/log/mrtg-err.log

	    cron
	killall -HUP cron

14.	      MRTGViewer (http://server/mrtgwebcfg/)  
	.

    MRTGWebCfg .

        "    MRTGWebCfg".
      ,         ,
    .

   ,   ..   

:		 
E-Mail: 	neo@chel.skbkontur.ru
ICQ: 		161867489
WWW:		http://www.novell.chel.ru
Forum:		http://www.novell.chel.ru/forum

