Install cacti 0.8.8a ubuntu server 12.04

Install LAMPP (web server) menggunakan tasksel

$ sudo tasksel

lalu pilih LAMPP server dan masukan password buat root mysql.

Install snmp dan rrdtool

$ sudo apt-get install snmp snmpd rrdtool

Buat database  cacti di mysql

$ mysql -u root -p Enter
password:
mysql>create database cacti;
mysql>GRANT ALL ON cacti.* TO "cacti"@"localhost" IDENTIFIED BY 'password u/ cacti';
mysql>flush privliges;
mysql>q

Download cacti 0.8.8a lalu ekstrak

$ mkdir /temp
$ cd /temp
$ wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz $ tar xvfz cacti-0.8.8a.tar.gz

Pindahkan hasil ektraknya ke folder /var/www

$ mv cacti-0.8.8a /var/www/cacti

upload database cacti yang sudah didownload tadi ke mysql

$ cd /var/www/cacti

$ mysql -u root -p cacti < cacti.sql 

Membuat jadwal di cronjob

$ crontab -e 

masukan baris berikut :

*/5 * * * * php /var/www/cacti/poller.php > /dev/null 2>&1

Edit file config.php

$ cd /var/www/cacti
$ nano ./include/config.php /* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser"; > mysql user untuk cacti
$database_password = "cactiuser"; > mysql password untuk cacti
$database_port = "3306";
$database_ssl = false;

lalu simpan Ctrl+x lalu Ctrl+y Untuk selanjutnya buka web browser arahkan ke ip cacti

http://ip_server_cacti/cacti

klik NEXT User dan password default cacti adalah ”admin” Penggantian password default terserah kita. Untuk installasi cacti sampai tahap ini sudah selesai.

Masalah yang saya jumpai setelah selesai install cacti

Setelah sekian lama menunggu pembuatan grafik, ternyata grafiknya tidak jadi-jadi. Coba jalankan perintah ini dikonsol

$ cd /var/www/cacti
$ sudo php poller.php

hasil keluarannya seperti berikut :

............ ............ Cannot adopt OID in NET-SNMP-AGENT-MIB: nsCacheEnabled ::= { nsCache 2 } Cannot adopt OID in NET-SNMP-AGENT-MIB: nsCacheDefaultTimeout ::= { nsCache 1 } Cannot adopt OID in UCD-SNMP-MIB: logMatchEntry ::= { logMatchTable 1 } Cannot adopt OID in UCD-SNMP-MIB: extEntry ::= { extTable 1 } Cannot adopt OID in NET-SNMP-AGENT-MIB: nsConfigLogging ::= { nsConfiguration 2 } Cannot adopt OID in NET-SNMP-AGENT-MIB: nsConfigDebug ::= { nsConfiguration 1 } Cannot adopt OID in NET-SNMP-EXAMPLES-MIB: netSnmpExampleString ::= { netSnmpExampleScalars 3 } Cannot adopt OID in NET-SNMP-EXAMPLES-MIB: netSnmpExampleSleeper ::= { netSnmpExampleScalars 2 } Cannot adopt OID in NET-SNMP-EXAMPLES-MIB: netSnmpExampleInteger ::= { netSnmpExampleScalars 1 } Cannot adopt OID in LM-SENSORS-MIB: lmVoltSensorsValue ::= { lmVoltSensorsEntry 3 } Cannot adopt OID in LM-SENSORS-MIB: lmVoltSensorsDevice ::= { lmVoltSensorsEntry 2 } Cannot adopt OID in LM-SENSORS-MIB: lmVoltSensorsIndex ::= { lmVoltSensorsEntry 1 } Cannot adopt OID in NET-SNMP-AGENT-MIB: nsCacheEntry ::= { nsCacheTable 1 } Cannot adopt OID in NET-SNMP-AGENT-MIB: nsDebugTokenTable ::= { nsConfigDebug 4 } Cannot adopt OID in NET-SNMP-AGENT-MIB: nsDebugDumpPdu ::= { nsConfigDebug 3 } Cannot adopt OID in NET-SNMP-AGENT-MIB: nsDebugOutputAll ::= { nsConfigDebug 2 } Cannot adopt OID in NET-SNMP-AGENT-MIB: nsDebugEnabled ::= { nsConfigDebug 1 } Cannot adopt OID in UCD-DEMO-MIB: ucdDemoPassphrase ::= { ucdDemoPublic 4 } Cannot adopt OID in UCD-DEMO-MIB: ucdDemoUserList ::= { ucdDemoPublic 3 } Cannot adopt OID in UCD-DEMO-MIB: ucdDemoPublicString ::= { ucdDemoPublic 2 } Cannot adopt OID in UCD-DEMO-MIB: ucdDemoResetKeys ::= { ucdDemoPublic 1 }
......... .........

Solusinya install paket snmp-mibs-downloader

$ sudo apt-get install snmp-mibs-downloader

Tunggu beberapa saat, lalu lihat dihalaman web system utilities > View Cacti Log File , hasilnya kira-kira seperti ini :

04/19/2013 01:19:01 PM - SYSTEM STATS: Time:0.1052 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:18:01 PM - SYSTEM STATS: Time:0.1056 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:4 04/19/2013 01:17:01 PM - SYSTEM STATS: Time:0.1050 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:16:01 PM - SYSTEM STATS: Time:0.1054 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:15:01 PM - SYSTEM STATS: Time:0.1062 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:5 04/19/2013 01:14:01 PM - SYSTEM STATS: Time:0.1050 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:13:01 PM - SYSTEM STATS: Time:0.1055 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:4 04/19/2013 01:12:01 PM - SYSTEM STATS: Time:0.1051 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:11:01 PM - SYSTEM STATS: Time:0.1051 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:10:01 PM - SYSTEM STATS: Time:0.1063 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:5 04/19/2013 01:09:01 PM - SYSTEM STATS: Time:0.1057 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:08:01 PM - SYSTEM STATS: Time:0.1055 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:4 04/19/2013 01:07:01 PM - SYSTEM STATS: Time:0.1050 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:06:01 PM - SYSTEM STATS: Time:0.1050 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:2 04/19/2013 01:05:01 PM - SYSTEM STATS: Time:0.1063 Method:spine Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:7 RRDsProcessed:5

Sekarang sudah bisa dilihat grafiknya muncul di menu graph.

Lain – lain

  1. Menambahkan perangkat mikrotik supaya queues bisa dibuat grapik bisa dibaca di http://forums.cacti.net/viewtopic.php?t=25349
  2. Spine sebagai type pollernya bisa dibaca di http://wmunguiam.blogspot.com/2009/01/howto-install-spine-engine-for-cacti.html . Filenya bisa di download di http://www.cacti.net/downloads/spine/ dan sesuaikan dengan versi cactinya.
  3. Error Cannot find MySQL header files under yes http://ubuntuforums.org/showthread.php?t=637973

UPDATE 19 may 2014 | ERROR

Setelah sekian lama bertahan dengan cacti versi 0.8.8a, tadi tiba-tiba mendapati error di Console -> Utilities -> View Cacti Log seperti berikut :

05/19/2014 07:45:30 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select data_input_fields.type_code, data_input_data.value from (data_input_fields,data_input_data) where data_input_fields.id=data_input_data.data_input_field_id and data_input_data.data_template_data_id= and (data_input_fields.type_code='index_type' or data_input_fields.type_code='index_value' or data_input_fields.type_code='output_type')"

dan dihalaman graph tidak muncul lagi grafik seperti biasa. Coba oprek, update system dan reboot mesin masih tidak berhasil, akhirnya coba upgrade versi ke 0.8.8b dan berhasil menghijaukan kembali halaman Console -> Utilities -> View Cacti Log.

UPDATE 15 April 2015 | cacti preview mode tidak tampil gambar

Ganti file [cacti folder]/lib/rrd.php dengan yang dari sini http://svn.cacti.net/viewvc/cacti/branches/0.8.8/lib/rrd.php?view=markup&pathrev=7418

cd [cacti folder]
mv lib/rrd.php lib/rrd.php.orig

buat file rrd.php baru

nano lib/rrd.php

Referensi

Advertisements

6 thoughts on “Install cacti 0.8.8a ubuntu server 12.04

  1. Agung Darmansyah says:

    Hallo mas.. Bisa infokan step atau link forum yang bahas soal adding mikrotik template.. saya cari2 nggak nemu.. Many thanks.. 😉

  2. Agung Darmansyah says:

    Wah makasih banyak mas.. ini kan menurut yang upload, pakai cacti-0.8.7c.. Mas sudah coba pakai yang 0.8.8a ?
    Thanks a lot mas..

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