[ZBX-14799] Fail to link to templates under discovery and registration Created: 2018 Sep 03  Updated: 2018 Sep 06  Resolved: 2018 Sep 06

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: hjfeng Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
caused by ZBX-14614 Trigger dependency linked to template... Closed
Duplicate
duplicates ZBX-14614 Trigger dependency linked to template... Closed

 Description   

operation system:centos 7
zabbix-server-mysql-3.4.13-1.el7.x86_64

Network discovery:
Configuration >> Actions >> Event source(Discovery) >> "Auto discovery. Linux servers."
If operations have two details("Add to host groups" and "Link to templates"),zabbix-server appear the error,If operations remove "Link to templates",It turn ok and null error log.

18129:20180830:145902.508 [Z3005] query failed: [1064] 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 [select t.triggerid,t.templateid from triggers t,functions f,items i where t.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=10260 and]

 

Active agent auto-registration:
The situation is the same as above,When operations has "Link to templates" work failure,And turn ok after remove "Link to templates".

I try latest zabbix-server 3.0 with same problem.And return 3.4.10 everything turn ok.

 



 Comments   
Comment by Vladislavs Sokurenko [ 2018 Sep 03 ]

Thank you for your report, it will be fixed under ZBX-14614

Comment by Peter Hazelaar [ 2018 Sep 04 ]

I have the same issue on centos 7 with latest zabbix from repository (3.4.2). When all triggers are removed from the template it works OK.

In the error you see the sql statement wich ends with a 'and' without an argument behind this. It fails when there is a trigger or trigger prototype in the template.

I have seen this error in my config with autoregistration and connecting the default windows OS template. I have not tested with the normal discovery/action rules.

 

Comment by Peter Hazelaar [ 2018 Sep 04 ]

Hello,

 

Tested also with zabbix version 3.0 (LTS), same problem. Tested with a postgres DB backend, same problem:

20704:20180904:122124.698 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: syntax error at end of input
LINE 1: ...rid=f.triggerid and f.itemid=i.itemid and i.hostid=10106 and
^
[select t.triggerid,t.templateid from triggers t,functions f,items i where t.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=10106 and]

Tested also with an older zabbix agen, same problem.

 

This only applies to the zabbix agent templates, it is possible to link snmp templates with triggers.

 

Does anyone know a way to work around this problem, Zabbix without autoregistration and template linking (with triggers) is a show stopper for us..

 

Thanks....

 

Comment by Vladislavs Sokurenko [ 2018 Sep 06 ]

Thank you for your report, it is fixed under ZBX-14614

Generated at Wed Apr 24 15:18:42 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.