Alerting docs: adds new export alert rule definition (#97028)

* Alerting docs: adds new export alert rule definition

* update

* Update button text for exporting new rule definition

* Update docs/sources/alerting/set-up/provision-alerting-resources/export-alerting-resources/index.md

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>

* Update docs/sources/alerting/set-up/provision-alerting-resources/export-alerting-resources/index.md

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>

* definition

* type

* definition 2

* pepes feedback

* removes will

---------

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
pull/96941/head^2
brendamuir 6 months ago committed by GitHub
parent 6e62afa950
commit 52f6f69d4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 25
      docs/sources/alerting/set-up/provision-alerting-resources/export-alerting-resources/index.md
  2. 2
      public/app/features/alerting/unified/rule-list/RuleList.v1.tsx
  3. 2
      public/locales/en-US/grafana.json
  4. 2
      public/locales/pseudo-LOCALE/grafana.json

@ -153,6 +153,23 @@ To export a modified alert rule without saving the modifications, complete the f
1. Click **Copy Code** or **Download**.
### Export a new alert rule definition without saving changes
{{% admonition type="note" %}} You can only export in Terraform (HCL) format. {{% /admonition %}}
Add a new alert rule definition to an existing provisioned rule group rather than creating the code manually. You can then copy it to your Terraform pipeline, and quickly deploy and manage alert rules as part of your infrastructure as code.
An alert rule definition differs from an alert rule in the sense that you define your alert rule, but you do not save it. It only becomes a saved alert rule once you provision it using Terraform.
To export your alert rule definition into Terraform (HCL) format, complete the following steps.
1. Click **Alerts & IRM** -> **Alert rules**.
2. Click **Export rule definition**.
3. Fill out the alert rule details.
4. Choose a provisioned folder and group to add your alert rule definition to.
5. Click **Export**.
6. Copy and paste the code into your Terraform pipeline to create your new alert rule.
### Export contact points
To export contact points from the Grafana UI, complete the following steps.
@ -182,19 +199,19 @@ All notification policies are provisioned through a single resource: the root of
{{% admonition type="warning" %}}
Since the policy tree is a single resource, provisioning it will overwrite a policy tree created through any other means.
Since the policy tree is a single resource, provisioning it overwrites a policy tree created through any other means.
{{< /admonition >}}
To export the notification policy tree from the Grafana UI, complete the following steps.
1. Click **Alerts & IRM** -> **Notification policies**.
1. In the **Default notification policy** section, click **...** -> **Export**.
1. Choose the format to export in.
2. In the **Default notification policy** section, click **...** -> **Export**.
3. Choose the format to export in.
The exported contact point appears in different formats - YAML, JSON, Terraform.
1. Click **Copy Code** or **Download**.
4. Click **Copy Code** or **Download**.
### Export mute timings

@ -194,7 +194,7 @@ function ExportNewRuleButton() {
tooltip="Export new grafana rule"
onClick={() => logInfo(LogMessages.exportNewGrafanaRule)}
>
<Trans i18nKey="alerting.list-view.section.grafanaManaged.export-new-rule">Export new alert rule</Trans>
<Trans i18nKey="alerting.list-view.section.grafanaManaged.export-new-rule">Export rule definition</Trans>
</LinkButton>
);
}

@ -307,7 +307,7 @@
"title": "Data source-managed"
},
"grafanaManaged": {
"export-new-rule": "Export new alert rule",
"export-new-rule": "Export rule definition",
"export-rules": "Export rules",
"loading": "Loading...",
"new-recording-rule": "New recording rule",

@ -307,7 +307,7 @@
"title": "Đäŧä şőūřčę-mäʼnäģęđ"
},
"grafanaManaged": {
"export-new-rule": "Ēχpőřŧ ʼnęŵ äľęřŧ řūľę",
"export-new-rule": "Ēχpőřŧ řūľę đęƒįʼnįŧįőʼn",
"export-rules": "Ēχpőřŧ řūľęş",
"loading": "Ŀőäđįʼnģ...",
"new-recording-rule": "Ńęŵ řęčőřđįʼnģ řūľę",

Loading…
Cancel
Save