Difference between revisions of "Cluster der kan alt/Overvågning med MRTG"
From Teknologisk videncenter
m (→Konfigure SNMP) |
|||
Line 34: | Line 34: | ||
</source> | </source> | ||
+ | # Rediger: /etc/default/snmpd | ||
+ | <source lang=cli> | ||
+ | $ sudo nano /etc/default/snmpd | ||
+ | </source> | ||
+ | |||
+ | # Vær sikker på filen indeholder disse linjer | ||
+ | |||
+ | <source lang=cli> | ||
+ | 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 | ||
+ | </source> | ||
+ | |||
+ | # Genstart SNMPD | ||
+ | |||
+ | <source lang=cli> | ||
+ | $ sudo /etc/init.d/snmpd restart | ||
+ | </source> | ||
+ | |||
+ | ===Konfigure MRTG=== | ||
+ | |||
+ | # Lav konfig fil | ||
+ | |||
+ | <source lang=cli> | ||
+ | $ sudo cfgmaker --global 'WorkDir:/var/www/mrtg' --ifref=name --ifdesc=eth --global 'Options[_]: bits' --output /etc/mrtg.cfg public@localhost | ||
+ | </source> | ||
+ | |||
+ | ====Lav scheduled job==== | ||
{{Source cli}} | {{Source cli}} | ||
[[Category:cluster]][[Category:Ubuntu]] | [[Category:cluster]][[Category:Ubuntu]] |
Revision as of 08:44, 20 April 2012
Opsætning af MRTG
- Intaller MRGT & SNMP
$ sudo apt-get install mrtg snmpd
Konfigure SNMP
- Backup configuration file:
$ sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
- Lav ny konfig fil
$ sudo nano /etc/snmp/snmpd.conf
- Erstat nuværende indhold med:
1: rocommunity public
2: syslocation "ColekColek"
3: syscontact xxxxxx@yahoo.com
4: com2sec public localhost public
5: group public v1 public
6: group public v2c public
7: group public usm public
8: view all included .1
9: access public "" any noauth exact all none none
- Rediger: /etc/default/snmpd
$ sudo nano /etc/default/snmpd
- Vær sikker på filen indeholder disse linjer
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
- Genstart SNMPD
$ sudo /etc/init.d/snmpd restart
Konfigure MRTG
- Lav konfig fil
$ sudo cfgmaker --global 'WorkDir:/var/www/mrtg' --ifref=name --ifdesc=eth --global 'Options[_]: bits' --output /etc/mrtg.cfg public@localhost