grafana-zabbix
grafana-zabbix copied to clipboard
Query breaks when adding Expression
Describe the bug Basically the same issue as #1314. Queries work fine on their own, but once I add an expression, the panel breaks. Doesn't matter if I reference the other queries in the expression. If it's there, nothing works. Even if I disable the expression -- I have to remove it entirely for the data to show.
No error messages to be found.
Expected behavior Expressions work normally as with other data sources.
Screenshots
Without expression:
With expression:
Query inspector:
Software versions
Grafana | Zabbix | Grafana-Zabbix Plugin |
---|---|---|
9.4.7 | 6.2.1 | 4.3.1 |
That's strange, I cannot replicate it on the latest Grafana.
If you "need more info", please be a bit more specific.
Same issue here. I noticed in the query response that when you use an expression it sends the raw variable.
Grafana 9.4.3
URL with no expression: url:"api/ds/query" URL with expression: url:"api/ds/query?expression=true"
Data example with no expression
host:Object filter:"/^Depere Heritage 8300 1$/"
With Math Expression
host:Object filter:"$hfm_hosts"
I opened this issue on Grafana as well since I am not sure this is a Zabbix plugin issue. I saw the same thing happen on another plugin
https://github.com/grafana/grafana/issues/66028
I have met the same problem.
Grafana: enterprise-10.0.2.linux-amd64 Zabbix: 6.4.4 Zabbix plugin for Grafana: 4.3.1
It's okay with queries.
But when I added a expression Grafana shows "no data".
There is the expression part of query.
I am noticing the same behavior, as soon as I add an expression (even something as simple as $A-1, where $A is Numeric unsigned) - no data is rendered.
Zabbix 6.4.4 Grafana 10.1.0 Plugin 4.4.1
Edit - I just discovered that the issue might be because I am using a variable for the host. Without the expression, selecting a host from the drop down, both queries work OK. Adding the Expression causes No Data to appear in the panel.
However if I explicitly enter the same host in both queries, then the Expression works without a problem.
I have the same problem and can reproduce the solution of @dbuconn. By using a variable in Host
of a query, expressions that use the query will return no data.
Having the same issue, still no workaround?
Hi @alexanderzobnin ,
I have created a docker-compose bundle that sets up Zabbix and Grafana, adds the alexanderzobnin-zabbix-app
plugin and creates a dashboard to reproduce the problem.
Usage:
- Unzip
-
docker compose up -d
- Open Grafana on http://127.0.0.1:3000 with admin:admin
- Open the only existing dashboard
- Wait up to 60s for data to arrive
As soon as we add an expression to a query that uses a variable, both the expression and the query stop working:
Is that enough to get rid of the need-more-info
tag? :)