czerwonk / junos_exporter

Exporter for devices running JunOS to use with https://prometheus.io/
MIT License
198 stars 81 forks source link

Use device hostnames as a pattern #181

Closed stephrdev closed 2 years ago

stephrdev commented 2 years ago

This PR adds support for hostname based pattern matching to select devices.

Background: We have a lot of devices we want to scrape metrics from and we don't want to list every device with the enabled features in the config file to keep the setup as dynamic as possible (we use this together with the "ignore-targets" flag).

This change adds a new option to the device configuration named host_pattern which tells the exporter to use the given hostname as a pattern which is later matched against the target hostnames.

stephrdev commented 2 years ago

Is there anything I can do here to get it through review?

czerwonk commented 2 years ago

Thanks for contributing 👍

stephrdev commented 2 years ago

Thank you for merging. Any plans for a release? If I can support you in doing it, let me know.