* [Alerting]: Fix empty rules evaluation statuses
`GetRuleGroupAlertRules()` requires an non empty namespaceUID
* Include the namespace into the response
* [Alerting]: Use title instead of slug for retrieving the namespace
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* add db columns
* Fix deserialisation issue of AlertRule For field (#32848)
* Update to latest alerting-api
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
* Initial commit for state tracking
* basic state transition logic and tests
* constructor. test and interface fixup
* use new sig for sch.definitionRoutine()
* test fixup
* make the linter happy
* more minor linting cleanup
* Alerting: Send alerts from state tracker to notifier
* Add evaluation time and test
Add evaluation time and test
* Add cleanup routine and logging
* Pull in compact.go and reconcile differences
* Save alert transitions and save all state on shutdown
* pr feedback
* WIP
* WIP
* Persist alerts on evaluation and shutdown. Warm cache on startup
* Filter non-firing alerts before sending to notifier
Co-authored-by: Josue Abreu <josue@grafana.com>
* Add validation for grafana recipient
* Alertmanager API implementation (WIP)
* Fix encoding/decoding receiver settings from/to YAML
* Save templates together with the configuration
* update POST to apply latest config
* Alertmanager service enabled by the ngalert toggle
* Silence API integration with Alertmanager
* Apply suggestions from code review
Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
* Alerting: Fetch configuration from the database and run a notification
instance
Co-Authored-By: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
* Alerting: Add database table for persisting alerting configuration
* Fix the linter
* Address review comments
* Don't split templates and configuration
It is already bundled together as part of a of the API so might as well
marshall it directly.