Anda di halaman 1dari 3

Konfigurasi SNMP di Slackware

SNMP adalah singkatan dari Simple Network Management Protokol, yang berfungsi sebagai
protokol untuk mengecek kondisi dari sebuah komputer melalui network. Secara default pada
slackware 12.2 SNMP sudah terinstall. Tapi bagi yang belum terinstal bisa download paket
slackwarenya di sini. Nah asumsi saya net-snmp sudah terinstall pada slackware. Tinggal
mengakifkan, mengkonfigurasi dan menjalankannya. Adapun langkah-langkanya sebagai berikut :

• Ubah permission file snmpd agar bisa di eksekusi dengan perintah:

# chmod +x /etc/rc.d/rc.snmpd

• Lakukan konfigurasi snmp dengan wizard/tools sesuai dengan kebutuhan dengan perintah:

# snmpconf

• Jalankan SNMP dengan perintah:

# /etc/rc.d/rc.snmpd start

• Cek apakah SNMP sudah berjalan dengan perintah:

# nmap -sU localhost

• Cek apakah konfigurasi SNMP sudah benar:

# snmpwalk -v 1 -c public 192.168.210.1 system (sesuaikan dengan network dan konfigurasi anda)

• Apabila konfigurasi belum benar, silahkan konfigurasi ulang dan restart SNMP nya dengan
perintah:

# /etc/rc.d/rc.snmpd restart

Apabila SNMP sudah berjalan, kita dapat melihat kondisi komputer melalui jaringan dengan tools2
lain seperti PRTG, MRTG atau AdvantNet OP Manager. Berikut contoh konfigurasi SNMP yang
terdapat pada /etc/snmp/snmpd.conf:

###########################################################################
#
# snmpd.conf
#
# – created by the snmpconf configuration program
#
###########################################################################
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.

# rocommunity: a SNMPv1/SNMPv2c read-only access community name


# arguments: community [default|hostname|network/bits] [oid]

rocommunity public 192.168.210.0/24

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name


# arguments: community [default|hostname|network/bits] [oid]

rwcommunity admin 127.0.0.1

###########################################################################
# SECTION: Agent Operating Mode
#
# This section defines how the agent will operate when it
# is running.

# master: Should the agent operate as a master agent or not.


# Currently, the only supported master agent type for this token
# is “agentx”.
#
# arguments: (on|yes|agentx|all|off|no)

master agentx

# agentaddress: The IP address and port number that the agent will listen on.
# By default the agent listens to any and all traffic from any
# interface on the default SNMP port (161). This allows you to
# specify which address, interface, transport type and port(s) that you
# want the agent to listen on. Multiple definitions of this token
# are concatenated together (using ‘:’s).
# arguments: [transport:]port[@interface/address],…

agentaddress 161
agentaddress tcp:161

###########################################################################
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the “system” mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.


# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will make
# the agent return the “notWritable” error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation “Laboratorium Komputer”

# syscontact: The contact information for the administrator


# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the “notWritable” error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact “fadhly; fadhly@indosat.net.id”

proc httpd
disk / 100000