Move QueryData method into backend plugin manager which HandleRequest uses to
query data from plugin SDK supported data sources. This allowed us to remove a lot
of code no longer needed.
Ref #21510
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
removes "rpc error: code = InvalidArgument desc =" like strings from error messages.
This came from old grpc stuff left from when SSE was a plugin (that probably should
not have been used even when it was a plugin)
* starting to add eval logic.
* wip
* first version of test rule.
* reverted file.
* add info colum to result to show error or (with CC evalmatches)
* fix labels in evalmatch
* fix be test
* refactored using observables.
* moved widht/height div to outside panel rendere.
* adding docs api level.
* adding container styles to error div.
* increasing size of preview.
Co-authored-by: kyle <kyle@grafana.com>
* Remove use of backend SDKs backend.Logger
* reorder imports
* FIx logger name
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* [Alerting]: Add alerting endpoint for Query Evaluation
* Fix passing down now parameter
* Add validations and test
* Fix eval queries and expressions test
* Add eval tests
* SSE: fix reduce to handle non-null
* add type for data.Field that is float64 or *float64
* resample fix for non-null input case, add couple non-null tests
- Add the ability to stick metadata attached to a value in expressions. Currently uses Frame.Meta.Custom.
- None of this is consumed by anything yet, so an incremental step.
- Takes the conditions property from the settings column of an alert from alerts table and turns into an ng alerting condition with the queries and classic condition.
- Has temp API rest endpoint that will take the dashboard conditions json, translate it to SEE queries + classic condition, and execute it (only enabled in dev mode).
- Changes expressions to catch query responses with a non-nil error property
- Adds two new states for an NG instance result (NoData, Error) and updates evaluation to match those states
- Changes the AsDataFrame (for frontend) from Bool to string to represent additional states
- Fix bug in condition model to accept first Operator as empty string.
- In ngalert, adds GetQueryDataRequest, which was part of execute and is still called from there. But this allows me to get the Expression request from a condition to make the "pipeline" can be built.
- Update AsDataFrame for evalresult to be row based so it displays a little better for now
This is a translation of services/alerting/conditions. Main Changes:
- Work with types in SSE (series/number) which are data frames (no more null.Float).
- The query part from alerting/conditions is handled by SSE logic
- Convey / simplejson removed.
- Time range no longer part of "query" in the condition
* Measure transformation number and elapsed time
* Change histogram to summary
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Pass skipCache from context
* Use macaron Params instead of ParamsEscape for UIDs
* Modify queries and transform to get datasource UIDs
* Update github.com/grafana/grafana-plugin-sdk-go to v0.83.0
* Expr: fix failure to execute due to OrgID
Get orgID from the plugin context, which makes more sense anyways.
makes expressions work again after https://github.com/grafana/grafana/pull/29449 changes.
* Do not save organisation on its alert query model
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
* comes from grafana/gel-app
* remove transform plugin code
* move __expr__ and -100 constants to expr pkg
* set OrgID on request plugin context
* use gtime for resample duration
* in resample, rename "rule" to "window", use gtime for duration, parse duration before exec
* remove gel entry from plugins-bundled/external.json
which creates an empty array for plugins