Ad Widget

Collapse

Discovery rule and custom filters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sb195c@att.com
    Member
    • Oct 2017
    • 41

    #1

    Discovery rule and custom filters

    I'm trying to figure out a good way to use custom filters along with discovery rules in a template. I have templates setup to discover network interfaces that have filters in the discovery rule (no internal interfaces, no loopbacks, oper status up, etc.)
    Now to filter on specific interfaces since Zabbix doesn't have nay "pick lists" to let you choose which interfaces you want (again have to get very granular with your discovery rules), once the host is added I"m adding to the discovery rule on that host, a custom filter to list specific interfaces

    example {#IFNAME} = (ge-1/0/1\b|ge-1/0/2\b|xe-10/1/49\b|xe10/1/50\b).

    This works great, however.....If i make any changes to the Template discovery rule filter, Zabbix wipes out any customer filter I added to any hosts this was done on, which suddenly becomes problematic.

    Is there a different way to do this and not have this happen?
  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #2
    Hello
    .If i make any changes to the Template discovery rule filter, Zabbix wipes out any customer filter I added to any hosts this was done on, which suddenly becomes problematic.
    Am I correct, filters are local to hosts?

    Comment

    • sb195c@att.com
      Member
      • Oct 2017
      • 41

      #3
      Take a look at the screenshots. One is the template and a discovery rule in the template for discovering interfaces. The second is that template applied to a host, and I've added an additional filter to that discovery rule applied to the host, to narrow it down to specific interfaces. If I go back to the template itself and make any changes to the discovery rule filters, that one I added to the host gets wiped out (actually on all hosts that this has been done to) and now I'm not discovering specific interfaces anymore but everything that filter allows. It seems that Zabbix is just deleting the filters from the discovery rule on the host, and readding them from the template instead of preserving what was already there that wasn't part of the template. I'm just wondering is there another way to do this so this doesn't happen, or do I need to submit a bug/feature request?
      Attached Files

      Comment

      • kernbug
        Senior Member
        • Feb 2013
        • 330

        #4
        Hi
        Originally posted by [email protected]
        It seems that Zabbix is just deleting the filters from the discovery rule on the host, and readding them from the template instead of preserving what was already there that wasn't part of the template.
        Yes, the discovery template takes precedence.

        Originally posted by [email protected]
        I'm just wondering is there another way to do this so this doesn't happen, or do I need to submit a bug/feature request?
        Adjust discovery templates to cover you exact hardware.

        Comment

        • sb195c@att.com
          Member
          • Oct 2017
          • 41

          #5
          Originally posted by kernbug
          Hi


          Yes, the discovery template takes precedence.


          Adjust discovery templates to cover you exact hardware.
          Ok, that's not really practical though. The template change taking precedence seems like a feature request is needed to preserve what is already there outside of what the template definition is.

          Comment

          Working...