Asterisk snmp: Unterschied zwischen den Versionen
Aus metasec wiki
Admin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „apt-get install snmp snmpd /etc/default/snmpd <pre> # This file controls the activity of snmpd and snmptrapd # MIB directories. /usr/share/snmp/mibs is the def…“) |
Admin (Diskussion | Beiträge) |
||
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | apt-get install snmp snmpd | + | Installieren |
+ | apt-get install snmp snmpd | ||
/etc/default/snmpd | /etc/default/snmpd | ||
Zeile 22: | Zeile 23: | ||
# snmptrapd options (use syslog). | # snmptrapd options (use syslog). | ||
TRAPDOPTS='-a -Lsd -p /var/run/snmptrapd.pid' | TRAPDOPTS='-a -Lsd -p /var/run/snmptrapd.pid' | ||
− | |||
</pre> | </pre> | ||
/etc/snmp/snmpd.conf | /etc/snmp/snmpd.conf | ||
+ | |||
<pre> | <pre> | ||
rocommunity public | rocommunity public | ||
Zeile 42: | Zeile 43: | ||
rwuser asteriskUser priv | rwuser asteriskUser priv | ||
createUser asteriskUser SHA hallo123 DES | createUser asteriskUser SHA hallo123 DES | ||
− | |||
</pre> | </pre> | ||
Zeile 48: | Zeile 48: | ||
/etc/asterisk/res_snmp.conf | /etc/asterisk/res_snmp.conf | ||
<pre> | <pre> | ||
− | |||
[general] | [general] | ||
subagent = yes | subagent = yes | ||
enabled = yes | enabled = yes | ||
− | |||
</pre> | </pre> | ||
+ | |||
+ | snmp (re)starten | ||
+ | /etc/init.d/snmpd restart | ||
asterisk neu starten!!! vorsicht nicht im laufenden betrieb | asterisk neu starten!!! vorsicht nicht im laufenden betrieb | ||
+ | |||
+ | /etc/init.d/asterisk restart | ||
testen | testen | ||
+ | MIBS=+ASTERISK-MIB | ||
snmpwalk -v 2c -c public localhost asterisk | 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 :-> | wenn was zurückkommt dann läuft alles :-> |
Aktuelle Version vom 15. April 2010, 14:11 Uhr
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 :->