Ad Widget

Collapse

database patch for trunk

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #16
    7753

    Code:
    CREATE TABLE globalmacro (
           globalmacroid   bigint unsigned         DEFAULT '0'     NOT NULL,
           macro           varchar(64)             DEFAULT ''      NOT NULL,
           value           varchar(255)            DEFAULT ''      NOT NULL,
           PRIMARY KEY (globalmacroid)
    ) type=InnoDB;
    CREATE INDEX globalmacro_1 on globalmacro (macro);
    CREATE TABLE hostmacro (
           hostmacroid     bigint unsigned         DEFAULT '0'     NOT NULL,
           hostid          bigint unsigned         DEFAULT '0'     NOT NULL,
           macro           varchar(64)             DEFAULT ''      NOT NULL,
           value           varchar(255)            DEFAULT ''      NOT NULL,
           PRIMARY KEY (hostmacroid)
    ) type=InnoDB;
    CREATE INDEX hostmacro_1 on hostmacro (hostid,macro);
    7756 & 7757

    Code:
    delete from zabbix.help_items where key_='icmpping';
    delete from zabbix.help_items where key_='icmppingsec';
    insert into help_items values (3,'icmpping[<ip>,<count>,<interval>,<size>,<timeout>]','Checks if server is accessible by ICMP ping  0 - ICMP ping fails 1 - ICMP ping successful    One of zabbix_server processes performs ICMP pings once per PingerFrequency seconds.');
    insert into help_items values (3,'icmppingloss[<ip>,<count>,<interval>,<size>,<timeout>]','Returns percentage of lost ICMP ping packets');
    insert into help_items values (3,'icmppingsec[<ip>,<count>,<interval>,<size>,<timeout>,<type>]','Returns ICMP ping response time      Number of seconds Example: 0.02');
    insert into help_items values(0,'net.tcp.dns.query[ip, zone, type]','Performs a query for the record type specified by the parameter type');
    Zabbix 3.0 Network Monitoring book

    Comment

    • richlv
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2005
      • 3112

      #17
      revision 7795

      Code:
      alter table httptest add authentication  integer      DEFAULT '0'     NOT NULL;
      alter table httptest add http_user       varchar(64)  DEFAULT ''      NOT NULL;
      alter table httptest add http_password   varchar(64)  DEFAULT ''      NOT NULL;
      Zabbix 3.0 Network Monitoring book

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #18
        revision 7810

        Code:
        alter table drules add unique_dcheckid bigint unsigned DEFAULT '0' NOT NULL;
        alter table dhosts drop ip;
        alter table dhosts drop index dhosts_1;
        CREATE INDEX dhosts_1 on dhosts (druleid);
        alter table dservices add ip varchar(39) DEFAULT '' NOT NULL after value;
        alter table dservices drop index dservices_1;
        alter table dservices drop index dservices_2;
        CREATE UNIQUE INDEX dservices_1 on dservices (dcheckid,type,key_,ip,port);
        CREATE INDEX dservices_2 on dservices (dhostid);
        alter table proxy_dhistory modify key_ varchar(255) DEFAULT '' NOT NULL;
        alter table proxy_dhistory modify value varchar(255) DEFAULT '' NOT NULL;
        WARNING ! this does not preserve dhosts.ip, not sure whether that would be required.
        Zabbix 3.0 Network Monitoring book

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #19
          revision 7910

          Code:
          alter table timeperiods change column start_date start_date int(11) not null default 0;
          Zabbix 3.0 Network Monitoring book

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #20
            revision 7978

            Code:
            CREATE TABLE graph_theme (
                    graphthemeid            bigint unsigned         DEFAULT '0'     NOT NULL,
                    description             varchar(64)             DEFAULT ''      NOT NULL,
                    theme           varchar(64)             DEFAULT ''      NOT NULL,
                    backgroundcolor         varchar(6)              DEFAULT 'F0F0F0'        NOT NULL,
                    graphcolor              varchar(6)              DEFAULT 'FFFFFF'        NOT NULL,
                    graphbordercolor                varchar(6)              DEFAULT '222222'        NOT NULL,
                    gridcolor               varchar(6)              DEFAULT 'CCCCCC'        NOT NULL,
                    maingridcolor           varchar(6)              DEFAULT 'AAAAAA'        NOT NULL,
                    gridbordercolor         varchar(6)              DEFAULT '000000'        NOT NULL,
                    textcolor               varchar(6)              DEFAULT '202020'        NOT NULL,
                    highlightcolor          varchar(6)              DEFAULT 'AA4444'        NOT NULL,
                    leftpercentilecolor             varchar(6)              DEFAULT '11CC11'        NOT NULL,
                    rightpercentilecolor            varchar(6)              DEFAULT 'CC1111'        NOT NULL,
                    noneworktimecolor               varchar(6)              DEFAULT 'CCCCCC'        NOT NULL,
                    gridview                integer         DEFAULT 1       NOT NULL,
                    legendview              integer         DEFAULT 1       NOT NULL,
                    PRIMARY KEY (graphthemeid)
            ) type=InnoDB;
            CREATE INDEX graph_theme_1 on graph_theme (description);
            CREATE INDEX graph_theme_2 on graph_theme (theme);
            
            
            INSERT INTO graph_theme VALUES (1,'Original Blue','css_ob.css','F0F0F0','FFFFFF','333333','CCCCCC','AAAAAA','000000','222222','AA4444','11CC11','CC1111','FFFFFF',1,1);
            INSERT INTO graph_theme VALUES (2,'Black & Blue','css_bb.css','333333','0A0A0A','888888','222222','4F4F4F','EFEFEF','0088FF','CC4444','1111FF','FF1111','1F1F1F',1,1);
            Zabbix 3.0 Network Monitoring book

            Comment

            • richlv
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2005
              • 3112

              #21
              revision 8050 :
              Code:
              CREATE INDEX profiles_2 on profiles (userid,profileid);
              Zabbix 3.0 Network Monitoring book

              Comment

              • richlv
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Oct 2005
                • 3112

                #22
                revision 8066 :

                Code:
                alter table hosts add ipmi_errors_from integer DEFAULT '0' NOT NULL;
                alter table hosts add snmp_errors_from integer DEFAULT '0' NOT NULL;
                alter table hosts modify ipmi_ip varchar(64) DEFAULT '127.0.0.1' NOT NULL;
                Zabbix 3.0 Network Monitoring book

                Comment

                • dotneft
                  Senior Member
                  • Nov 2008
                  • 699

                  #23
                  Originally posted by richlv
                  revision 8066 :

                  Code:
                  alter table hosts modify ipmi_ip varchar(64) DEFAULT '127.0.0.1' NOT NULL;
                  why varchar(64)? need varchar(15)

                  Comment

                  • richlv
                    Senior Member
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Oct 2005
                    • 3112

                    #24
                    Originally posted by dotneft
                    why varchar(64)? need varchar(15)
                    probably ipv6

                    edit: on the other hand, 39 might be enough for ipv6. not sure, but 15 would not suffice anyway
                    Last edited by richlv; 12-10-2009, 18:43. Reason: 39 char thoughts
                    Zabbix 3.0 Network Monitoring book

                    Comment

                    • sersad
                      Senior Member
                      • May 2009
                      • 518

                      #25
                      trunk 8067
                      Create data in mysql DB don't work.
                      ~/trunk/create$ mysql -D zabbix17 -uzabbix -pzabbix < /home/zabbix/trunk/create/data/data.sql -p

                      ERROR 1136 (21S01) at line 73: Column count doesn't match value count at row 1

                      Comment

                      • richlv
                        Senior Member
                        Zabbix Certified Trainer
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • Oct 2005
                        • 3112

                        #26
                        Originally posted by sersad
                        trunk 8067
                        Create data in mysql DB don't work.
                        thanks, should be fixed in revision 8068.
                        Zabbix 3.0 Network Monitoring book

                        Comment

                        • sersad
                          Senior Member
                          • May 2009
                          • 518

                          #27
                          richlv, in revision 8068 create DB was successful, thanks.

                          Comment

                          • richlv
                            Senior Member
                            Zabbix Certified Trainer
                            Zabbix Certified SpecialistZabbix Certified Professional
                            • Oct 2005
                            • 3112

                            #28
                            revision 8076

                            Code:
                            alter table dservices modify ip varchar(39) DEFAULT '' NOT NULL after dcheckid;
                            alter table proxy_dhistory modify dcheckid bigint unsigned DEFAULT '0' NOT NULL after status;
                            alter table graphs modify ymin_type integer DEFAULT '0' NOT NULL after percent_right;
                            alter table graphs modify ymax_type integer DEFAULT '0'  NOT NULL after ymin_type;
                            alter table graphs modify ymin_itemid bigint unsigned DEFAULT '0' NOT NULL after ymax_type;
                            alter table graphs modify ymax_itemid bigint unsigned DEFAULT '0' NOT NULL after ymin_itemid;
                            alter table hosts_groups drop index hosts_groups_groups_1;
                            alter table hosts_groups drop index hosts_groups_groups_2;
                            CREATE INDEX hosts_groups_1 on hosts_groups (hostid,groupid);
                            CREATE INDEX hosts_groups_2 on hosts_groups (groupid);
                            alter table usrgrp modify users_status integer DEFAULT '0' NOT NULL after gui_access;
                            Last edited by richlv; 26-10-2009, 18:18.
                            Zabbix 3.0 Network Monitoring book

                            Comment

                            • richlv
                              Senior Member
                              Zabbix Certified Trainer
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • Oct 2005
                              • 3112

                              #29
                              revision 8128 :

                              Code:
                              alter table items add authtype integer         DEFAULT '0'     NOT NULL,
                              add        username   varchar(64)            DEFAULT ''      NOT NULL,
                              add        password   varchar(64)            DEFAULT ''      NOT NULL,
                              add        publickey   varchar(64)             DEFAULT ''      NOT NULL,
                              add        privatekey  varchar(64)             DEFAULT ''      NOT NULL;
                              Zabbix 3.0 Network Monitoring book

                              Comment

                              • richlv
                                Senior Member
                                Zabbix Certified Trainer
                                Zabbix Certified SpecialistZabbix Certified Professional
                                • Oct 2005
                                • 3112

                                #30
                                rev 8260 :

                                Code:
                                alter table items drop nextcheck;
                                Zabbix 3.0 Network Monitoring book

                                Comment

                                Working...