Skip to content

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