Trace: net-snmp

Berikut prosedur instalasi Net-SNMP di FreeBSD (7.1)

masuk ke direktori port net-snmp

cd /usr/ports/net-mgmt/net-snmp

compile dan install net-snmp

#make && make install

buat file konfigurasi net-snmp

/usr/local/share/snmp/snmpd.conf.example /usr/local/share/snmp/snmpd.conf

Tambahkan baris berikut

rocommunity terserah
disk /
disk /usr/
disk /var/
disk /cache/

contoh konfig snmp

com2sec readonly  default        proxy
group MyROGroup v1         readonly
view access    included  if
view access    included  system
access MyROGroup ""      any       noauth    exact  access    none   none
syslocation PPTiK (Universitas Gadjah Mada)
syscontact Admin (admin@ugm.ac.id)

(tergantung kebutuhan) jalankan net-snmp

/usr/local/sbin/snmpd

cek dengan snmpwalk

snmpwalk -v1 -c terserah 127.0.0.1 system

Output apabila berhasil

snmpwalk -v1 -c terserah 127.0.0.1 system
SNMPv2-MIB::sysDescr.0 = STRING: FreeBSD proxy.dev 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Fri Apr  3 10:52:25 UTC 2009     root@proxy.dev:/usr/src/sys/i386/compile/CUSTOM_CONFIG i386
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.8
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (253181) 0:42:11.81
SNMPv2-MIB::sysContact.0 = STRING: Me <me@somewhere.org>
SNMPv2-MIB::sysName.0 = STRING: proxy.dev
SNMPv2-MIB::sysLocation.0 = STRING: Right here, right now.
SNMPv2-MIB::sysServices.0 = INTEGER: 72
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (3) 0:00:00.03
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.9 = OID: IF-MIB::ifMIB

Jika kita akan mengaksesnya dari host lain, maka jangan lupa membuka rules firewall untuk port 161.

 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki