Setting SNMP dan MRTG
Berikut langkah-langkah untuk konfigurasi SNMP dan MRTG pada Linux:
1. Silakan login sebagai root akses pada system Linux
anda. Untuk login sebagai root bisa dengan mengetik perintah sudo su kemudian
ENTER. Berikutnya anda masukkan password dari super user Linux anda.
2. Setelah login sebagai root, silakan langsung saja mulai
instal apache2 dan php5 dengan perintah sebagai berikut:
#apt-get install apache2 php5 php5-gd php5-cli
3. Jika instalasi sudah selesai, silakan lanjutkan dengan
instalasi SNMP dan SNMPD menggunakan perintah berikut:
#apt-get install snmp snmpd
4. Kemudian silakan konfigurasi dulu file snmpd.conf dengan
perintah berikut:
#nano /etc/snmp/snmpd.conf
###############################################################################
#
# ACCESS CONTROL
#
# system + hrSystem groups only
view systemonly included .1.3.6.1.2.1.1
view systemonly included .1.3.6.1.2.1.25.1
# Full access from the local host
#rocommunity public localhost
# Default access to basic system info
rocommunity public default -V systemonly
# Full access from an example network
# Adjust this network address to match your local
# settings, change the community string,
# and check the ‘agentAddress’ setting above
#rocommunity secret 10.0.0.0/16
# Full read-only access for SNMPv3
rouser authOnlyUser
# Full write access for encrypted requests
# Remember to activate the ‘createUser’ lines above
#rwuser authPrivUser priv
# It’s no longer typically necessary to use the full ‘com2sec/group/access’ configuration
# r[ou]user and r[ow]community, together with suitable views, should cover most requirements
rocommunity snmp@key 192.168.1.100rocommunity snmp@key 127.0.0.1###############################################################################
#
# ACCESS CONTROL
#
# system + hrSystem groups only
view systemonly included .1.3.6.1.2.1.1
view systemonly included .1.3.6.1.2.1.25.1
# Full access from the local host
#rocommunity public localhost
# Default access to basic system info
rocommunity public default -V systemonly
# Full access from an example network
# Adjust this network address to match your local
# settings, change the community string,
# and check the ‘agentAddress’ setting above
#rocommunity secret 10.0.0.0/16
# Full read-only access for SNMPv3
rouser authOnlyUser
# Full write access for encrypted requests
# Remember to activate the ‘createUser’ lines above
#rwuser authPrivUser priv
# It’s no longer typically necessary to use the full ‘com2sec/group/access’ configuration
# r[ou]user and r[ow]community, together with suitable views, should cover most requirements
rocommunity snmp@key 192.168.1.100rocommunity snmp@key 127.0.0.1###############################################################################
Tambahkan yang Warna merah tersebut didalamnya
6. Kemudian restart snmpd:
#/etc/init.d/snmpd restart
7. Sekarang silakan uji dengan menjalankan snmpwalk melalui
perintah berikut:
#snmpwalk -v1 -c public localhost
system
8. Selanjutnya, lakukan instalasi aplikasi MRTG dengan
perintah berikut:
# apt-get install mrtg
9. Tunggu hingga prosesnya selesai. Kemudian buat index
untuk trafik jaringan dengan MRTG menggunakan perintah:
#cfgmaker public@localhost
> /etc/mrtg.cfg
10. Buat file index.html pada direktori /var/www/mrtg dengan
perintah:
#indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html
11. Terakhir, buka browser anda lalu isikan URL dengan
format berikut pada address bar browser anda:
http://localhost/mrtg/
12. Jika MRTG Sudah berhasil maka akan keluar seperti ini
pada browser



Tidak ada komentar:
Posting Komentar