24 Commits

Author SHA1 Message Date
66c56cdb83 Graphite: Support backend queries with different time ranges (#103984)
* Refactor to handle queries with various time ranges

* Lint

* Remove comment
2025-04-22 13:14:24 +01:00
9358a557ee Graphite: Add frame type to work with SQL expressions (#103019)
- Add frame type So SQL expressions knows how to convert it
- No FrameType version so how other expressions do not change how they handle it, and continue to catch the special graphite handling in SSE convert
2025-04-01 09:43:36 -04:00
9eaaf95701 Hackaton 12: Add some unit tests, take 1 (#101457)
* tsdb/graphite: add happy path test for QueryData

* infra/httpclient/httpclientprovider: add tests for RedirectLimitMiddleware
2025-02-28 16:11:11 +02:00
210d73188d Return a 400 instead of a 500 for empty query (#98841) 2025-01-13 14:58:13 -05:00
286b9e08e9 Plugins: Bump Plugin SDK version and address instance management breaking changes (#68900)
* bump sdk and propagate ctx

* fix tests
2023-05-24 10:19:34 +02:00
f8ec35e643 Chore: Fix goimports grouping (#62427)
* fix goimports order

* fix goimports order
2023-01-30 09:38:51 +01:00
0c560b8b0d Graphite: Process multiple queries to Graphite plugin (#59608)
* make create call consistent with update and delete

* send multiple targets to graphite and correlate the responses with the requests

* make create call consistent with update and delete

* send multiple targets to graphite and correlate the responses with the requests

* Revert "make create call consistent with update and delete"

This reverts commit 26b6463bd6f72338d58872f4570b0acd5a985ec7.

* refactor query -> target parsing and fix unit tests

* add additional validations and more unit tests

* change error statement to warn
2022-12-01 18:05:44 -05:00
facf2b1ee8 Chore: Update prometheus, loki, graphite and influx plugins to support contextual logs. (#57708) 2022-10-27 12:05:06 -04:00
Jo
062d255124 Handle ioutil deprecations (#53526)
* replace ioutil.ReadFile -> os.ReadFile

* replace ioutil.ReadAll -> io.ReadAll

* replace ioutil.TempFile -> os.CreateTemp

* replace ioutil.NopCloser -> io.NopCloser

* replace ioutil.WriteFile -> os.WriteFile

* replace ioutil.TempDir -> os.MkdirTemp

* replace ioutil.Discard -> io.Discard
2022-08-10 15:37:51 +02:00
f7501ff77f Graphite: Convert tag values returned as numbers to strings (#37882)
* Convert tag values returned as numbers to string

This is a bug in Graphite <= 1.1.7. Since 1.1.8 all values are converted to strings.

* Simplify type conversions

* Fix linting errors
2021-08-19 08:40:13 -07:00
c22905f864 Graphite: Convert to use grafana-plugin-sdk-go contracts (#35798)
* Use Dataframes and extract tags from response

* Fix timestamp conversion

* Add tests for data frame conversion

* Add missing RefID and simplify returning an error

* draft dataframe/sdk convertion for graphite

* intermedia

* modify init because registration failed

* Allocate memory for each data point value

* Remove redundant memory aliasing

* Remove redundant new line

* Sort imports

* Simplify returning nil values

* fix lint

* remove unused jsondata

* add checks on query length

* remove basic auth from request

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-07-08 18:03:55 +08:00
faf25bc4ea Graphite: Interpolate Graphite alerts with tags (#35887) 2021-06-27 23:58:50 +02:00
874dc3d584 Chore: Rewrite tsdb graphite test to standard library (#30088) 2021-01-06 20:14:25 +01:00
41d432b5ae Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
5070f7a75b Chore: Start harmonizing linting with plugin SDK (#25854)
* Chore: Harmonize linting with plugin SDK

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 14:08:32 +02:00
68d4211c50 grafana-10039: fix query time range ends in the past 2017-11-30 15:50:35 +01:00
fc91231104 Fixed failing tests 2016-11-02 22:31:59 -07:00
33ee85ede9 Commented strange behavior of tests 2016-11-02 11:11:06 -07:00
a4a2e35bb2 Verified interval format function and gofmt check 2016-11-02 02:07:08 -07:00
2088363bf9 Added tests for graphite alerting 2016-11-02 00:00:18 -07:00
ae7345b04d style(prometheus): remove commented test 2016-09-21 13:46:26 +02:00
d7c03359ea feat(alerting): fixed test issues 2016-06-07 14:54:30 +02:00
3289225b77 feat(alerting): fixed test issues 2016-06-07 14:51:53 +02:00
34e17f7282 feat(alerting): requests looks to be working again 2016-06-06 17:11:46 +02:00