Ad Widget

Collapse

Zabbix 1.5 - Modifiy Template Error - Undefined Index: proxy_hostid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Zabbix 1.5 - Modifiy Template Error - Undefined Index: proxy_hostid

    When modifying the name for an existing template the following error occurs when applying the changes:

    Undefined index: proxy_hostid[/var/www/html/zabbix/hosts.php:196]
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Database schema has been changed since beta release.

    You can manually compare schema.sql and do required changes, it's not big few fields in host table and one or two in drules table.
    Zabbix | ex GUI developer

    Comment

    • cristhiano
      Member
      • Nov 2007
      • 48

      #3
      Originally posted by Aly
      Database schema has been changed since beta release.

      You can manually compare schema.sql and do required changes, it's not big few fields in host table and one or two in drules table.
      Today, I get Zabbix 1.5 v. 5500 and have some error in create of hosts. This problem is in the hosts.php and not in the schema.sql.

      Other error, in the squema.sql don't have field triggerid in table action.

      Zabbix have primary errors in beta program.

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        Originally posted by cristhiano
        Today, I get Zabbix 1.5 v. 5500 and have some error in create of hosts. This problem is in the hosts.php and not in the schema.sql.

        Other error, in the squema.sql don't have field triggerid in table action.

        Zabbix have primary errors in beta program.
        What kind of problem with hosts?
        Why you think triggerid should be there?
        Details...
        Zabbix | ex GUI developer

        Comment

        • Palmertree
          Senior Member
          • Sep 2005
          • 746

          #5
          I've tried the 1.5 Beta release and got the same error if I just try and rename a template with no triggers or graphs.

          Comment

          • Palmertree
            Senior Member
            • Sep 2005
            • 746

            #6
            I get the same error when I create a new template too. I am going to try and get the update scehma.sql to see if I need to create any new tables in the database.

            Comment

            • Aly
              ZABBIX developer
              • May 2007
              • 1126

              #7
              Just checking that you saw my comment about changes in database schema since beta release?!
              Zabbix | ex GUI developer

              Comment

              • Palmertree
                Senior Member
                • Sep 2005
                • 746

                #8
                Yes, I was using the beta release and got the same error. :-) I was going to try and apply the database schema in the SVN to the beta release to see if it helps. Does this sound right?

                Comment

                • cristhiano
                  Member
                  • Nov 2007
                  • 48

                  #9
                  Originally posted by Aly
                  What kind of problem with hosts?
                  Why you think triggerid should be there?
                  Details...
                  This problem with hosts is in hosts.php. Change part of line above from:

                  ,$_REQUEST["proxyid"],

                  to:

                  ,$_REQUEST["proxyid"]?$_REQUEST["proxyid"]:0,

                  and work.

                  Field triggerid is another error that appears in the schema.sql.

                  Comment

                  • Palmertree
                    Senior Member
                    • Sep 2005
                    • 746

                    #10
                    I did not see the new database schema in SVN repository. Last update was on 03/11/2008.

                    cristhiano,
                    Thanks for the info. I will test your finding and will report back my results.

                    Comment

                    • Palmertree
                      Senior Member
                      • Sep 2005
                      • 746

                      #11
                      I ended up using

                      Code:
                      ,isset($_REQUEST["proxy_hostid"])?$_REQUEST["proxy_hostid"]:0,

                      Comment

                      • Aly
                        ZABBIX developer
                        • May 2007
                        • 1126

                        #12
                        Now i see what you are talking about, templates.. the original code will be:
                        Code:
                         		$_REQUEST["proxy_hostid"] = get_request('proxy_hostid',0);
                        
                        		if(isset($_REQUEST["hostid"])){
                        Will be fixed in next rev.
                        Zabbix | ex GUI developer

                        Comment

                        • Palmertree
                          Senior Member
                          • Sep 2005
                          • 746

                          #13
                          Thanks Aly. Let me know when it is in the trunk version and I will test for you.

                          Comment

                          • Aly
                            ZABBIX developer
                            • May 2007
                            • 1126

                            #14
                            Commited the fix to SVN rev. 5508
                            Zabbix | ex GUI developer

                            Comment

                            Working...