This PR moves the health check to backend only leaving in the frontend
the functionality to test the dbconnector datasource.
Leaving the `dbconnector.testDataSource` should be fine since the
datasource types we allow for db connection with Zabbix already are
backend datasources, and so their health requests would go through the
backend.
Verified:
Clicking test and seeing a `health` request go out.
IMPORTANT: While testing this in the UI, I found a bug with the config
editor - whenever a change is made in the UI and tested, the changes
don't take effect (i.e. disabling trends, keeps `trends` set to `true`,
enabling db connection keep `dbConnectionEnabled` set to `false` and so
on.). Created a separate
[issue](https://github.com/orgs/grafana/projects/457/views/40?pane=issue&itemId=3627315751&issue=grafana%7Coss-big-tent-squad%7C132)
to fix this
Fixes https://github.com/grafana/oss-big-tent-squad/issues/124
Fixes https://github.com/grafana/grafana-zabbix/issues/2004
- Remove isPathologicalRegex function and replace with MatchTimeout
- Simplify parseFilter by relying on runtime timeout protection
- Add comprehensive timeout test for pathological regex patterns
- Set 5-second timeout for all compiled regex operations
In this PR I removed the regex pattern length restriction because from
multi value variables this length can be easly reached, also if the
regex is going to be too long it will be caught in the timeout.
Fixes#2086
* Unit tests for backend
* minor change
* Implemented querNumericItems in backend
* Added query type
* Set alerting to true
* Return TimeSeries from History
* Updated alerting feature
* Fix params marshal error
* Fix params more
* Update zabbixAPIConnector.js
* Numbers, I guess
* Params Output Type
* Output marshaling
* Unmarshal and decoder error catch
* HistoryPoint and Unmarshal fixes
* Unmarshal to History
* Revert "Update zabbixAPIConnector.js"
This reverts commit e0ffdff859b6f920893a47a709493f8076e38ef4.
* Fix unmarshaling for real
* Time range integer
* Use more zabbix.Items
* Update response_models.go
* Update zabbix_api.go
* Update models.go
* Update zabbix_api.go
* Tests
* Adding more unit tests and cleaning up additional logging
* Make history request param a pointer
* Actually store datasource in cache
* Debug logs and timings
* Handle panics gracefully
* Updated Regex filter parsing
* Removed must compile
* Clean up regex filter