Flow DS query interfacesOnExporterWithFlows() does not accept FS:FID as argument
Description
Environment
Attachments
- 17 Aug 2022, 06:39 PM
Lucidchart Diagrams
Activity
Alberto August 30, 2022 at 12:25 PM
merged to release-8.x
Alberto August 19, 2022 at 5:25 PM
Agreed. I'm trying to standarize those functions between datasources and allow them to accept either Node id or FS:FSID.
Luckly there are not too many that accept arguments. I'm hoping to have the soled this sprint. I have a couple of PR's related https://opennms.atlassian.net/browse/HELM-336#icft=HELM-336 and https://opennms.atlassian.net/browse/HELM-337#icft=HELM-337 for now. I'm just investigating more on https://opennms.atlassian.net/browse/HELM-333#icft=HELM-333 to ensure that I'm handling the arguments correctly.
https://opennms.atlassian.net/browse/HELM-336#icft=HELM-336: https://github.com/OpenNMS/opennms-helm/pull/489
https://opennms.atlassian.net/browse/HELM-337#icft=HELM-337: https://github.com/OpenNMS/opennms-helm/pull/491
Dino Yancey August 19, 2022 at 4:50 PM
@Alberto You're right, the problem is that the label contains characters not allowed by the regex, but $node
in this case is an FS:FSID
returned from nodeFilter()
. We're tripping over ourselves and preventing data returned from our own template variables from being used consistently in other fields in the datasource. It may not have the same root cause or solution, but it is a symptom of the same problem.
Alberto August 18, 2022 at 5:17 PM
@Dino Yancey that error seems to be related to the actual foreign Source ID or name that doesn't match the regex . I tried to replicate but I'm not familiar with this expressions but I could not find any issue with the actual FS:FSID template variable passed to the label. They seemd to work for me. But I was only able to use expressions with constant values (like I said I'm not familiar with the expresions syntax, and the documentation didn't have any examples).
Maybe we can create a separate Jira and some steps to be able to reproduce since is different from fix I have found for this actual case.
[a-zA-Z_$]+[0-9a-zA-Z_$]*
Dino Yancey August 17, 2022 at 6:40 PM
Peripherally related: In the case when a user needs unique Labels on a dynamic dashboard, I learned today that one also cannot pass an FS:FSID
(from the form of a template variable $node = nodeFilter(...)
) into an Expression, either:
message:"Invalid label used in expression. Label='freememory_FS:FSID', Expression='Expression{Label=total_FS:FSID, Expression=usedmemory_FS:FSID + freememory_FS:FSID, Transient=false}'. Allowed characters: '[a-zA-Z_$]+[0-9a-zA-Z_$]*' "
I think this example encapsulates the user frustrations.
Details
Assignee
AlbertoAlbertoReporter
Will KeaneyWill KeaneyFix versions
Affects versions
Sprint
NoneHB Grooming Date
Aug 10, 2022HB Backlog Status
BacklogStory Points
3Components
Priority
Minor
Details
Details
Assignee
Reporter
Fix versions
Affects versions
Sprint
HB Grooming Date
HB Backlog Status
Story Points
Components
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

The documentation says that
interfacesOnExporterWithFlows()
should accept aFS:FID
tuple as an argument.When I supply either a direct foreignsource:foreignid or a template variable populated by a PerfDS
nodeFilter()
query, a HTTP 404 error is logged and no results are returned.