Ad Widget

Collapse

[1.3.7] Discovery rule updated error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • testos
    Member
    • Apr 2007
    • 85

    #1

    [1.3.7] Discovery rule updated error

    Adding new check to discovery rule obtain this error:
    Error in query [insert into dchecks (dcheckid,druleid,type,ports,key_,snmp_community) values (16,5,4,'80','','')] [Unknown column 'key_' in 'field list']

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

    #2
    ZABBIX 1.3.6 and 1.3.7 database schemas are slightly different!
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • testos
      Member
      • Apr 2007
      • 85

      #3
      When I apply /upgrades/dbpatches/1.4/mysql/patch.sql from 1.3.6 or 1.3.7 distribution it show this error:
      ERROR 1054 (42S22) at line 38: Unknown column 'source' in 'field list'

      This line is:
      insert into actions_tmp select actionid,actionid,source,0,status from actions;

      Column 'source' is missing in actions_tmp and actions.

      Regards.

      Comment

      • testos
        Member
        • Apr 2007
        • 85

        #4
        Fixed by phpMyAdmin (wonderful):

        1.- Copy struct and data to another database backup
        2.- Export only data to .sql file
        3.- Drop all tables in zabbix database
        4.- Import schema from zabbix1.3.7/create/schema/mysql.sql
        5.- Import data from step 2 .sql file

        Regards

        Comment

        • Andreas Bollhalder
          Senior Member
          Zabbix Certified Specialist
          • Apr 2007
          • 144

          #5
          I did run the upgrade script too, which has failed. After it I did:

          # mysql -p
          <your pw>
          $ USE zabbix;
          $ DROP TABLE actions_tmp;
          $ UPDATE hosts_profiles SET name='';

          mysqldump -n -t -c -p zabbix > zabbix.sql
          <your pw>

          # mysql -p
          <your pw>
          DROP DATABASE zabbix;
          CREATE DATABASE zabbix;
          GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY '<your pw>';
          QUIT;

          # mysql -p zabbix < mysql.sql
          <your pw>

          # mysql -p zabbix < zabbix.sql
          <your pw>

          I set the field "name" of the table "hosts_profiles" to an empty string, which is correctly displayed under Inventory. Under Configuration -> Hosts -> Hosts -> "a host or template", in the name field I have one template of the host listed. Is this a bug in the php files ?

          Andreas
          Last edited by Andreas Bollhalder; 16-05-2007, 16:57.
          Zabbix statistics
          Total hosts: 380 - Total items: 12190 - Total triggers: 4530 - Required server performance: 224.2

          Comment

          • NOB
            Senior Member
            Zabbix Certified Specialist
            • Mar 2007
            • 469

            #6
            Originally posted by testos
            When I apply /upgrades/dbpatches/1.4/mysql/patch.sql from 1.3.6 or 1.3.7 distribution it show this error:
            ERROR 1054 (42S22) at line 38: Unknown column 'source' in 'field list'

            This line is:
            insert into actions_tmp select actionid,actionid,source,0,status from actions;

            Column 'source' is missing in actions_tmp and actions.

            Regards.
            Hi,

            AFAIK, there is NO update script between beta releases, like from 1.3.6 to 1.3.7 !
            The update script is for 1.1.x to 1.3.x and, finally, 1.4. Hence the name
            in the path, I guess.

            HTH others,

            Norbert.

            Comment

            Working...