View Full Version : PATCH: Template Patch for Zabbix 1.1.2
pasztorl
15-09-2006, 14:03
Hi!
This is a patch for 1.1.2 based on Zabbixazzer's template patch for 1.1.1.
It includes trigger dependency fix and application copy fiz.
The code not well tested. Please Make backup before using it, and don't use in production environment!
* update 1
- fixed application copy
- modified trigger adding order (needed for dependencies)
pasztorl
15-09-2006, 14:22
I found a bug with application handling. I will fix it soon...
James Wells
19-09-2006, 04:16
Greetings,
I think there is something wrong with the SQL statement you are using to fix the trigger dependencies. I was unable to make it work in MySQL 4 and MySQL 5, unfotunately, I don't have PgSQL to test it on. Would you please double check the SQL code you are using here and correct.
pasztorl
19-09-2006, 11:10
Greetings,
I think there is something wrong with the SQL statement you are using to fix the trigger dependencies. I was unable to make it work in MySQL 4 and MySQL 5, unfotunately, I don't have PgSQL to test it on. Would you please double check the SQL code you are using here and correct.
I using it with 5.0.24a with no errors. Please tell more about your problem!
James Wells
19-09-2006, 17:18
The SQL you use is;
select x.* from triggers x, (select a.*,count(d.triggerid_up) c
from (select distinct t.triggerid from triggers t, functions f, items i
where i.hostid=$hostid and f.itemid=i.itemid and f.triggerid=t.triggerid) a
left join trigger_depends d on a.triggerid = d.triggerid_down group
by a.triggerid) s where x.triggerid = s.triggerid order by s.c;
For me, when the code runs, it replaces $hostid with 109. MySQL then throws the following error;
ERROR 1064 (00000): 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 'select a.*,count(d.triggerid_up) c from (select distinct t.trig
pasztorl
20-09-2006, 11:16
The SQL you use is;
select x.* from triggers x, (select a.*,count(d.triggerid_up) c
from (select distinct t.triggerid from triggers t, functions f, items i
where i.hostid=$hostid and f.itemid=i.itemid and f.triggerid=t.triggerid) a
left join trigger_depends d on a.triggerid = d.triggerid_down group
by a.triggerid) s where x.triggerid = s.triggerid order by s.c;
For me, when the code runs, it replaces $hostid with 109. MySQL then throws the following error;
ERROR 1064 (00000): 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 'select a.*,count(d.triggerid_up) c from (select distinct t.trig
If I copy & paste this query and replace the $hostid it works for me.
I think your mysql version old for this. Which version that you use with zabbix?
so what about this kind of patch?
would be officially released in some future release?
i am with 1.1.1 now and got feeling i can't upgrade to 1.1.2 or anything else since the patch is not supported any longer
thanks
pasztorl
28-09-2006, 10:10
so what about this kind of patch?
would be officially released in some future release?
i am with 1.1.1 now and got feeling i can't upgrade to 1.1.2 or anything else since the patch is not supported any longer
thanks
It's a hack actually. We love to see the complete template system rewrite. That will solves our promlem correctly. It included in the offical roadmap, so it solved offically some time in the future.
But now, if you are not pleased the offically template system you can use this patch.
In my oppinion upgrade your system to 1.1.2 because 1.1.2 has a lot of bugfixes in the core application.
I won't integrate any large patches into 1.1.x. 1.1.x series of releases is not for new functionality, it is for bug fixes only (with minor exceptions).
Remember that ZABBIX templating will be significantly improved in 1.4! Please wait for beta releases.
I can't wait for 1.4 to be released! any idea of an ETA?
I expect first beta to come out in third week of October. Note that the beta will not have all planned functionality!