Ad Widget

Collapse

Discovered items from multiple Hosts in one Graph

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Heroxiat
    Junior Member
    • Aug 2019
    • 3

    #1

    Discovered items from multiple Hosts in one Graph

    Hi everyone,

    I have item pairs of two items that should be displayed in one graph. The Problem ist, that these items are discovered by a custom low level discovery on two different hosts.
    When I create a graph prototype on ether LLD I can only select item prototypes from the same LLD or regular items from the same host.

    Of course I could create the graphs manually, but I have 100+ item pairs, so it would be a lot work.
    Also there are new items pairs or older get deleted every couple months/weeks and i don't want to update the graphs everytime.

    Is there any other way to accomplish this than doing it manually ?

    EDIT: Zabbix Verson 4.0.3

    Greetings
    Heroxiat
    Last edited by Heroxiat; 01-08-2019, 13:13. Reason: forgot to mention the zabbix version
  • Heroxiat
    Junior Member
    • Aug 2019
    • 3

    #2
    Hi splitek ,

    The items are gathered by Zabbix agent.

    The Hosts are splitted in two groups P<1-7> and C<1-8>. P1 belongs to C1, P2 to C2 and so on. Only C8 has no corresponding partner.
    The items are discovered using the same Macro {#PNAME}, so part of the name is equal they and are also unique per Host pair.

    I didn't know about the Dashboard graph, but i doesn't really fit my needs in this case, as there would be 100+ items on one graph.

    But I just had another idea that maybe solve my problem.
    Can I discover a calculated item on C1 containing the Formular to the corresponding item on P1 ?
    Something like "last({#PSERVER},item_from_P1[{#PNAME}])" with {#PSERVER} containing the host name of the partner server and {#PNAME} describing the discovered item.

    Maybe not the best Solution, because i will create the items basically 2 times, once on each host, but a little workaround.
    I will try this tomorrow.

    Comment

    • kloczek
      Senior Member
      • Jun 2006
      • 1771

      #3
      Originally posted by Heroxiat
      Hi everyone,

      I have item pairs of two items that should be displayed in one graph. The Problem ist, that these items are discovered by a custom low level discovery on two different hosts.
      When I create a graph prototype on ether LLD I can only select item prototypes from the same LLD or regular items from the same host.
      Add dummy host on 127.0.0.1/localhost and then create template with two macros for hosts names and map those two hosts simple graphs or raw data to graph.
      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
      https://kloczek.wordpress.com/
      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
      My zabbix templates https://github.com/kloczek/zabbix-templates

      Comment

      • Heroxiat
        Junior Member
        • Aug 2019
        • 3

        #4
        But I just had another idea that maybe solve my problem.
        Can I discover a calculated item on C1 containing the Formular to the corresponding item on P1 ?
        Something like "last({#PSERVER},item_from_P1[{#PNAME}])" with {#PSERVER} containing the host name of the partner server and {#PNAME} describing the discovered item.
        I solved my issue. This actually worked fine for me in this case. Except that the hostname macro can't be replaced in calculated item prototypes. So i added the P-Server manually to every discovery on the C-Host.
        Code:
        last("P1,item_from_P1[{#PNAME}]")
        Thanks for the tip with Grafana splitek . Never heard of it, i will check it out. Maybe i find a better solution with this.

        Comment

        Working...