Cacti On Centos

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

Ok I viewed my log file from /var/www/html/cacti/log and noticed the following

02/11/2013 10:05:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"

It appears to me that the .php scripts are trying to run; however the above output is being returned..
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

Can you check if the table "poller_output" exists in your cacti database ?

It may happen that it sometimes gets corrupted and needs to be deleted/re-created.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

Ok, I went to my cacti DB, issued the show tables command and within the cacti DB there is a 'poller_output' table. Should I stop httpd as well change the service setting for httpd to off, log into MYSQl, delete the cacti DB, reboot, log back into linux, log into MySQL recreate the cacti DB, inport cacti.sql into the cacti DB vi the below command

mysql -p cacti < /var/www/html/cacti/cacti.sql

change the httpd setting back to on and then start httpd..

What are your thoughts
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

A simple

Code: Select all

drop table poller_output;
and executing the following code, should hopefully fix it:

Code: Select all

CREATE TABLE poller_output (
  local_data_id mediumint(8) unsigned NOT NULL default '0',
  rrd_name varchar(19) NOT NULL default '',
  time datetime NOT NULL default '0000-00-00 00:00:00',
  output text NOT NULL,
  PRIMARY KEY (local_data_id,rrd_name,time) /*!50060 USING BTREE */
) ENGINE=MyISAM;
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

ok.. after executing your commands and deleting the cacti.log file. I waited for the cacti.log file to be re-created

cat /var/www/html/cacti/log/cacti.log and the same results appear

02/11/2013 10:49:33 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'145', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

I suggest you take that SQL command then and execute it in mysql cli:

Code: Select all

select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000
It should provide a better error message. "145" means that some table crashed.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

ok.. I deleted the cacti db re-issued the commands which permit the use of the cacti DB and now I am getting the following errors

02/11/2013 11:27:49 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null;'
02/11/2013 11:27:53 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT hex FROM colors WHERE id="

I also notice that my version has detected 1 problem and the problems are:

Column 'force' from table 'manage_host' : OK (not here) (0.2/0.5.2) - manage_host is missing column force
Table 'manage_host_services' : OK (not here) (0.1/0.5) - table is missing all together
Column 'services' from table 'manage_host' : OK (not here) (???/0.5.2) - manage_host table is missing services column
Table 'manage_device_type' : OK (not here) (0.2/0.5.2) - table is missing all together
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

Seems like you installed some plugins after the initial install. You will have to re-install them so the tables get created again.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

You recommend I will have to re-install them again. What is them, are you referring to the plugins.

If so, are you recommending I disable the manage plugin, cd /var/www/html/cacti/plugins and delete the manage folder.

after deleting the manage folder, download the manage file, unzip and then place in the recommended (plugins) location

is this correct
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

there is no need to delete the folder. Just disable and uninstall it using the Pugin management interface within cacti and the install and enable it again
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

Ok I did as you recommended; however, for the manage plugin, I get the following error after disabling and uninstalling the manage plugin.

Fatal: Database or Table does not exist

the manage plugin version 0.6.2
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

Did you also install and enable it again ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

yes and the detected error remains...
sphillips237
Cacti User
Posts: 61
Joined: Sat Dec 31, 2011 4:15 pm
Contact:

Re: Cacti On Centos

Post by sphillips237 »

After disabling\uninstalling the manage plugin, the console page shows

Table 'cacti.manage_host' doesn't exist

I also opened cacti.log and the results are posted below

02/11/2013 11:27:49 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"update weathermap_maps set sortorder=id where sortorder is null;'
02/11/2013 11:27:53 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT hex FROM colors WHERE id="
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Cacti On Centos

Post by phalek »

Maybe the best thing is to start over and get Cacti working before installing any additional plugins.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests