grafana/pkg/services/ngalert/state
Jean-Philippe Quéméner 1694a35e0c
Alerting: implement loki query for alert state history (#61992)
* Alerting: implement loki query for alert state history

* extract selector building

* add unit tests for selector creation

* backup

* give selectors their own type

* build dataframe

* add some tests

* small changes after manual testing

* use struct client

* golint

* more golint

* Make RuleUID optional for Loki implementation

* Drop initial assumption that we only have one series

* Pare down to three columns, fix timestamp overflows, improve failure cases in loki responses

* Embed structred log lines in the dataframe as objects rather than json strings

* Include state history label filter

* Remove dead code

---------

Co-authored-by: Alex Weaver <weaver.alex.d@gmail.com>
2023-02-02 16:31:51 -06:00
..
historian Alerting: implement loki query for alert state history (#61992) 2023-02-02 16:31:51 -06:00
cache_test.go Alerting: Refactor state manager's cache (#56197) 2022-10-06 15:30:12 -04:00
cache.go Alerting: Do not persist noop transition from Normal state. (#61201) 2023-01-13 18:29:29 -05:00
image_mock.go Chore: Fix goimports grouping in alerting (#62424) 2023-01-30 09:55:35 +01:00
manager_private_test.go Alerting: Do not persist noop transition from Normal state. (#61201) 2023-01-13 18:29:29 -05:00
manager_test.go Alerting: Update state manager to return StateTransitions when Delete or Reset (#62264) 2023-01-27 09:46:21 +01:00
manager.go Alerting: Update state manager to return StateTransitions when Delete or Reset (#62264) 2023-01-27 09:46:21 +01:00
persist.go Alerting: Copy rule definitions into state history (#62032) 2023-01-25 11:29:57 -06:00
state_test.go Alerting: Better define how we set states (#59977) 2022-12-08 20:12:13 +00:00
state.go Alerting: Do not persist noop transition from Normal state. (#61201) 2023-01-13 18:29:29 -05:00
template_functions.go Extract custom template functions (#60695) 2022-12-22 17:31:40 -03:00
template_test.go Remove explore compact URLs (#59686) 2022-12-14 12:57:53 -06:00
template.go Extract custom template functions (#60695) 2022-12-22 17:31:40 -03:00
testing.go Alerting: Add alert pausing feature (#60734) 2023-01-26 18:29:10 +01:00