There’s not really a reliable way of calculating the top alerts using the grafana-zabbix plug-in. The best solution here would be connecting Grafana to Zabbix Database using a SQL Plug-in and then using a SQL query to get the data directly from the database.