Ad Widget

Collapse

Run Low Level Discovery only if conditions met

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stefano_775
    Junior Member
    • Jul 2023
    • 14

    #1

    Run Low Level Discovery only if conditions met

    Hi

    I'm trying to resolve a monitoring design problem with an elegant solution, and I'm not finding the features I was hoping for.

    In a nutshell, I'd like to only run specific low level discoveries IF an snmp item (in a different snmp branch) returns a specific value.
    Let me provide a couple of example scenarios:
    - I'd like to monitor the status of switch stack interfaces only if the switch has stack configured (my switches report stack ports offline even if stack is not configured).
    - I'd like to monitor router's licences, but different versions present licence info on a different OIDs.

    For both, at the moment, I have to create an additional template which only contains the specific LLD, and add it to the device.
    Is there a way around that? I looked at "overrides" in the LLD configuration and they seem to serve a different purpose.
    Using different templates or linked templates makes keeping them updated very hard, so I am hoping to be able to avoid it.

    If this cannot be done in the LLD, is there a way to apply a template automatically based on host tags? I could populate tags using a discovery + override if it's possible.

    Thanks!

    Stefano

  • Clontarf[X]
    Member
    • Jan 2017
    • 80

    #2
    I think if I am reading this right, you can solve this by using LLD filters. You can filter out, or "not discover" based on the value returned by a discovery macro, similar to how the built-in Windows by Zabbix Agent templates do.

    In your custom LLD, put a macro in there for the OID you are using as your filter criteria. Something like "{#MYCUSTOMFILTER},1.whatever.your.oid.is".

    In your FIlters for that LLD, you have a filter that says "Macro {#MYCUSTOMFILTER} matches 'The good value'". I hope that made sense.

    Comment

    Working...