Ad Widget

Collapse

PATCH: Template Patch for Zabbix 1.1.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pasztorl
    Junior Member
    • Jul 2006
    • 15

    #1

    PATCH: Template Patch for Zabbix 1.1.2

    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)
    Attached Files
    Last edited by pasztorl; 21-09-2006, 10:16.
  • pasztorl
    Junior Member
    • Jul 2006
    • 15

    #2
    I found a bug with application handling. I will fix it soon...

    Comment

    • James Wells
      Senior Member
      • Jun 2005
      • 664

      #3
      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.
      Unofficial Zabbix Developer

      Comment

      • pasztorl
        Junior Member
        • Jul 2006
        • 15

        #4
        Originally posted by James Wells
        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!

        Comment

        • James Wells
          Senior Member
          • Jun 2005
          • 664

          #5
          The SQL you use is;
          Code:
          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;
          Code:
          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
          Unofficial Zabbix Developer

          Comment

          • pasztorl
            Junior Member
            • Jul 2006
            • 15

            #6
            Originally posted by James Wells
            The SQL you use is;
            Code:
            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;
            Code:
            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?

            Comment

            • ShivaS
              Member
              • Oct 2005
              • 51

              #7
              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

              Comment

              • pasztorl
                Junior Member
                • Jul 2006
                • 15

                #8
                Originally posted by ShivaS
                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.

                Comment

                • Alexei
                  Founder, CEO
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Sep 2004
                  • 5654

                  #9
                  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.
                  Alexei Vladishev
                  Creator of Zabbix, Product manager
                  New York | Tokyo | Riga
                  My Twitter

                  Comment

                  • jojo
                    Member
                    • Jul 2006
                    • 57

                    #10
                    I can't wait for 1.4 to be released! any idea of an ETA?

                    Comment

                    • Alexei
                      Founder, CEO
                      Zabbix Certified Trainer
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Sep 2004
                      • 5654

                      #11
                      I expect first beta to come out in third week of October. Note that the beta will not have all planned functionality!
                      Alexei Vladishev
                      Creator of Zabbix, Product manager
                      New York | Tokyo | Riga
                      My Twitter

                      Comment

                      Working...