Ad Widget

Collapse

LLD : Cannot create item with the same key

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Albéric de Pertat
    Junior Member
    • Nov 2012
    • 5

    #1

    LLD : Cannot create item with the same key

    Hi,

    I am trying to create an LLD rule for HAProxy. The JSON returned by the agent is as follows :

    Code:
    {
        "data": [
            {
                "{#HAPROXYID}": "mysql-cluster.FRONTEND", 
                "{#HAPROXYPROXY}": "mysql-cluster", 
                "{#HAPROXYSERVICE}": "FRONTEND"
            }, 
            {
                "{#HAPROXYID}": "mysql-cluster.db1", 
                "{#HAPROXYPROXY}": "mysql-cluster", 
                "{#HAPROXYSERVICE}": "db1"
            }, 
            {
                "{#HAPROXYID}": "mysql-cluster.db2", 
                "{#HAPROXYPROXY}": "mysql-cluster", 
                "{#HAPROXYSERVICE}": "db2"
            }, 
            {
                "{#HAPROXYID}": "mysql-cluster.db3", 
                "{#HAPROXYPROXY}": "mysql-cluster", 
                "{#HAPROXYSERVICE}": "db3"
            }, 
            {
                "{#HAPROXYID}": "mysql-cluster.BACKEND", 
                "{#HAPROXYPROXY}": "mysql-cluster", 
                "{#HAPROXYSERVICE}": "BACKEND"
            }
        ]
    }
    I have created one item prototype with the following parameters :
    • Name : Service state for {#HAPROXYID}
    • Type : Zabbix agent
    • Key : haproxy.stats[{#HAPROXYID},{#HAPROXYPROXY},{#HAPROXYSERVICE},sta tus]


    The items won't be created and Zabbix tells me :
    Cannot create item : item with the same key "haproxy.stats[{#HAPROXYID},{#HAPROXYPROXY},{#HAPROXYSERVICE},sta tus]" already exists

    Of course no such item exists prior to the rule activation on any host. It looks like the LLD macros are not expanded into their actual values. I created {#HAPROXYID} by concatenating {#HAPROXYPROXY} and {#HAPROXYSERVICE} for the sole purpose of having a unique identifier hoping it would solve my problem but it does not).

    I fail to see what is different from other (perfectly working) LLD rules (SNMP, FS and such).

    Thanks for your insight
  • conundrum2k
    Junior Member
    • Apr 2014
    • 2

    #2
    did you ever get this fixed I'm running into the same issue, and its driving me nuts

    Comment

    • Smersh
      Member
      • Jul 2013
      • 49

      #3
      Confirm. I have the same problem. Neither rename/recreate the key nor reattach template with this key do not resolve the issue.

      Sorry, differs from my issue.
      Last edited by Smersh; 07-04-2014, 11:17.

      Comment

      • conundrum2k
        Junior Member
        • Apr 2014
        • 2

        #4
        My issue was my json wasn't correct, I missed a { }

        Comment

        • Albéric de Pertat
          Junior Member
          • Nov 2012
          • 5

          #5
          No it's still not working. I haven't had time to work on it though.

          Comment

          Working...