Hi there,
I'd like to override scrape_interval and scrape_timeout as needed via config context without modifications on prometheus server config.
In the end I want to set __scrape_timeout__ and __scrape_interval__ labels. Guess there'd be lot more use cases.
As far as I can see, that'd just require some additional code here:
https://github.com/FlxPeters/netbox-plugin-prometheus-sd/blob/main/netbox_prometheus_sd/api/utils.py#L162
@FlxPeters would you agree a MR in that regard? Like exposing all labels below "labels" key in a prometheus-plugin-prometheus-sd config context:
"prometheus-plugin-prometheus-sd": [
{
"metrics_path": "/smth",
"port": 1234,
"scheme": "https",
"labels": {
"k": "v"
}
}
]
if key "k":
- does not start with
__meta_netbox_
- is not eqal to
__scheme__ or __metrics_path__
These conditions shall prevent conflicts with existing stuff.
Thanks for sharing this plugin!
Hi there,
I'd like to override scrape_interval and scrape_timeout as needed via config context without modifications on prometheus server config.
In the end I want to set
__scrape_timeout__and__scrape_interval__labels. Guess there'd be lot more use cases.As far as I can see, that'd just require some additional code here:
https://github.com/FlxPeters/netbox-plugin-prometheus-sd/blob/main/netbox_prometheus_sd/api/utils.py#L162
@FlxPeters would you agree a MR in that regard? Like exposing all labels below "labels" key in a prometheus-plugin-prometheus-sd config context:
if key "k":
__meta_netbox___scheme__or__metrics_path__These conditions shall prevent conflicts with existing stuff.
Thanks for sharing this plugin!