Ad Widget


Why have a mandatory "key" for dependent item?

  • Filter
  • Time
  • Show
Clear All
new posts

    Why have a mandatory "key" for dependent item?

    The way I see, whenever you have a dependent item, it uses the master item key to process data.

    Acordding to "Dependent items" documentation (,
    "Dependent items depend on the master item that collects their data simultaneously, in one query. A new value for the master item automatically populates the values of the dependent items."

    To check that information I created a host called "Internet".
    For this example, my host has 2 items, as follow.
    ICMP response time Cloudflare Triggers 3 icmppingsec[,4,200,,200] 5m 1w 365d Simple check
    ICMP response time Cloudflare: ICMP loss CloudFlare icmppingloss[,4,200,,200] 1w 365d Dependent item
    As you can see, the first is a simple check "icmppingsec" for Cloudflare DNS. It results in the average ICMP response time. The second item depends on the first one. It should result in packet loss percentage but, for now, it basically does nothing.
    I find it better to use "icmppingsec" instead of a simple "icmpping" because the response time gives me some kind of performance information and I can also trigger availability with it.

    If we check the actual values from these items, they are exactly the same. As documented, a dependent item depends on its master item for data.
    Click image for larger version  Name:	response time.PNG Views:	0 Size:	8.1 KB ID:	401780

    If we take a look at the dependent item configuration, we see that the item "key" is mandatory.
    Click image for larger version  Name:	key mandatory.PNG Views:	0 Size:	14.6 KB ID:	401781

    But, what if I changed the key from "icmppingloss" to something like "fake.key"?
    Click image for larger version  Name:	fake key.PNG Views:	0 Size:	4.0 KB ID:	401782
    The result values are still the same.

    What I found was that, giving a key to a dependent item doesn't seem to change anything about it. Different keys don't affect the master item received value. The dependent item just receives the resulting value from master item.

    So I ask, why have a mandatory "key" for dependent item?
    Last edited by markfree; 23-05-2020, 01:29.

    the idea of dependent item is collect largeamount of data in one query - the withpreprocessing ( important ) you create one or many dependent items - thats the idea - for example if you have to query some api endpoint with large json output you can parse with "json preprocessing" several interesting metrics

    in your case as youre not using preprocessing and some predefined item key its pointless - in case youd have some custom master item ( json.full) key and custom dependent item ( json.parsed1, json.parsed2 ) key(s) youd see that dependend items will work only if proper master item would be set

    in short - youre kinda not using it as it was intended


      I see what you mean, gofree .
      According to that same documentation I mentioned, "Zabbix preprocessing options can be used to extract the part that is needed for the dependent item from the master item data."

      Above was a quick example to point out that a dependent item "key" value is not necessary, in my point of view. Therefore, should not be mandatory. But I wanted to understand why it is.

      For now I can't test Json items, I only tested a few simple keys and web gets. Would you care to elaborate more about those Json dependent items?





          I see.
          Still... "Key" is working like a custom name. Whatever value you use for "key" will do.


            Key - is something that will be used to recognize the item
            Key Item key (up to 2048 characters).
            The supported item keys can be found in individual item type sections.
            The key must be unique within a single host.
            If key type is 'Zabbix agent', 'Zabbix agent (active)', 'Simple check' or 'Zabbix aggregate', the key value must be supported by Zabbix agent or Zabbix server.
            See also: the correct key format.
            You can give key as you want, but must follow syntax:


              Great, splitek . I get it.
              I was thinking... Maybe a reason why dependent item key is mandatory it's because they can also become master item for other dependent item.
              Item of any type, even dependent item, can be set as master item. Additional levels of dependent items can be used to extract smaller parts from the value of an existing dependent item.
              Thanks guys. It was a great learning.



              No announcement yet.