Ad Widget

Collapse

Creating "fixed" items in discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nicolasfo
    Member
    • Jul 2015
    • 56

    #1

    Creating "fixed" items in discovery

    Hello all,
    I have firewalls (same brand, same firmwares) in differents companies. Some companies have a high availability solution, some have standalone solution, some have one hard drive in the UTM, some have two, some have one PSU, some have two...
    The values are not stored in the same place in the OIDs if the firewalls are in HA mode or standalone mode.

    To make my template ready for the two cases, I created two types of discovery rules : one for the HA mode and one for the standalone mode.
    The one for the standalone mode filters if a specific value exists when the firewall is alone, and create associated items.
    The one for the HA mode filters if a specific value exists when there's the HA mode activated and create associated items.

    The problem with this, it's I don't need to put macros in item prototypes. I don't have more than one value to check if the HA mode is degraded, for example, and I know the specific OID to query for this.
    The fact I d'ont put macros in keys items prototypes don't seems to feet to Zabbix and my items aren't created. They're created if I put, for example [{#SNMPINDEX}] at the end of the key entry, but it creates me 2 items, with the same value.

    How can I resolve my problem ? In fact, I need to create fixed items with a filter for creation, and I only found discover way to do this, but it don't seems to work like this...

    Thanks
    Nicolas
  • nicolasfo
    Member
    • Jul 2015
    • 56

    #2
    Yes I thought about this, create a template "HA" and another "Standalone" with almost same items, just OIDs change.
    It's weird that Zabbix don't offers a solution for this kind of subject, I musn't be alone to face to this problem !
    Thanks however

    Nicolas

    Comment

    • nicolasfo
      Member
      • Jul 2015
      • 56

      #3
      OK I'll do that.
      Thanks
      Nicolas

      Comment

      • splitek
        Senior Member
        • Dec 2018
        • 101

        #4
        If I understand correctly then you can use overrides, but it's tricky way and have limitations.
        Expample:
        If you have items in one template and want to "discover" some items from them "if something" and another items "if something else" then:
        - in items for group one add some string in item key and item name
        - in items for group two add another string
        - common items can stay without "distinguish string"
        This way we distinguish what items are for what group and what are for both.

        Now in overrides create rules:
        1) rule that will do not discover items form grup one if we at device type two
        2) rule that will do not discover items form grup two if we at device one
        To do this we need in discovery rule LLD macro that will tell us what type device is (type one or two) <- this is limitation, at discovery we need to know this.
        If we have macro we can set "Filters" for rule one and roule two (roules based on this macro).
        Under "Filters" we need to set "Operations" and use options like: Discover No/Yes.

        It will work like:
        If macro = v1.0 then do not discover items (or in other words: don't use item prototypes) with names that contains "ver2"
        If macro = v2.0 then do not discover items (or in other words: don't use item prototypes) with names that contains "ver1"

        I did something like that to have one template for PostgreSQL instances v9.0 and v9.6 that are on one host and it works.
        Last edited by splitek; 13-08-2021, 16:26.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          I don't think we have an option to "run discovery only, if itemX has value Y"... I would make 2 different templates and use them according the needs....

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            You can always submit an idea for development

            ...

            Comment

            Working...