Tutorial Monitoring Jaringan Menggunakan SNMP dan MRTG pada LINUX
instal dan konfigurasi SNMP
1. Install applikasi snmp, snmpd di mesin linux
# apt-get install snmp snmpd
2. Edit konfigurasi snmpd.conf
# nano /etc/snmp/snmpd.conf
3. masukkan bagian yang berwarna orange dibawah ini pada script yang tampil :
2. Edit konfigurasi snmpd.conf
# nano /etc/snmp/snmpd.conf
3. masukkan bagian yang berwarna orange dibawah ini pada script yang tampil :
....
# 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.100 ;(silahkan masukkan untuk ip PC anda masing-masing).
rocommunity snmp@key 127.0.0.1 ;(digunakan sebagai ip localhost).
....
# # 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.100 ;(silahkan masukkan untuk ip PC anda masing-masing).
rocommunity snmp@key 127.0.0.1 ;(digunakan sebagai ip localhost).
....
4. Rubah bagian syslocation dan syscontact :(optional)
syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
menjadi:
syslocation lab jarkom
syscontact admin <dhoto@eepisits.edu>
5. Kemudian simpan dengan perintah “:wq”
6. Restart snmpd dengan perintah :
#/etc/init.d/snmpd restart
Restarting network management services: snmpd.
7. Test with snmpwalk
syslocation lab jarkom
syscontact admin <dhoto@eepisits.edu>
5. Kemudian simpan dengan perintah “:wq”
6. Restart snmpd dengan perintah :
#/etc/init.d/snmpd restart
Restarting network management services: snmpd.
7. Test with snmpwalk
#snmpwalk -v 1 -c snmp@key -O e 127.0.0.1
8. jika telah selesai maka instal MRTG
8. jika telah selesai maka instal MRTG
instal dan konfigurasi MRTG
1. Install aplikasi mrtg
# apt-get install mrtg
2. maka akan keluar tampilan configuring mrtg dan pilih"yes"
# apt-get install mrtg
2. maka akan keluar tampilan configuring mrtg dan pilih"yes"
3. Direktori kerja mrtg berada di /var/www/mrtg, sedangkan konfigurasinya berada di /etc/mrtg.cfg
4. lakukan peng update-an
#
updatedb &&
locate
mrtg
5.
buat direktori untuk MRTG
#
mkdir
/etc/mrtg &&
sudo
mv
/etc/mrtg.cfg /etc/mrtg
6. langkah awal adalah melakukan pengecekan target, apakah sudah ada snmp agent atau belum
# snmpwalk c public v 1 localhost
7. Apabila snmp agent sudah terdeteksi, kita akan membuat konfigurasi mrtg dengan perintah
“cfgmaker”
# cfgmaker public@localhost > /etc/mrtg.cfg
8. masuk ke folder berikut nano /etc/mrtg/mrtg.cfg
9. masukkan script berikut setelah
Global Defaults
10
. buat direktori
#mkdir/var/www/mrtg
11.Kemudian kita harus membuat file index.html di direktori /var/www/mrtg
# indexmaker output=/var/www/mrtg/index.html /etc/mrtg.cfg
12. ganti variable LANG menjadi C
#env
LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
.....
setelah semua langkah diatas selesai maka akan muncul sepeeti berikut :
0 Response to "SNMP dan MRTG pada LINUX"
Posting Komentar