[Cacti 1.1.2] SQL-error in automation_graph_rules.php
Moderators: Developers, Moderators
[Cacti 1.1.2] SQL-error in automation_graph_rules.php
Running a fresh install of Cacti 1.1.2 and trying to create a graph rule.
The query below is just "h.hostname is not empty" in the device selection criteria under "Automation" --> "Graph rules"
2017-04-04 11:06:30 - CMDPHP SQL Backtrace: (/automation_graph_rules.php: 74 automation_graph_rules_edit)(/automation_graph_rules.php: 607 display_new_graphs)(/lib/api_automation.php: 798 db_fetch_assoc)(/lib/database.php: 320 db_fetch_assoc_prepared)(/lib/database.php: 359 cacti_debug_backtrace)
2017-04-04 11:06:30 - DBCALL ERROR: SQL Assoc Failed!, Error: Unknown column 'h.hostname' in 'where clause'
2017-04-04 11:06:30 - DBCALL ERROR: SQL Assoc Failed!, Error:1054, SQL:"SELECT * FROM (SELECT h.hostname AS automation_host, host_id, h.disabled, h.status, snmp_query_id, snmp_index FROM host_snmp_cache AS hsc LEFT JOIN host AS h ON (hsc.host_id=h.id) LEFT JOIN host_template AS ht ON (h.host_template_id=ht.id) WHERE snmp_query_id=1 AND ( `h.hostname` NOT LIKE '' ) GROUP BY host_id, snmp_query_id, snmp_index ORDER BY automation_host, CAST(snmp_index AS unsigned)) AS a LIMIT 0,30"
Running
CentOS Linux release 7.3.1611
Apache/2.4.6 (CentOS) PHP/5.4.16
Mariadb 5.5.52
I had this briefly working on 1.1.0. Could it be in relation to issue#499?
Please get back if more details are needed!
The query below is just "h.hostname is not empty" in the device selection criteria under "Automation" --> "Graph rules"
2017-04-04 11:06:30 - CMDPHP SQL Backtrace: (/automation_graph_rules.php: 74 automation_graph_rules_edit)(/automation_graph_rules.php: 607 display_new_graphs)(/lib/api_automation.php: 798 db_fetch_assoc)(/lib/database.php: 320 db_fetch_assoc_prepared)(/lib/database.php: 359 cacti_debug_backtrace)
2017-04-04 11:06:30 - DBCALL ERROR: SQL Assoc Failed!, Error: Unknown column 'h.hostname' in 'where clause'
2017-04-04 11:06:30 - DBCALL ERROR: SQL Assoc Failed!, Error:1054, SQL:"SELECT * FROM (SELECT h.hostname AS automation_host, host_id, h.disabled, h.status, snmp_query_id, snmp_index FROM host_snmp_cache AS hsc LEFT JOIN host AS h ON (hsc.host_id=h.id) LEFT JOIN host_template AS ht ON (h.host_template_id=ht.id) WHERE snmp_query_id=1 AND ( `h.hostname` NOT LIKE '' ) GROUP BY host_id, snmp_query_id, snmp_index ORDER BY automation_host, CAST(snmp_index AS unsigned)) AS a LIMIT 0,30"
Running
CentOS Linux release 7.3.1611
Apache/2.4.6 (CentOS) PHP/5.4.16
Mariadb 5.5.52
I had this briefly working on 1.1.0. Could it be in relation to issue#499?
Please get back if more details are needed!
Re: [Cacti 1.1.2] SQL-error in automation_graph_rules.php
The same problem, 1.1.0 and 1.1.2
Some rules work, some not.
Cisco is not working
DLink is working
Some rules work, some not.
Cisco is not working
Code: Select all
2017-04-04 14:51:02 - CMDPHP SQL Backtrace: (/automation_graph_rules.php: 74 automation_graph_rules_edit)(/automation_graph_rules.php: 600 display_matching_hosts)(/lib/api_automation.php: 260 db_fetch_assoc)(/lib/database.php: 320 db_fetch_assoc_prepared)(/lib/database.php: 359 cacti_debug_backtrace)
2017-04-04 14:51:02 - DBCALL ERROR: SQL Assoc Failed!, Error: Unknown column 'h.description' in 'where clause'
2017-04-04 14:51:02 - DBCALL ERROR: SQL Assoc Failed!, Error:1054, SQL:"SELECT h.id AS host_id, h.hostname, h.description, h.disabled, h.status, ht.name AS host_template_name FROM host AS h LEFT JOIN host_template AS ht ON (h.host_template_id=ht.id) WHERE ( `h.description` IS NOT NULL ) ORDER BY description ASC LIMIT 0,30"
2017-04-04 14:51:02 - CMDPHP SQL Backtrace: (/automation_graph_rules.php: 74 automation_graph_rules_edit)(/automation_graph_rules.php: 600 display_matching_hosts)(/lib/api_automation.php: 250 db_fetch_assoc)(/lib/database.php: 320 db_fetch_assoc_prepared)(/lib/database.php: 359 cacti_debug_backtrace)
2017-04-04 14:51:02 - DBCALL ERROR: SQL Assoc Failed!, Error: Unknown column 'h.description' in 'where clause'
2017-04-04 14:51:02 - DBCALL ERROR: SQL Assoc Failed!, Error:1054, SQL:"SELECT h.id AS host_id, h.hostname, h.description, h.disabled, h.status, ht.name AS host_template_name FROM host AS h LEFT JOIN host_template AS ht ON (h.host_template_id=ht.id) WHERE ( `h.description` IS NOT NULL )"
Re: [Cacti 1.1.2] SQL-error in automation_graph_rules.php
Man, that sucks.
Before history, there was a paradise, now dust.
Re: [Cacti 1.1.2] SQL-error in automation_graph_rules.php
Issue seems to be resolved in issue #520 https://github.com/Cacti/cacti/issues/520
Rules are working again.
I replaced current lib/api_automation.php with the latest at Github.
Rules are working again.
I replaced current lib/api_automation.php with the latest at Github.
Re: [Cacti 1.1.2] SQL-error in automation_graph_rules.php
Thanks,
was having the same issue.
was having the same issue.
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: [Cacti 1.1.2] SQL-error in automation_graph_rules.php
Hi,tjswe wrote:Issue seems to be resolved in issue #520 https://github.com/Cacti/cacti/issues/520
Rules are working again.
I replaced current lib/api_automation.php with the latest at Github.
How do I apply this patch?
Re: [Cacti 1.1.2] SQL-error in automation_graph_rules.php
Well a way is to downloadjhonnyx wrote:Hi,tjswe wrote:Issue seems to be resolved in issue #520 https://github.com/Cacti/cacti/issues/520
Rules are working again.
I replaced current lib/api_automation.php with the latest at Github.
How do I apply this patch?
https://github.com/Cacti/cacti/blob/dev ... mation.php
and manually to replace it with the one in
/usr/share/cacti/lib/api_automation.php
Re: [Cacti 1.1.2] SQL-error in automation_graph_rules.php
Right, what did I ask???jozatan wrote:Well a way is to downloadjhonnyx wrote:Hi,tjswe wrote:Issue seems to be resolved in issue #520 https://github.com/Cacti/cacti/issues/520
Rules are working again.
I replaced current lib/api_automation.php with the latest at Github.
How do I apply this patch?
https://github.com/Cacti/cacti/blob/dev ... mation.php
and manually to replace it with the one in
/usr/share/cacti/lib/api_automation.php
thanks
Who is online
Users browsing this forum: No registered users and 2 guests