Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend interface selector #8

Open
vidister opened this issue May 13, 2024 · 0 comments · May be fixed by #9
Open

Extend interface selector #8

vidister opened this issue May 13, 2024 · 0 comments · May be fixed by #9

Comments

@vidister
Copy link
Member

It's already possible to specify interfaces that should be scraped. This is required for routers that have a huge number of virtual interfaces, like BNGs.

devices:
  hostname.example.com:
    interfaces:
      - HundredGigE0/0/0
      - GigabitEthernet0

We should extend the feature to allow the use of regexes in the interface list.
Additionally we should allow to exclude specific interfaces based on a list of regexes.

The config interface would look like this:

devices:
  hostname.example.com:
    interfaces:
      - HundredGig.*
  hostname2.example.com:
    interfaces_excluded: 
      - Virtual-Template.*

To implement this we first need to fetch the list of all interfaces (show interface summary), filter based on our selectors and then fetch the individual interfaces.

When both interfaces and interfaces_excluded are empty we should continue to use the simple implementation where show interfaces is collected without further arguments, for performance reasons.

@vidister vidister changed the title Allow regex in interface selector Extend interface selector May 13, 2024
JulianJacobi added a commit that referenced this issue May 22, 2024
@JulianJacobi JulianJacobi linked a pull request May 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant