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

support host_pattern in config devices list #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matejv
Copy link

@matejv matejv commented Apr 12, 2023

Adds ability to specify host_pattern: True in configuration file under devices. In that case the host value is treated as a regex.

That allows you to not have to specify every target in exporter configuration, but to have prometheus server scrape dynamically added or removed hosts.

When scraping metrics if no target query parameter is given in URL, any device that has host_pattern: True is skipped. However if target is supplied, and it doesn't match any host values exactly, then host_pattern entries are compared.

The code is mostly the same as in https://github.com/czerwonk/junos_exporter

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 this pull request may close these issues.

1 participant