Ad Widget

Collapse

Is table groups on mysql missing after update 3.2.11 to 4.0.4?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mauro
    Member
    • Jan 2017
    • 94

    #1

    Is table groups on mysql missing after update 3.2.11 to 4.0.4?

    Hello.
    I finally upgraded Zabbix from 3.2.11 to 4.0.4.
    All is perfect except this.
    I use a query directly to Mysql (5.5.62-0ubuntu0.14.04.1) the query (reported here) make a join with the "groups" table.
    But mysql tell me:
    Table 'zabbix.groups' doesn't exist Actually I not found this table, but before the migration the query worked.
    Is the schema changed? I see on mysql 8 the word "groups" is reserved.
    Any ideas?


    SELECT count(*) FROM
    items RIGHT OUTER JOIN
    hosts ON items.hostid = hosts.hostid RIGHT OUTER JOIN
    hosts_groups
    join
    (
    select history_uint.itemid, value from history_uint join (
    select itemid,max(clock) as clockMax from history_uint group by itemid
    ) lastData on (history_uint.itemid=lastData.itemid and history_uint.clock=lastData.clockMax)
    ) valori on valori.itemid=items.itemid
    left outer join
    (
    select value as valore, newvalue from valuemaps join mappings on valuemaps.valuemapid=mappings.valuemapid
    where name="nam1"
    ) map on value=valore
    WHERE (groups.name = "name2") AND (items.name = "name2") and newvalue="value1"


  • DmitryL
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2016
    • 278

    #2
    Those tables were renamed to make it compatible with MySQL 8 since those words are reserved in new release of MySQL
    • 'groups' table has been renamed to 'hstgrp'
    • 'function' field in the 'functions' table has been renamed to 'name'

    Comment

    • mauro
      Member
      • Jan 2017
      • 94

      #3
      perfect! thx very much!

      Comment

      Working...