Ad Widget

Collapse

Incorrect item key - unable to create triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ramoneastral
    Member
    • Feb 2017
    • 33

    #1

    Incorrect item key - unable to create triggers

    i am running docker with images for web, server and proxy
    just refreshed to 5.4. ubuntu latest and 5.4. alpine latest(zabbix-web-nginx..)
    server reports 5.4.5 as current version.
    the mysql db is on 10.x
    the db was created initially with 3.4.x

    i had no issues with 5.2.7
    "upgrading" to 5.4.4 hand an issue with the items table on setting up indizes.
    i fixed that manual -> reading the schema.sql and manually applying.
    then automatic db update went through...

    so far no issue except i am no longer able to create triggers.
    i have tried to do create triggers on templates , discovery templates - no luck

    i just tried to clone the trigger from the Template App HTTP Service
    and it will give me the same error :
    Incorrect item key "net.tcp.service[http]" provided for trigger expression on "Template App HTTP Service".

    - max(/Template App HTTP Service/net.tcp.service[http],#3)=0
    - HTTP service is down on {HOST.NAME} 2

    just changing the name and keeping the expression will throw that error ???

    is this an error in the db table (s) ?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    It does sound to me like it might be an error in the database, but it's hard to know what it is.

    One thing you could try is create a brand new database with a different name and then import the "schema.sql" from 5.4.4 into that database, then use the "mysqldiff" tool to compare your existing production database to the new, schema-only database that you know is correct for 5.4.4. That may help you determine if there are other places where your production schema has diverged from what it should be.

    I've used a similar technique in the past to identify schema differences with my much-upgraded zabbix database.

    Comment

    • ramoneastral
      Member
      • Feb 2017
      • 33

      #3
      hello tim,
      thanks for the comment.
      ill give it a try and report back

      Comment

      • ramoneastral
        Member
        • Feb 2017
        • 33

        #4
        hi tim,

        your comment was spot on !!
        many thanks .

        i my case it was in the items table where the indizes where messed up and then also the constraints.

        Comment

        • tim.mooney
          Senior Member
          • Dec 2012
          • 1427

          #5
          I'm glad you got it figured out. And thanks for following up and letting us know what the issue was.

          Comment

          Working...