28 Commits

Author SHA1 Message Date
d6d4097567 Chore: Fix goimports grouping in alerting (#62424)
* fix goimports

* fix goimports order
2023-01-30 09:55:35 +01:00
baab021fec Chore: Refactor usage of legacy data contracts (#41218)
Refactor usage of legacy data contracts. Moves legacy data contracts 
to pkg/tsdb/legacydata package.
Refactor pkg/expr to be a proper service/dependency that can be provided 
to wire to remove some unneeded dependencies to SSE in ngalert and other places.
Refactor pkg/expr to not use the legacydata,RequestHandler and use 
backend.QueryDataHandler instead.
2021-11-10 11:52:16 +01:00
24a74cd06e Chore: Refactor GoConvey tests in alerting/conditions (#40843)
* refactor goconvery tests

* use more meaningful assertion

* use more meaningful assertions
2021-10-26 23:24:58 +02:00
b79e61656a Introduce TSDB service (#31520)
* Introduce TSDB service

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

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-03-08 07:02:49 +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
066d5cf4da Alerting: Fixed the issue/bug of diff and percent_diff functions *Breaking change* (#21338)
fixes #16270 #10129
2020-02-27 20:25:03 +01:00
47314d0f13 Alerting: Handle NaN in reducers (#22053)
- Fix bug with NaN in alerting - Closes #21953
- Alert reducers (avg/max/etc) drop null values from their calculation. This change makes it so NaN values are handled in the same way as null values.
2020-02-10 19:28:07 -05:00
d8736a2547 Alerting: golint fixes for alerting (#17246) 2019-06-03 10:25:58 +02:00
28eaac3a9c Extracted common code for diff calculation 2019-02-14 21:52:59 +01:00
3c2f6094b2 Fix percent_diff calculation when points are nulls 2019-02-14 16:31:15 +01:00
7c3dcb3702 alerting: adds tests for the median reducer
adds a test that verify that null values are not used
when calculating the median value in alerting

closes #10056
2018-11-05 09:03:35 +01:00
677117fb03 fix diff and percent_diff (#12515)
* make diff and percent_diff tests more realistic

* fix diff and percent_diff

* include @marefr's additional tests
2018-07-08 21:58:34 -07:00
ec14fa58b5 alerting: add count_non_null reducer
makes it possible to have a second condition requering
at least X points of data.
2017-10-13 09:47:10 +02:00
68ed4d45fa change pdiff to percent_diff for conditions 2017-09-29 18:14:17 +08:00
9e48d54465 add diff and pdiff for conditions 2017-09-29 17:20:02 +08:00
d354f3a8af fix(alerting): fixed evaluation for no_value condition, fixes #7244 (#7247)
* fix(alerting): fixed evaluation for no_value condition, fixes #7244

* feat(alerting): moving null library into grafana, fixing handling on no value / no series
2017-01-13 12:32:30 +01:00
5ec7dea81a Merge branch 'v4.0.x' 2016-12-12 14:39:53 +01:00
dd3060fdc3 feat(alerting): calculate avg of valid points 2016-12-07 15:55:37 +01:00
2bdd2a59cb test(alerting): improve naming for test scenario 2016-12-07 15:19:58 +01:00
6c9cf87080 feat(alerting): calculate avg of valid points 2016-12-02 23:44:14 +01:00
6882dcfb99 feat(alerting): add backend support for median reducer 2016-11-22 14:09:35 +01:00
74632b5e98 Added last function for alerting conditions 2016-11-07 23:16:57 -08:00
d8aa38fafe tech(influxdb): refactor and cleanup 2016-10-06 14:16:26 +02:00
8d5857661e refactor(tsdb): changed tsdb time series model to use null.Float instead of pointers 2016-09-28 09:15:48 +02:00
592ae5a39a tests(alerting): fixes broken tests. pointers and stuff 🤷 2016-09-07 17:05:41 +02:00
77f9c24050 feat(alerting): add support for count reducer 2016-08-22 13:25:31 +02:00
95c1a4a936 feat(alerting): implement more simple reducers 2016-08-10 14:06:17 +02:00
f2436fc7cd test(alerting): add tests for simple reducer 2016-08-10 13:52:15 +02:00