Hi. I am using influx db 2 and coding in flux to make an alert in Grafana.
I am trying to remove certain devices with certain firmwares from the alert. The firmware I need to remove has a -p at the end.
Hi Grant, Thank you!
I get this error: [sse.dataQueryError] failed to execute query [A]: invalid: runtime error @11:6-16:4: filter: type conflict: string != float
Hi Grant! This doesn’t work actually. Is there something different about the way flux functions inside a Grafana alert that I am missing? What is strange is I use “contains” to remove device id’s like this below and it works.
// Exclude specific device_ids
|> filter(fn: (r) => not contains(value: r.device_id, set: [
"1",
"2",
"3",
But when I use contains to remove firmware versions, or other imported fields it doesn’t apply the filter.
Can you share the full query that works (uses “contains” to remove device IDs) and also the full query that does not work (uses “contains” to remove firmware versions)? For the latter, does Grafana or InfluxDB give you an error?
I presume the 2nd query does not work in Influx Data Explorer either? Usually if the query works in Influx Data Explorer, it will work in Grafana. I have found that putting the same query into Grafana Alerting sometimes presents some challenges.