grafana/pkg/services/alerting
Dewald Viljoen 6fa53a1ee4
Alerting: Allow sending notification tags to Opsgenie as extra properties (#30332)
* Alerting: Opsgenie send tags as extra properties

Allow users to select where to send notification tags when alerting via
OpsGenie. Supports sending tags as key/value details, concatenated
strings in tags or both.

Users will be able to see their tags as key/values under extra
properties in an alert on the Opsgenie UI. These key/values can
then be used in the platform for routing, templating etc.

  * Configurable delivery to either tags, extra properties or both

  * Default to current behaviour (tags only)

  * Support both so users can transition from tags to details

Add docs and clean up references

* Alerting: Add additional arg for Opsgenie tests

The NewEvalContext function now requires a 'PluginRequestValidator' argument.
As our test does not use the validator we can specify 'nil' to satisfy the
function and allow our test to pass as expected.

* Alerting: Opsgenie doc fixes

Accept suggested changes for Opsgenie docs

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Alerting: Opsgenie provisioning settings docs

Add the new setting to the provisioning docs

* Alerting: Opsgenie doc typo correction

Move the comma (,) out of the preformatting tags for the setting value

* Alerting: Opsgenie refactor send switches

Refactor the send switches to be methods on the OpsgenieNotiefier
itself. This also cleans up the method names so that the code reads
a bit more logically as:

if we should send details: send details
if we should send tags: send tags

This avoids the calling code needing to care about passing the state
and allows an engineer working in the `createAlert` function to focus
on the results of applying the logic instead.

* Alerting: Opsgenie docs rename note


Rename the note heading to match the number to more clearly link them.

* Alerting: Opsgenie use standard reference to note

Refer to the note below as per recommendation and standards.

Fixes #30331

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-03-24 17:07:26 +01:00
..
conditions Chore: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler (#31897) 2021-03-12 18:26:07 +01:00
notifiers Alerting: Allow sending notification tags to Opsgenie as extra properties (#30332) 2021-03-24 17:07:26 +01:00
testdata Alerting: improve alerting default datasource search when extracting alerts (#29993) 2021-01-07 21:33:17 +01:00
alerting_usage_test.go API: Add by UID routes for data sources (#29884) 2021-01-13 13:16:27 -05:00
alerting_usage.go API: Add by UID routes for data sources (#29884) 2021-01-13 13:16:27 -05:00
engine_integration_test.go pkg/services: Check errors (#19712) 2019-10-22 14:08:18 +02:00
engine_test.go Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
engine.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
eval_context_test.go Plugins: Requests validator (#30445) 2021-02-03 20:47:45 +01:00
eval_context.go Plugins: Requests validator (#30445) 2021-02-03 20:47:45 +01:00
eval_handler_test.go Chore: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler (#31897) 2021-03-12 18:26:07 +01:00
eval_handler.go Chore: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler (#31897) 2021-03-12 18:26:07 +01:00
extractor_test.go API: Add by UID routes for data sources (#29884) 2021-01-13 13:16:27 -05:00
extractor.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
interfaces.go Chore: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler (#31897) 2021-03-12 18:26:07 +01:00
models.go Chore: Fix various spelling errors in back-end code (#25241) 2020-06-01 17:11:25 +02:00
notifier_test.go Plugins: Requests validator (#30445) 2021-02-03 20:47:45 +01:00
notifier.go Alerting: Evaluate data templating in alert rule name and message (#29908) 2021-01-19 22:02:44 +01:00
reader.go Alerting: Log alert warnings for obsolete notifiers when extracting alerts and remove spammy error (#28162) 2020-10-22 14:43:12 +03:00
result_handler.go Chore: Enable errorlint linter (#29227) 2020-11-19 14:47:17 +01:00
rule_test.go Chore: Move tsdbifaces.RequestHandler to plugins.DataRequestHandler (#31897) 2021-03-12 18:26:07 +01:00
rule.go Chore: fix spelling mistake (#30473) 2021-01-21 09:17:46 +01:00
scheduler.go Chore/fix lint issues (#27704) 2020-09-22 16:22:19 +02:00
test_notification.go Alerting: Generate random id when testing notification channel (#31844) 2021-03-10 11:24:31 +01:00
test_rule.go Introduce TSDB service (#31520) 2021-03-08 07:02:49 +01:00
ticker_test.go Chore/fix lint issues (#27704) 2020-09-22 16:22:19 +02:00
ticker.go AlertingNG: Create a scheduler to evaluate alert definitions (#29305) 2020-12-17 16:00:09 +02:00