You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Goal: filter logs based on Grafana dashboard variable
I’d like to add Log panel to Grafana dashboard that uses Falcon Logscale datasource, to show logs filtered based on multi-valued variable selected on the Grafana dashboard (Kubernetes Pod names in my specific case).
Working solution that needs improving: filter logs based on Grafana dashboard variable containing SINGLE element
If i select only one value from Grafana variable (that supports multiple values), then filtering works as expected in Grafana Falcon Logscale panel, because $pod gets evaluated into pod123 (when pod123 has been selected for pod variable), and that is valid constraint in Logscale Query Language.
Problem: filter logs based on Grafana dashboard variable containing MULTIPLE elements
When multiple values are selected, then $pod variable gets resolved into {pod123,pod456} when selecting two elements into multi-valued variable called pod. However Logscale Query Language expects it to be formatted like pod123 OR pod456 instead of {pod123,pod456}, so that needs to be converted into expression that Logscale understands.
Potential solution
Allow converting $pod variable (that gets resolved into {pod123,pod456}) to different format using some function, for example either joinMultiValuedVariableWithOr($pod) or joinMultiValuedVariable($pod, " OR "), that would produce result pod123 OR pod456 that LogScale query language could use to filter the logs as expected.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goal: filter logs based on Grafana dashboard variable
I’d like to add Log panel to Grafana dashboard that uses Falcon Logscale datasource, to show logs filtered based on multi-valued variable selected on the Grafana dashboard (Kubernetes Pod names in my specific case).
Working solution that needs improving: filter logs based on Grafana dashboard variable containing SINGLE element
If i select only one value from Grafana variable (that supports multiple values), then filtering works as expected in Grafana Falcon Logscale panel, because
$podgets evaluated intopod123(whenpod123has been selected for pod variable), and that is valid constraint in Logscale Query Language.Problem: filter logs based on Grafana dashboard variable containing MULTIPLE elements
When multiple values are selected, then
$podvariable gets resolved into{pod123,pod456}when selecting two elements into multi-valued variable calledpod. However Logscale Query Language expects it to be formatted likepod123 OR pod456instead of{pod123,pod456}, so that needs to be converted into expression that Logscale understands.Potential solution
Allow converting
$podvariable (that gets resolved into{pod123,pod456}) to different format using some function, for example eitherjoinMultiValuedVariableWithOr($pod)orjoinMultiValuedVariable($pod, " OR "), that would produce resultpod123 OR pod456that LogScale query language could use to filter the logs as expected.Beta Was this translation helpful? Give feedback.
All reactions