Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Apr 22, 2019 3:25 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Possible Database corruption
PostPosted: Mon Jan 07, 2019 5:56 pm 
Offline

Joined: Mon Jan 07, 2019 5:45 pm
Posts: 2
I've been trying to add a XML SNMP query for the LM sensors MIB and always getting below error message in my cacti.log, for some reason the graph never updates and does not generate an rrd file. I suspect the database has been corrupted on my graph templates, whatever have in there is working, though adding new graph templates is not. I tested my configuration on a new install and it is working there without a problem, how can I troubleshoot this further?

Below error are shows when I look the the device graphs, the "selected graph template" is blank and cannot be changed.

Code:
2019/01/07 12:04:54 - DBCALL ERROR: SQL Assoc Failed!, Error:1064, SQL:'SELECT   snmp_query_graph_id, GROUP_CONCAT(snmp_field_name ORDER BY snmp_field_name) AS columns   FROM snmp_query_graph_rrd   GROUP BY snmp_query_graph_id   HAVING '
2019/01/07 12:04:54 - DBCALL ERROR: SQL Assoc Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
2019/01/07 12:04:54 - CMDPHP SQL Backtrace: (/graphs.php: 104 graph_edit)(/graphs.php: 1351 get_common_graph_templates)(/graphs.php: 451 db_fetch_assoc_prepared)(/lib/database.php: 402 cacti_debug_backtrace)
2019/01/07 12:04:54 - CMDPHP SQL Backtrace: (/graphs.php: 104 graph_edit)(/graphs.php: 1351 get_common_graph_templates)(/graphs.php: 457 db_fetch_cell_prepared)(/lib/database.php: 281 cacti_debug_backtrace)
2019/01/07 12:04:54 - DBCALL ERROR: SQL Assoc Failed!, Error:1064, SQL:'SELECT CONCAT_WS('', graph_template_id, '_', id, '') AS id, name   FROM snmp_query_graph   WHERE (snmp_query_id = 21   AND id IN ()) OR graph_template_id IN () ORDER BY name'
2019/01/07 12:04:54 - DBCALL ERROR: SQL Assoc Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) OR graph_template_id IN () ORDER BY name' at line 1
2019/01/07 12:04:54 - CMDPHP SQL Backtrace: (/graphs.php: 104 graph_edit)(/graphs.php: 1403 draw_edit_form)(/lib/html_form.php: 112 draw_edit_control)(/lib/html_form.php: 269 db_fetch_assoc)(/lib/database.php: 361 db_fetch_assoc_prepared)(/lib/database.php: 402 cacti_debug_backtrace)


Code:
Cacti Version   1.1.38
Cacti OS   unix
RSA Fingerprint   30:60:ce:09:de:10:83:b6:fa:29:24:df:f6:64:d1:d2
NET-SNMP Version   NET-SNMP version: 5.7.3
RRDtool Version   RRDtool 1.5.x
HP Version   7.0.32-0ubuntu0.16.04.1
PHP OS   Linux
PHP uname   Linux cacti 4.4.35-1-pve #1 SMP Fri Dec 9 11:09:55 CET 2016 x86_64
PHP SNMP   Installed
max_execution_time   30
memory_limit   128M


Attachments:
Screen Shot 2019-01-07 at 5.54.37 PM.png
Screen Shot 2019-01-07 at 5.54.37 PM.png [ 69.08 KiB | Viewed 112 times ]
Top
 Profile  
 
 Post subject: Re: Possible Database corruption
PostPosted: Mon Jan 07, 2019 8:52 pm 
Offline
Cacti Pro User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 753
I would suggest trying to update to 1.2, but something is quite odd. Getting SQL errors warrants an issue in GitHub.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: Possible Database corruption
PostPosted: Tue Jan 08, 2019 2:30 am 
Offline

Joined: Mon Jan 07, 2019 5:45 pm
Posts: 2
TY, opened https://github.com/Cacti/cacti/issues/2284 to track this issue.


Top
 Profile  
 
 Post subject: Re: Possible Database corruption
PostPosted: Wed Jan 09, 2019 12:30 pm 
Offline

Joined: Wed Jan 09, 2019 12:27 pm
Posts: 1
I did an update to the workstation and that is when I started getting that exact error. Tried to downgrade, but still did not work.


Top
 Profile  
 
 Post subject: Re: Possible Database corruption
PostPosted: Thu Jan 10, 2019 6:16 pm 
Offline
Cacti Pro User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 753
Okay, the data base is not corrupted. The issue is with the Data Query XML export. The other issue, is a bug in Cacti when trying to get the graph templates. I'll be addressed, in the mean time import the following XML, which fixes the problem.


Attachments:
cacti_data_query_net-snmp_-_get_temperature_sensors.xml [15.31 KiB]
Downloaded 8 times

_________________
Before history, there was a paradise, now dust.
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group