Introduce resourceFilter (similar to nodeFilter but for resources)
Description
Attachments
2
duplicates
Lucidchart Diagrams
Activity
Show:
Alejandro Galue June 25, 2021 at 5:00 PM
No worries, I was able to see it working. I think that solves the request from the customer behind this Jira issue; perhaps there is another Jira issue that makes this a duplicate, but in the absence of it, I can close it if that helps.
Alejandro Galue June 25, 2021 at 4:53 PM
Would you mind sharing your template so I can see it?
Mark Mahacek June 25, 2021 at 4:47 PM
“label” is a constant in the variable definition that tells the filter to pull the string value collected via SNMP from the interface.
AFAIK, “id”, “label”, and “name” are the only options available for this parameter.
Alejandro Galue June 25, 2021 at 4:41 PM
That's something new to me. What is "label" in this context? A variable? A constant? Where is defined?
Mark Mahacek June 25, 2021 at 4:20 PM
Using 'label' as the second parameter does return something a little more readable in the drop down filter.
On a support ticket, a customer asked about the possibility to filter Interface Resources by ifAlias, to facilitate the user experience on Grafana dashboard when interacting with custom panels based on variables.
Currently, we have
nodeFilter
which allows you to pass an expression to "select" a sub-set of nodes.For resources, we only have
nodeResources
which returns a list of Resource IDs. This works but it is not a human readable information. It would be nice to be able to retrieve all the "string" properties for a given resource and choose which to show on the drop-down box, or maybe use the "Resource Label" for this purpose.This is why I believe that creating a new method called
resourceFilter
makes sense, not only to return a map (resourceId vs the chosen element for the label), but also to filter the resources to display.