数据源 zabbix的数据库mysql,grafana配置数据源过程省略
SELECT $__unixEpochGroupAlias(clock,1d), count(distinct subject) AS "每日告警数量" FROM alerts WHERE $__unixEpochFilter(clock) GROUP BY 1 ORDER BY $__unixEpochGroup(clock,$__interval)