Ad Widget

Collapse

Set {#SNMPINDEX} range manually

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zvictorp
    Junior Member
    • Feb 2024
    • 5

    #1

    Set {#SNMPINDEX} range manually

    Hi to everyone

    I know that the discovery of network interfaces starts from walking some subtree and collecting the array of SNMP indices.
    Say, if some switch has 28 ports the internal macros {#SNMPINDEX} will consequentially put the values from 1 to 28 to item prototypes.
    Is it possible to use some manually created array of indices in the form of a custom macros, like {#MYCUSTOMINDEX}, and then use it instead of {#SNMPINDEX}?

    The main goal is to get values from a specific port range (24-28, for example), rather than walking through the whole subtree.

    Thank you.
    Last edited by zvictorp; 10-12-2024, 15:21.
  • Answer selected by zvictorp at 11-12-2024, 14:59.
    zvictorp
    Junior Member
    • Feb 2024
    • 5

    I found that 'TEST' button does not apply filtering.

    Furthermore, I decided to filter by an interface type rather than by the index number.
    And finally, I got the result I wanted.

    Thank you to everyone who paid attention to my post.

    Comment

    • mrnobody
      Member
      • Oct 2024
      • 61

      #2
      Hi, you could try use REGEX in LLD filter, like:

      LLD Filtering with Macros - Zabbix Blog

      Comment

      • zvictorp
        Junior Member
        • Feb 2024
        • 5

        #3
        Originally posted by mrnobody
        Hi, you could try use REGEX in LLD filter, like:

        LLD Filtering with Macros - Zabbix Blog
        I created the following macros for the test template



        And then set the filter​

        ​

        However, it returns a list of all interfaces.

        Comment

        • Jan_Prusinowski
          Junior Member
          • Dec 2024
          • 6

          #4
          Could you paste the filter you created?

          Comment

          • zvictorp
            Junior Member
            • Feb 2024
            • 5

            #5
            I found that 'TEST' button does not apply filtering.

            Furthermore, I decided to filter by an interface type rather than by the index number.
            And finally, I got the result I wanted.

            Thank you to everyone who paid attention to my post.

            Comment

            Working...