Difference between revisions of "Cluster der kan alt/Multi Router Traffic Grapher"
From Teknologisk videncenter
(→MRTG and SNMP) |
|||
| Line 1: | Line 1: | ||
=SNMP= | =SNMP= | ||
| − | IntalL | + | IntalL SNMP |
<source lang=cli> | <source lang=cli> | ||
sudo apt-get install snmpd | sudo apt-get install snmpd | ||
| Line 46: | Line 46: | ||
</source> | </source> | ||
| − | = | + | =MRTG= |
| + | <source lang=cli> | ||
| + | sudo apt-get install mrtg | ||
| + | </source> | ||
Make a configuration file | Make a configuration file | ||
<source lang=cli> | <source lang=cli> | ||
| Line 52: | Line 55: | ||
</source> | </source> | ||
| − | + | ==Make a scheduled job== | |
<source lang=cli> | <source lang=cli> | ||
$ sudo crontab -e | $ sudo crontab -e | ||
| Line 62: | Line 65: | ||
</source> | </source> | ||
| − | + | ==DONE== | |
You can check MRTG graph on http://localhost/mrtg/ or http://your_ip/mrtg/ | You can check MRTG graph on http://localhost/mrtg/ or http://your_ip/mrtg/ | ||
{{Source cli}} | {{Source cli}} | ||
Revision as of 10:12, 7 November 2013
Contents
SNMP
IntalL SNMP
sudo apt-get install snmpdBackup the configuration file:
$ sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bakMake a new config file
sudo nano /etc/snmp/snmpd.confInsert 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 noneEther the snmpd file
$ sudo nano /etc/default/snmpdMake 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=yesRestart SNMPD
$ sudo /etc/init.d/snmpd restartMRTG
sudo apt-get install mrtgMake a configuration file
$ sudo cfgmaker --global 'WorkDir:/var/www/mrtg' --ifref=name --ifdesc=eth --global 'Options[_]: bits' --output /etc/mrtg.cfg public@localhostMake a scheduled job
$ sudo crontab -eAdd
*/5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg.cfgDONE
You can check MRTG graph on http://localhost/mrtg/ or http://your_ip/mrtg/