RRDs not updating and damaged graphs

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

Moderators: Developers, Moderators

Post Reply
User avatar
NitrousOxyde
Posts: 20
Joined: Mon Sep 21, 2015 9:17 am
Location: Baku, Azerbaijan
Contact:

RRDs not updating and damaged graphs

Post by NitrousOxyde »

Hi all,

This issue might be reported previously, so, sorry for possible repetition.

The issue is like below - there was one graph template - "In/Out Bits(64-bit)" - which I edited by adding a few more items such as MIN traffic and graph update time. Pretty generic stuff, however, after that all Data Sources that refer to this template, stopped to be updated, i.e. their RRDs were not being updated by poller. Other data sources which use different graph templates, continued to be updated.

I am using spine as poller, but tried to change to cmd.php, and in both case issue is the same, so it is not a poller issue. Poller itself is running under specific user - "cacti" as below -

-bash-4.2$ crontab -l
#*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php --force > /dev/null 2>&1
*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php --force >> /var/www/html/cacti/poller-error.log 2>&1

Ignore first one, I've added to crontab like this in order to see what's happening there.

I've tried to repair data source like advised here - viewtopic.php?t=35816 but this did not help

One interesting thing is that when I checked related graphs, in "Source Name" row for non-updating graphs "Damaged Graph" was written. Just for testing, on the same device I've added one more graph with the same graph template - "In/Out Bits(64-bit)" - and it was correctly showing graph template name in "Source Name" row, RRD was being updated just fine.

The solution so far was to delete all graphs (luckily this is a new installation, so, not gone to prod yet :D ) and then create them once again.

Any ideas, why this could happen?
Attachments
Damaged_graph.png
Damaged_graph.png (64.71 KiB) Viewed 6718 times
CCIE R&S
JNCIS SP
JNCIS ENT
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: RRDs not updating and damaged graphs

Post by TheWitness »

You have not mentioned your Cacti version or any plugins you have installed. Can not really help.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
NitrousOxyde
Posts: 20
Joined: Mon Sep 21, 2015 9:17 am
Location: Baku, Azerbaijan
Contact:

Re: RRDs not updating and damaged graphs

Post by NitrousOxyde »

Yep,missed that,my bad

Cacti version is 1.2.14 and I haven't installed any plugins, clear installation of cacti + spine
CCIE R&S
JNCIS SP
JNCIS ENT
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: RRDs not updating and damaged graphs

Post by TheWitness »

Was this a new install, or an upgrade from a previous release/point release? Will likely need your database dump and your cacti.log* files.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
NitrousOxyde
Posts: 20
Joined: Mon Sep 21, 2015 9:17 am
Location: Baku, Azerbaijan
Contact:

Re: RRDs not updating and damaged graphs

Post by NitrousOxyde »

This was a fresh new install on Centos 7.

So, what exactly do you need to be shared?
CCIE R&S
JNCIS SP
JNCIS ENT
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: RRDs not updating and damaged graphs

Post by TheWitness »

mysqldump cacti > dbdump.sql
cd /var/www/html/cacti
tar -zcf cacti.logs.tgz log

So, two files to developers at cacti dot net.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
MOTTAMOURA
Posts: 4
Joined: Wed Jul 20, 2011 1:42 pm
Location: Brazil

Re: RRDs not updating and damaged graphs

Post by MOTTAMOURA »

occurs when we put any query_if **** on traffic graphic template. :cry:
bug was not fixed in version 1.2.15


Item # 11 COMMENT: Hostname: |host_description|<HR> COMMENT AVERAGE <<< works
Item # 12 COMMENT: Interface: |query_ifName|<HR> COMMENT AVERAGE <<< after add - Graph Damaged

Local Linux Machine - Traffic - enp0s3 6 Data Query Damaged Graph

snmp_query_graph_id change to: 0

SELECT * FROM `graph_local`;
ID | graph_template_id | host_id | snmp_query_id | snmp_query_graph_id | snmp_index
6 | 36 | 1 | 4 | 0 | 2
MOTTAMOURA
User avatar
NitrousOxyde
Posts: 20
Joined: Mon Sep 21, 2015 9:17 am
Location: Baku, Azerbaijan
Contact:

Re: RRDs not updating and damaged graphs

Post by NitrousOxyde »

TheWitness wrote: Mon Oct 19, 2020 6:44 am mysqldump cacti > dbdump.sql
cd /var/www/html/cacti
tar -zcf cacti.logs.tgz log

So, two files to developers at cacti dot net.
Now it works, if repeats,will send that
CCIE R&S
JNCIS SP
JNCIS ENT
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Re: RRDs not updating and damaged graphs

Post by TFC »

I Have this problem.
When I add a comment to my graph template, Output Type ID area change in related data sources.
And Erors like that:
07-01-2021 11:40:35 - CMDPHP ERROR: Field Name: task_item_id_141 includes Method: value does not include a value 'value' element.
07-01-2021 11:40:35 - CMDPHP ERROR: Field Name: task_item_id_140 includes Method: value does not include a value 'value' element.
07-01-2021 11:40:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs.php[116]:graph_edit(), /graphs.php[1576]:draw_nontemplated_fields_graph_item(), /lib/html_form_template.php[181]:CactiErrorHandler())
07-01-2021 11:40:35 - ERROR PHP NOTICE: Undefined index: task_item_id in file: /usr/share/cacti/lib/html_form_template.php on line: 181
07-01-2021 11:40:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs.php[116]:graph_edit(), /graphs.php[1576]:draw_nontemplated_fields_graph_item(), /lib/html_form_template.php[180]:CactiErrorHandler())
07-01-2021 11:40:35 - ERROR PHP NOTICE: Undefined index: task_item_id in file: /usr/share/cacti/lib/html_form_template.php on line: 180
07-01-2021 11:40:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs.php[116]:graph_edit(), /graphs.php[1576]:draw_nontemplated_fields_graph_item(), /lib/html_form_template.php[181]:CactiErrorHandler())
07-01-2021 11:40:35 - ERROR PHP NOTICE: Undefined index: task_item_id in file: /usr/share/cacti/lib/html_form_template.php on line: 181
07-01-2021 11:40:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs.php[116]:graph_edit(), /graphs.php[1576]:draw_nontemplated_fields_graph_item(), /lib/html_form_template.php[180]:CactiErrorHandler())
07-01-2021 11:40:35 - ERROR PHP NOTICE: Undefined index: task_item_id in file: /usr/share/cacti/lib/html_form_template.php on line: 180
MOTTAMOURA wrote: Sat Nov 07, 2020 2:00 pm occurs when we put any query_if **** on traffic graphic template. :cry:
bug was not fixed in version 1.2.15


Item # 11 COMMENT: Hostname: |host_description|<HR> COMMENT AVERAGE <<< works
Item # 12 COMMENT: Interface: |query_ifName|<HR> COMMENT AVERAGE <<< after add - Graph Damaged

Local Linux Machine - Traffic - enp0s3 6 Data Query Damaged Graph

snmp_query_graph_id change to: 0

SELECT * FROM `graph_local`;
ID | graph_template_id | host_id | snmp_query_id | snmp_query_graph_id | snmp_index
6 | 36 | 1 | 4 | 0 | 2
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: RRDs not updating and damaged graphs

Post by TheWitness »

I think there was was some bad form logic back around 1.2.4-1.2.10 or so that cause some corruption. You may want to:

0) Upgrade to 1.2.16
1) Re-import the package/template
2) Delete the Graph (noting the RRDfile names before hand)
3) Recreate the Graph
4) Splice the two RRDfile together using splice_rrd.php (I think that's it).
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Re: RRDs not updating and damaged graphs

Post by TFC »

I Use CentOS 7 repo.
When I update (yum) I get only 1.2.15
[root@cacti ~]# yum list installed | grep cacti
cacti.noarch 1.2.15-1.el7 @epel
cacti-spine.x86_64 1.2.15-1.el7 @epe
Is there any repo to update latest cacti version?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: RRDs not updating and damaged graphs

Post by TheWitness »

You will have to log something on the Fedora bug tracker if that's the way you install.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
riversdev0
Posts: 10
Joined: Sat Apr 25, 2020 10:53 am
Location: MN, USA

Re: RRDs not updating and damaged graphs

Post by riversdev0 »

I just bumped into this problem yesterday. I'm running version 1.2.14. I added a gprint to a graph template and now all the graphs that use that template have stopped showing fresh data and those graphs display "Damaged Graph" on the "Management > Graph" page. I noticed in the log file that the poller is now processing 16 fewer RRDs than it was previously, which is exactly how many graphs I have using the graph template I modified.

DISCLAIMER: It's a bad idea to modify the Cacti database manually. You certainly could, and maybe will, break something by doing this. You should definitely take a backup of your database before manipulating it manually. And you should make sure you're capable of restoring a database backup, too.

Fortunately, I had a database backup from a while ago. I noticed that 16 rows were in the `poller_item` table of the backup that are not in my live database `poller_item` table. Upon investigation, those 16 rows represent the values in the 16 graphs that broke. So I examined the content and decided to try moving those selected rows from the backup to the live database. One `insert` statement later, I had 16 graphs that were working again! However, the graphs still show "Damaged Graph" on the "Management > Graph" page.

Next step for me: Software upgrade.
miso
Posts: 1
Joined: Wed Dec 22, 2021 8:06 am

Re: RRDs not updating and damaged graphs

Post by miso »

I have the same problem with version 1.2.16
When i change it under Graph Template Items [edit: Interface - Traffic (bits/sec)] and add "|query_ifAlias|" to title i become "damged graph".
Delete all graphs incl. data src.

I use a workaround and change it under "Data Queries [edit: SNMP - Interface Statistics]" => In/Out Bits (64-bit) => add this "|host_description| - |query_ifName| - |query_ifAlias| " to title & names and bring it up to first entry.
Now you create graphs for this host again.
After this you find under diagrams with name "hostname - port - description/alias" and also as title in the diagram itself!
That is what i search for...

Regards
Michael
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests