Difference between revisions of "Cluster der kan alt/Multi Router Traffic Grapher"

From Teknologisk videncenter
Jump to: navigation, search
(Created page with "=MRTG and SNMP= IntalL MRGT and SNMP <source lang=cli> sudo apt-get install mrtg snmpd -y </source> ==Configure SNMP== Backup the configuration file: <source lang=cli> $ sudo mv...")
 
(MRTG and SNMP)
Line 1: Line 1:
=MRTG and SNMP=
+
=SNMP=
 
IntalL MRGT and SNMP
 
IntalL MRGT and SNMP
 
<source lang=cli>
 
<source lang=cli>
sudo apt-get install mrtg snmpd -y
+
sudo apt-get install snmpd
 
</source>
 
</source>
  
==Configure SNMP==
 
 
Backup the configuration file:
 
Backup the configuration file:
 
<source lang=cli>
 
<source lang=cli>

Revision as of 11:10, 7 November 2013

SNMP

IntalL MRGT and SNMP

sudo apt-get install snmpd

Backup the configuration file:

$ sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak

Make a new config file

sudo nano /etc/snmp/snmpd.conf

Insert the following text instead of the original

rocommunity  public
syslocation  "ColekColek"
syscontact  xxxxxx@yahoo.com
com2sec public localhost public
group public v1 public
group public v2c public
group public usm public
view all included .1
access public "" any noauth exact all none none

Ether the snmpd file

$ sudo nano /etc/default/snmpd

Make sure that the file contain these lines

SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
TRAPDRUN=yes
SNMPDCOMPAT=yes

Restart SNMPD

$ sudo /etc/init.d/snmpd restart

Configure MRTG

Make a configuration file

$ sudo cfgmaker --global 'WorkDir:/var/www/mrtg' --ifref=name --ifdesc=eth --global 'Options[_]: bits' --output /etc/mrtg.cfg   public@localhost

Make a scheduled job

$ sudo crontab -e

Add

*/5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg.cfg
DONE

You can check MRTG graph on http://localhost/mrtg/ or http://your_ip/mrtg/