-
Notifications
You must be signed in to change notification settings - Fork 13
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
Filtering, multiple SNMP exporters #4
Comments
Hi Yannis!
Filtering can be implemented using the Prometheus relabeling feature with the "drop" action. Details here: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config. Is this helps you? It would avoid to implement something complex into the project.
A solution I imagined (but never implemented) to address this problem is a kind of inheritance of the
I'm not sure to understand what you want to achieve here, but I prefer to avoid to implement a behavior specific to an exporter or an usage. Is this can be implemented using the relabeling feature? Antoine |
Thanks for your answer! For the filtering, using 'drop' might help but as our Netbox database is quite big, I would prefer to filter when gathering rather than processing. I don't think it will be too hard to implement, either using argparse or a separated "config file". devices = netbox.dcim.devices.filter(manufacturer=manufacturers, has_primary_ip=True, tenant=filterTenant, status=1)
This could be great, we currently "extrapolate" the
The idea is to be able to specify a module name extrapolated from other values than the prom_labels custom field like: {$device_manufacturer}_{$device_role} To help you understand my need, I attached the script we wrote internally |
Hi Yannis, really sorry for my silence. Hard to find time to work on this project right now. Do not hesitate to propose a PR, I'll take time to review and merge it. |
Hey !
Just read your blog post regarding Prometheus and Netbox, thanks, very interesting!
I plan to use your project, and I want to add filtering of retrieved devices (including auto-filtering of the master device of Virtual-Chassis devices) based on any field (tenant, region, ...)
We're using Blackboxes as SNMP exporter on each site location, which means the
target_label: __address__
replacement should be dynamic based on the device site. I think there is no other solution than multiple jobs.I would like to include snmp module selection based on device_type + role instead of
__snmp_module__
in Netbox prom_labels fieldI was considering using jinja templates before I found your more elegant solution.
And also, I want to have the prometheus jobs config file generated automatically, probably the only way if I want 1 job per site / role
What do you think about this?
I'll share my achievements in the following weeks
The text was updated successfully, but these errors were encountered: