[solved]Cacti can't create rrd. files,but SNMP works

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
soneedu
Posts: 12
Joined: Sun Nov 20, 2005 8:05 pm

[solved]Cacti can't create rrd. files,but SNMP works

Post by soneedu »

Hello, i am becoming a Cacti user now. there is MRTG and Ntop on my debian too.they are work and the rrdtool with Ntop can draw graphics.
i check the SNMP, it works.

Debian:~# snmpwalk -v 1 -c mypublic localhost .1.3.6.1.4.1.2021.9
UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskPath.1 = STRING: /
UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/hda1
UCD-SNMP-MIB::dskMinimum.1 = INTEGER: 10000
UCD-SNMP-MIB::dskMinPercent.1 = INTEGER: -1
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 5855432
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 4909936
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 945496
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 16
UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 100
UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: 0
UCD-SNMP-MIB::dskErrorMsg.1 = STRING:


but when i browse the Cacti, there isn't graphic and it says that "RRDTool Says:

ERROR: opening '/usr/share/cacti/site/rra/localhost_hdd_free_9.rrd': No such file or directory " by *Turn On Graph Debug Mode.

and i check the DIR /var/lib/cacti/rrd, it's empty.

Following is my Config file.
#################################
com2sec readonly default mypublic

group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite

view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system

access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none

syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)

disk /home/file [MIN=DEFDISKMINIMUMSPACE]
disk / [MIN=DEFDISKMINIMUMSPACE]
disk / 10000

###################################

and the error display :
Fatal error: Call to undefined function: mysql_connect() in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339



if u have a work for me, i will appreciate it
soneedu
Posts: 12
Joined: Sun Nov 20, 2005 8:05 pm

Post by soneedu »

i solved it finally.

i search many post and don't find the answer.
then i can but look for the answer by DOC with cacti in Debian./usr/share/doc/cacti

dpkg-reconfigure php4-mysql


* PHP command line scripts:

If you install the php4-{cli,cgi} package _after_ the php4-mysql package,
there will be no entry for the mysql extension in this file.
To fix this, you can run the following command and select the cgi
interface also:
# dpkg-reconfigure php4-mysql

You need to enable mysql support for apache, cli and/or cgi. Depending
on your configuration.


then restart apache, try /usr/share/cacti/site/php poller.php, it works.
so happy.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest