mengapa tanpa snmp?
sekedar untuk mengurangi resources memory dan cpu, jika resources RIG tidak terlalu mewah dan ada fungsi lain yg jauh lebih penting, untuk squid cache misalnya. snmpd (snmp daemon) lumayan perlu resources cpu, terutama saat snmpwalk untuk mengumpulkan data-data yg di request mrtg
disini kita hanya akan menggunakan script bash dan perl untuk menggantikan snmpwalk
data yang di graph : ethernet traffic, memory usage, cpu load, tcp connection dan latency
diasumsikan
- sudah terinstall webserver (apache/lighttpd/nginx) dengan home dir di /var/www listen on port 81
- bisa menggunakan nano editor
walkthrough
install mrtg
please login or register. simple registration is needed to see the content
answer “yes” saat installer ask “mrtg.cfg only readable/writeable by root”
buat file-file loadavg.sh mem.sh ping.pl tcpconn.sh dan eth.pl di /usr/local/bin
please login or register. simple registration is needed to see the content
untuk code dari file-file diatas bisa di ambil dari sini:
please login or register. simple registration is needed to see the content
buat executable semua file
please login or register. simple registration is needed to see the content
buat/edit file /etc/mrtg.cfg
please login or register. simple registration is needed to see the content
config mrtg :
please login or register. simple registration is needed to see the content
buat workdir mrtg
please login or register. simple registration is needed to see the content
jalankan mrtg
please login or register. simple registration is needed to see the content
jalankan command diatas 3x sampai pesan warning hilang
edit lagi file /etc/mrtg.cfg
please login or register. simple registration is needed to see the content
hilangkan tanda “#” di depan RunAsDaemon:Yes
jalankan sekali lagi mrtg untuk aktifkan daemon mrtg
please login or register. simple registration is needed to see the content
buat index.html
please login or register. simple registration is needed to see the content
akses via broser ke http://[ip-address]:81/mrtg
buka webmin, kita akan buat start-up mrtg dari webmin
webmin > system > bootup and shutdown > Create a new bootup and shutdown action
note
- Target[eth0]: `/usr/local/bin/eth.pl eth0` > jika ethernet yg aktif bukan eth0, ganti eth0 dengan ethernet card yang aktif. jalankan ifconfig untuk melihat ethernet yang aktif
- Target[ping_inter]: `/usr/local/bin/ping.pl www.yahoo.com` > silahkan diganti dengan host lain sesuai selera misalnya microsoft.com ato cuma IP-nya tidak perlu pakai hostname. hanya pastikan host yang anda pakai reliable
credit
to original bash and perl script maker, and of course mrtg maker. i’m just placed it in one box
and to all warneter community
i’m nothing w/out them




ow mrtg baru… coba ah
done
anu mbah buat ngedit jenis grapiknya itu gimana yah?