Asterisk snmp
Aus metasec wiki
Version vom 15. April 2010, 14:11 Uhr von Admin (Diskussion | Beiträge)
Installieren
apt-get install snmp snmpd
/etc/default/snmpd
# This file controls the activity of snmpd and snmptrapd # MIB directories. /usr/share/snmp/mibs is the default, but # including it here avoids some strange problems. export MIBDIRS=/usr/share/snmp/mibs # snmpd control (yes means start daemon). SNMPDRUN=yes # snmpd options (use syslog, close stdin/out/err). SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid ' # snmptrapd control (yes means start daemon). As of net-snmp version # 5.0, master agentx support must be enabled in snmpd before snmptrapd # can be run. See snmpd.conf(5) for how to do this. TRAPDRUN=yes # snmptrapd options (use syslog). TRAPDOPTS='-a -Lsd -p /var/run/snmptrapd.pid'
/etc/snmp/snmpd.conf
rocommunity public master agentx agentXSocket /var/run/agentx agentXPerms 0660 0550 root root com2sec local 192.168.199.253 public com2sec mynetwork0 192.168.199.0/24 public group MyROGroup any local group MyROGroup any mynetwork0 view all included .1 access MyROGroup "" any noauth 0 all none none # Asterisk user rwuser asteriskUser priv createUser asteriskUser SHA hallo123 DES
/etc/asterisk/res_snmp.conf
[general] subagent = yes enabled = yes
snmp (re)starten
/etc/init.d/snmpd restart
asterisk neu starten!!! vorsicht nicht im laufenden betrieb
/etc/init.d/asterisk restart
testen
MIBS=+ASTERISK-MIB snmpwalk -v 2c -c public localhost asterisk
oder
MIBS=+ASTERISK-MIB snmpwalk -v 3 -u asteriskUser -n "" -l authPriv -a SHA -A hallo123 -x DES -X hallo123 localhost asterisk
wenn was zurückkommt dann läuft alles :->