Lukman Prihandika Blog's

Nrimo ing pandum, urip wis ono sing ngatur

Mengatasi Reload Associated Query di Cacti

leave a comment »

Tadi pagi ada teman minta dibantuin masalah cacti, saat ingin melakukan Reload Associated Query muncul pesan seperti ini,

PHP Warning: Invalid argument supplied for foreach() in /var/www/cacti/lib/snmp.php on line 486
PHP Warning: Invalid argument supplied for foreach() in /var/www/cacti/lib/snmp.php on line 280

Nah, setelah saya googling kesana kemari ternyata ini adalah bug dari cacti yang baru dan akhirnya ketemu caranya seperti ini :

Tambahkan “global $banned_snmp_strings;” di /var/www/cacti/lib/snmp.php seperti contoh dibawah.

root@brokenz:~# vi /var/www/cacti2/lib/snmp.php

<?php

global $banned_snmp_strings;

define(“REGEXP_SNMP_TRIM”, “(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):”);

define(“SNMP_METHOD_PHP”, 1);
define(“SNMP_METHOD_BINARY”, 2);

?>

Setelah selesai di edit silahkan dicoba dan InsyaAllah hasilnya sudah tidak ada pesan error lagi.

Sedikit informasi bahwa versi cacti yang di gunakan adalah

root@brokenz:~# dpkg -s cacti
Package: cacti
Status: install ok installed
Priority: extra
Section: web
Installed-Size: 5404
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Architecture: all
Version: 0.8.7d-1

Written by brokenz1

December 22, 2009 at 7:57 am

Posted in Ubuntu Sabily

Tagged with , , ,

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: