grafana-zabbix: Perl regex syntax no longer accepted in any filter (plugin 4.2)
Describe the bug After update to 4.2.1 plugin (and grafana 8.1.1) any panel with an item/application/host/group filter that uses Perl regex syntax will show no-data. Using simpler regex syntax shows data as normal. Tried to switch from old “Graph” viz to the new “Time series” without any change in behaviour.
Expected behavior Time-series graph shown also for Perl regex syntax filters as the same syntax worked previously (grafana 7.x/8.0 and plugin 4.1.5). Edit: it also works with grafana 8.1.2+plugin 4.1.5 (but that has other issues)
Network data
{“queries”:[{“application”:{“filter”:“CPU”},“countTriggers”:true,“functions”:[],“group”:{“filter”:“/^Linux servers$/”},“host”:{“filter”:“/^mgc01$/”},“item”:{“filter”:“/^CPU (?!idle|usage|ready)/”},“minSeverity”:3,“options”:{“disableDataAlignment”:false,“showDisabledItems”:false,“skipEmptyValues”:false,“useZabbixValueMapping”:false},“proxy”:{“filter”:“”},“queryType”:“0”,“refId”:“A”,“resultFormat”:“time_series”,“table”:{“skipEmptyValues”:false},“tags”:{“filter”:“”},“trigger”:{“filter”:“”},“triggers”:{“acknowledged”:2,“count”:true,“minSeverity”:3},“itemTag”:{“filter”:“Application: CPU”},“datasource”:“Zabbix”,“datasourceId”:1,“intervalMs”:10000,“maxDataPoints”:931}],“range”:{“from”:“2021-08-12T05:34:20.111Z”,“to”:“2021-08-12T08:34:20.111Z”,“raw”:{“from”:“now-3h”,“to”:“now”}},“from”:“1628746460111”,“to”:“1628757260111”}
{“results”:{“A”:{“error”:“error parsing regexp: invalid or unsupported Perl syntax: (?!
”,“frames”:[]}}}
Software versions
Grafana | Zabbix | Grafana-Zabbix Plugin |
---|---|---|
8.1.1 | 5.2.7 | 4.2.1 |
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 12
- Comments: 34
Since this issue is quite critical and it’s a blocker for many users, I decided to release it as soon as possible. So here’s a 4.2.10 release https://github.com/alexanderzobnin/grafana-zabbix/releases/tag/v4.2.10 Plugin also submitted to grafana.com, but it may take time to verify. So if you want to upgrade, you can run
then restart grafana server
Any update in this? It is really critical. Regular expressions are widely beeing used in Grafana. So if you broke regexp, you broke many things!
i-ky: Good call, a quick google gave me this example that uses golang pcre lib/wrapper: https://golangbyexample.com/golang-regex-backreferences/
I confirm this issue. Using regex in host field as
/^(?!.*somehostname)/
doesn’t render any data. But replacing it with/.*/
is working.So, the current workaround is downgrade to 4.1.5.
Waiting for the resolution.