Describe the bug
The Single Stat plugin doesn't appear to render trigger counts correctly after upgrading to Zabbix to 4.0.x and Grafana and this Zabbix plugin to the latest available. I either see a blank panel or 'undefined' depending on the browser.
Other Single Stat panels backed on to Zabbix (not showing counts, but specific metrics) don't appear to be affected and are working as before the upgrades.
Expected behavior
Previously the Single Stat plugin would show the count of the number of triggers returned by the query.
Screenshots

Network data
This is the return data of one of two affected queries.
{
"jsonrpc": "2.0",
"result": "3",
"id": 1
}
Other Notes
I've tried deleting the panel and adding it back in again but see the same results.
I'm having the same issue after upgrading Zabbix from 4.2.0 to 4.2.1.
The default Zabbix System Status dashboard is no longer displaying the number in the blocks.

Same Issue for upgrading from 4.0.4 to 4.0.7
The API Query returns values, but they are not showed in the Single Stat Trigger counter
Seems like Zabbix changed the API Count Output Datafield in the last Update.
"Fixed api returns "countoutput", "select*": "count" results and "suppressed" property as integer"
https://support.zabbix.com/browse/ZBX-15762
Object
xhrStatus:"complete"
request:Object
method:"POST"
url:"api/datasources/proxy/1"
data:Object
jsonrpc:"2.0"
method:"trigger.get"
params:Object
output:"extend"
hostids:Array[50]
min_severity:4
filter:Object
value:1
expandDescription:true
expandData:true
expandComment:true
monitored:true
skipDependent:true
selectLastEvent:"extend"
selectGroups:"extend"
selectHosts:Array[2]
0:"host"
1:"name"
countOutput:true
applicationids:Array[50]
lastChangeSince:1546297200
lastChangeTill:1556083617
id:1
auth:"7e67168c67c0fd46dbce38e19783e4aa"
response:Object
jsonrpc:"2.0"
result:"1"
id:1
Update
if you disable the Queries->"Count" value (eq countOutput:true) and set the Severity in Visualisation->Column to the correct Severity then you get the correct value back


Yes, now Zabbix returns result field as a string (was an integer number previously).
Can the commit be released in a 3.10.3 update? Seems like it just missed out on 3.10.2.
Hello Guys
I'm having the same problem but I don't understand how to fixed, can anyone explain in more details the solution, by the way I'm a System Admin :)
Software Version
Zabbix Grafana Zabbix-Grafana-Plugin
4.0.7 6.1.6 3.10.2
Well, but its explained here for Sys Admins -> you cant fix it until the next update is released, because its a bug in the current version, in cause of the change in the latest Zabbix Version you running.
@alexanderzobnin 2 months have passed since the patch was committed to master. Could a new release be pushed out so that this plugin will work with current versions of Zabbix?
I am tested new pre release verison zabbix 4.2.2rc1, still has problem
Most helpful comment
@alexanderzobnin 2 months have passed since the patch was committed to master. Could a new release be pushed out so that this plugin will work with current versions of Zabbix?