Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

support host_pattern in config devices list#22

Open
matejv wants to merge 1 commit into
lwlcom:masterfrom
matejv:host-pattern
Open

support host_pattern in config devices list#22
matejv wants to merge 1 commit into
lwlcom:masterfrom
matejv:host-pattern

Conversation

@matejv
Copy link
Copy Markdown

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant