Debian Squeeze : install mrtg


sebelumnya, banyak keluhan waktu install mrtg simple di debian maupun ubuntu, dan banyak juga yang tidak tau kenapa ternjadi error seperti ini :

"Use of uninitialized value in hash element at /usr/bin/indexmaker line xxx."
atau
"Use of uninitialized value in hash element at /usr/bin/indexmaker line 352."

ok, kalo gak pengen error seperti diatas, silahkan pake cara ini untuk install mrtg di debian atau ubuntu :

-install mrtg dan apache/httpd untuk web server seperti biasa, gunakan apt-get install atau aptitude install, dan jangan lupa paket snmpd juga harus di install.

setelah terinstall dengan sukses, apache/httpd bisa diakses, waktunya seting mrtgnya.

-hapus file /etc/mrtg.conf
-buat file /etc/mrtg.conf baru dengan perintah seperti dibawah ini :

cfgmaker --global "WorkDir:/var/www/mrtg/" --global "Options[_]:growright,bits" public@127.0.0.1 > /etc/mrtg.cfg

-buat file index, untuk tampilan web mrtg di /var/www/mrtg/, dengan perintah :

indexmaker --output=/var/www/mrtg/index.html /etc/mrtg.cfg

-jalankan untuk pertama kali mrtgnya, untuk menggenerate grafik di halaman web mrtg

root@gameserver:~# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg
2012-06-11 23:12:08, Rateup WARNING: /usr/bin/rateup could not read the primary log file for 127.0.0.1_2
2012-06-11 23:12:08, Rateup WARNING: /usr/bin/rateup The backup log file for 127.0.0.1_2 was invalid as well
2012-06-11 23:12:08, Rateup WARNING: /usr/bin/rateup Can't remove 127.0.0.1_2.old updating log file
2012-06-11 23:12:08, Rateup WARNING: /usr/bin/rateup Can't rename 127.0.0.1_2.log to 127.0.0.1_2.old updating log file
2012-06-11 23:12:08, Rateup WARNING: /usr/bin/rateup could not read the primary log file for 127.0.0.1_3
2012-06-11 23:12:08, Rateup WARNING: /usr/bin/rateup The backup log file for 127.0.0.1_3 was invalid as well
2012-06-11 23:12:08, Rateup WARNING: /usr/bin/rateup Can't remove 127.0.0.1_3.old updating log file
2012-06-11 23:12:08, Rateup WARNING: /usr/bin/rateup Can't rename 127.0.0.1_3.log to 127.0.0.1_3.old updating log file
root@gameserver:~# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg
2012-06-11 23:12:09, Rateup WARNING: /usr/bin/rateup Can't remove 127.0.0.1_2.old updating log file
2012-06-11 23:12:09, Rateup WARNING: /usr/bin/rateup Can't remove 127.0.0.1_3.old updating log file
root@gameserver:~# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg
root@gameserver:~# env LANG=C /usr/bin/mrtg /etc/mrtg.cfg

-selesai

silahkan bikin crond/penjadwalan agar grafik mrtg di generate setiap 5 menit, atau sesuai kebutuhan.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: