Ad Widget

Collapse

Filter out not-used interfaces in discovery rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ykdhan
    Junior Member
    • Jul 2020
    • 14

    #1

    Filter out not-used interfaces in discovery rule

    I am using discovery rule to retrieve SNMP items from my Firewall devices.
    However, it brings all of the interfaces even though some are not being used.
    I want to filter out them so I don't have to see an infinitely long 'screen' with a bunch of graphs.
    Can anyone please help?

    By the way, this is from a template for Fortigate devices.
    In this case, I want to only see one graph for 'wan1' interface since the others are not being used.

    Click image for larger version

Name:	0001.PNG
Views:	3960
Size:	34.1 KB
ID:	411924

    Click image for larger version

Name:	0002.PNG
Views:	3833
Size:	53.3 KB
ID:	411925

    Click image for larger version

Name:	0003.PNG
Views:	3769
Size:	87.1 KB
ID:	411926

  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2

    Search for the word FILTER

    Comment


    • ykdhan
      ykdhan commented
      Editing a comment
      I don't quite get it from the manual
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #3
    So nothing can be done - I will not explain what is written in the documentation.

    Comment


    • RamiS
      RamiS commented
      Editing a comment
      You took time out of your day to link into documentation that OP most propably had already seen (so, useless) and took even more time out of your day to leave this snarky comment (completely useless).

      OP clearly said that he/she has difficulties to understand documentation and so do I. It might be because language barrier or because of hard to comprehend and/or complex documentation.

      It's mind boggling how people act even to simple requests. I had to use my day to write this up because it's beyond my comprehension why people comment if they have nothing useful to comment or anything to give in to the conversation. Calling yourself "professional" and "specialist" does not entitle to be an asshat but rather you have the knowledge to be helpful. Instead you act as you do.

      This thread is couple years old so hopefully you've corrected your personality and find yourself in safe space in life.
  • NilsA
    Senior Member
    • Sep 2020
    • 102

    #4
    Use the "Filters" tab in your discovery rule to filter out items with incoming traffic / outgoing traffic = 0.
    like : {#INCOMINGTRAFFIC} "does not match" 0
    AND {#OUTGOINGTRAFFIC} "does not match" 0

    Then, to shorten your screens with discovery items in them go to your template -> screens -> properties: set columns to 2. Then go into constructor, choose your item prototype, set max columns to 2 and column span to 2.
    This makes it so 2 item prototype graphs are shown per row in your screen.

    Comment


    • ykdhan
      ykdhan commented
      Editing a comment
      Thanks a lot for the comment! I was trying to filter out using {#IFOPERSTATUS} "does not match" 0 but did not work.

    • ykdhan
      ykdhan commented
      Editing a comment
      I tried using IfInOctets AND IfOutOctets "do not match" 0 but this neither works. It still retrieves data from every interface.
  • NilsA
    Senior Member
    • Sep 2020
    • 102

    #5
    IfOperStatus has many different states - not just 1 and 0. IfInOctets and IfOutOctets are the right OIDs to use for this.
    Just play around a bit with regex until you find something that fits your needs: https://www.regextester.com

    Comment


    • ykdhan
      ykdhan commented
      Editing a comment
      Thank you. The problem was my old SNMP data keep showing. I deleted the host and created it again. Now the filter works.
  • PTNOID
    Junior Member
    • Jan 2024
    • 1

    #6
    Even though this post is very old, I figured that someone still might look it up.

    The problem here with OP is when you do a discovery on interfaces, Zabbix will store the discovered interfaces even though they afterwards are being filtered out. OP has set Zabbix to store his discovery in 30 days, by setting it under this field.

    Click image for larger version

Name:	image.png
Views:	1164
Size:	1.9 KB
ID:	477726
    Change this value to 0 and Zabbix will refresh to new interfaces discovered immediately.​

    Comment

    Working...