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
Exclude devices/VMs via a config context setting #167
Comments
Or alternatively, what about a config option (to retain backwards compatibility) to only show devices at the API endpoint if they have something configured in the |
It's very unclear, what exactly do yo want to filter http_sd_configs:
- authorization:
type: Token
credentials: <secret>
refresh_interval: 10m
url: https://<netbox>/api/plugins/prometheus-sd/devices/?status=active&has_primary_ip=true&tenant__n=null&cf_prometheus_server={{ inventory_hostname }} |
The |
Hello,
Would it be possible to exclude devices/VMs being shown in the
api/plugins/prometheus-sd/devices/
API endpoint please?For context - we're looking at making a low weight config context with something like
in it. Then a higher weight one that we can apply to certain roles, sites etc. that has more useful information:
This would then allow us to get just the devices we'd like to monitor, without having to filter by roles in the API and setting the correct config context for roles inside Netbox for instance. Effectively, by only changing config contexts in Netbox your list of devices to monitor is automatically updated without you needing to change any Prometheus config at all!
e.g. you wouldn't need to do
api/plugins/prometheus-sd/devices/?role=x&role=y
any more because you can do it all via Netbox.What do you think?
Thanks!
The text was updated successfully, but these errors were encountered: