Autom8 PlugIn provide ERROR: SQL Assoc Failed!, Error:'1054'

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
amitayb
Cacti User
Posts: 96
Joined: Thu Mar 29, 2012 2:19 am

Autom8 PlugIn provide ERROR: SQL Assoc Failed!, Error:'1054'

Post by amitayb »

Hi,
I've create autom8 rule - attached Img.
When I click Show Matching Graphs - I get 0 interface.
Looking at cacti log provides the following error:
09/08/2016 02:35:17 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1054', SQL:"SELECT * FROM (SELECT host.hostname AS autom8_host, host_id, host.disabled, host.status, snmp_query_id, snmp_index , MAX(CASE WHEN field_name='ifName' THEN field_value ELSE NULL END) AS 'ifName', MAX(CASE WHEN field_name='ifAlias' THEN field_value ELSE NULL END) AS 'ifAlias', MAX(CASE WHEN field_name='ifDescription' THEN field_value ELSE NULL END) AS 'ifDescription', MAX(CASE WHEN field_name='ifType' THEN field_value ELSE NULL END) AS 'ifType', MAX(CASE WHEN field_name='ifSpeed' THEN field_value ELSE NULL END) AS 'ifSpeed', MAX(CASE WHEN field_name='ifStatus' THEN field_value ELSE NULL END) AS 'ifStatus', MAX(CASE WHEN field_name='ifIndex' THEN field_value ELSE NULL END) AS 'ifIndex' FROM host_snmp_cache LEFT JOIN host ON (host_snmp_cache.host_id=host.id) LEFT JOIN host_template ON (host.host_template_id=host_template.id) WHERE snmp_query_id=86 AND ( host.description IS NOT NULL AND host.snmp_version >= '2' AND host_template.name <=> 'Juniper - Metro') GROUP BY host_id, snmp_query_id, snmp_index ORDER BY autom8_host, CAST(snmp_index AS unsigned)) AS a WHERE ( a.ifOperStatus <=> 'Up' AND a.ifHwAddr NOT LIKE '' AND a.ifSpeed NOT LIKE '' AND a.ifAlias LIKE '%802-00%') LIMIT 0,100"

running this SQL statement manualy provide a result: ERROR 1054 (42S22): Unknown column 'a.ifOperStatus' in 'where clause'
Attachments
autom8-Rule.JPG
autom8-Rule.JPG (135.36 KiB) Viewed 954 times
amitayb
Cacti User
Posts: 96
Joined: Thu Mar 29, 2012 2:19 am

Re: Autom8 PlugIn provide ERROR: SQL Assoc Failed!, Error:'1

Post by amitayb »

Hi all'
solved it.
this was due to the fact that I've clone rules and edited them.
the GUI refresh the fields only after saving them.
Post Reply

Who is online

Users browsing this forum: duwijakarta and 0 guests