poller_output table growing ...

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

Moderators: Developers, Moderators

Post Reply
ghoz
Posts: 4
Joined: Wed Aug 29, 2007 5:49 am

poller_output table growing ...

Post by ghoz »

Hi all.. i've been using cacti for a long time now, with no major troubles.

yersteday, i started seeing a strange behaviour on my graphs: no data at all on the last few hours for some graphs, a few datapoints for other graphs... everything is running quite erraticaly. now almost everything seems back to normal except for a few graphs. I don't really get it.

anyway trying to understand what's going on, i found something strange on my system : poller output is growing with time :

before a poller run :

Code: Select all

mysql> select local_data_id, count(*)as count  from poller_output group by local_data_id;
+---------------+-------+
| local_data_id | count |
+---------------+-------+
|           129 |    43 |
|           130 |    46 |
|           131 |    46 |
|           133 |    83 |
|           138 |   240 |
|           139 |   329 |
|           140 |   313 |
|           148 |   735 |
|           149 |   262 |
+---------------+-------+
9 rows in set (0.01 sec)
after a poller run:

Code: Select all

mysql> select local_data_id, count(*)as count  from poller_output group by local_data_id;
+---------------+-------+
| local_data_id | count |
+---------------+-------+
|           129 |    44 |
|           130 |    47 |
|           131 |    47 |
|           133 |    83 |
|           138 |   240 |
|           139 |   330 |
|           140 |   315 |
|           148 |   736 |
|           149 |   263 |
+---------------+-------+
9 rows in set (0.02 sec)
all these datasources come from the same template (56) wich is a simple disk usage...

Code: Select all

select * from data_local where id  in ( select local_data_id  from poller_output group by local_data_id);
+-----+------------------+---------+---------------+------------+
| id  | data_template_id | host_id | snmp_query_id | snmp_index |
+-----+------------------+---------+---------------+------------+
| 129 |               56 |      33 |             0 |            |
| 130 |               56 |      33 |             0 |            |
| 131 |               56 |      33 |             0 |            |
| 133 |               56 |      35 |             0 |            |
| 138 |               56 |      36 |             0 |            |
| 139 |               56 |      36 |             0 |            |
| 140 |               56 |      36 |             0 |            |
| 148 |               56 |       2 |             0 |            |
| 149 |               56 |       2 |             0 |            |
+-----+------------------+---------+---------------+------------+
9 rows in set (5.70 sec)
but not all datasources from this data_template behave the same :

Code: Select all

mysql> select * from data_local where data_template_id = 56 and id  not in ( select local_data_id  from poller_output group by
+-----+------------------+---------+---------------+------------+
| id  | data_template_id | host_id | snmp_query_id | snmp_index |
+-----+------------------+---------+---------------+------------+
| 150 |               56 |      37 |             0 |            |
| 147 |               56 |       2 |             0 |            |
+-----+------------------+---------+---------------+------------+
2 rows in set (0.00 sec)
I ran at DEBUG level the poller , no errors in the logs, but:

Code: Select all

$ grep "insert into poller_output"  cacti.log_ | wc -l
1250
$ grep "delete from poller_output"  cacti.log_ | wc -l
1248
any clue ?
thanks .
Ghoz
Cacti Version - 0.8.6j
Plugin Architecture - 1.1
Poller Type - CMD.php
Server Info - Linux 2.6.9-22.0.2.106.unsupportedsmp
Web Server - Apache/2.0.59 (CentOS)
PHP - 5.1.6
PHP Extensions - libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, gd, ldap, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp
MySQL - 5.0.46
RRDTool - 1.0.50
SNMP - 5.1.2
Plugins
  • Host Info (hostinfo - v0.1)
    Create Aggregate Graphs (aggregate - v0.63)
    Network Discovery (discovery - v0.7)
    Poller Performance Report (pollperf - v0.32)
    Device Tracking (mactrack - v1.0)
    PHP Network Weathermap (weathermap - v0.92)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This (and more) is described at the second link of my signature. In this case, it turns out to be a lack of memory. Upper memory setting in /etc/php.ini to at least 64 MB, better 128 MB
Reinhard
ghoz
Posts: 4
Joined: Wed Aug 29, 2007 5:49 am

Post by ghoz »

did that, the table is no longer growing...
thank you for the help.

Ghoz
User avatar
empoweri
Posts: 3
Joined: Mon May 09, 2005 12:55 pm

bug

Post by empoweri »

We had the same issue where it prevented Cacti from working and required a HUGE amount of memory.

I believe the Cacti Plugin patch adds a bug to the poller.php script. It removes this line:

Code: Select all

db_execute("truncate table poller_output");
Add this after:

Code: Select all

                        db_execute("replace into settings (name,value) values ('stats_poller','$cacti_stats')");
I'm not sure why the patch removed this line.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This will be cured in 0.8.7
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest