mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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>
This commit is contained in:
parent
6e62afa950
commit
52f6f69d4b
@ -153,6 +153,23 @@ To export a modified alert rule without saving the modifications, complete the f
|
|||||||
|
|
||||||
1. Click **Copy Code** or **Download**.
|
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
|
### Export contact points
|
||||||
|
|
||||||
To export contact points from the Grafana UI, complete the following steps.
|
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" %}}
|
{{% 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 >}}
|
{{< /admonition >}}
|
||||||
|
|
||||||
To export the notification policy tree from the Grafana UI, complete the following steps.
|
To export the notification policy tree from the Grafana UI, complete the following steps.
|
||||||
|
|
||||||
1. Click **Alerts & IRM** -> **Notification policies**.
|
1. Click **Alerts & IRM** -> **Notification policies**.
|
||||||
1. In the **Default notification policy** section, click **...** -> **Export**.
|
2. In the **Default notification policy** section, click **...** -> **Export**.
|
||||||
1. Choose the format to export in.
|
3. Choose the format to export in.
|
||||||
|
|
||||||
The exported contact point appears in different formats - YAML, JSON, Terraform.
|
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
|
### Export mute timings
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ function ExportNewRuleButton() {
|
|||||||
tooltip="Export new grafana rule"
|
tooltip="Export new grafana rule"
|
||||||
onClick={() => logInfo(LogMessages.exportNewGrafanaRule)}
|
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>
|
</LinkButton>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@
|
|||||||
"title": "Data source-managed"
|
"title": "Data source-managed"
|
||||||
},
|
},
|
||||||
"grafanaManaged": {
|
"grafanaManaged": {
|
||||||
"export-new-rule": "Export new alert rule",
|
"export-new-rule": "Export rule definition",
|
||||||
"export-rules": "Export rules",
|
"export-rules": "Export rules",
|
||||||
"loading": "Loading...",
|
"loading": "Loading...",
|
||||||
"new-recording-rule": "New recording rule",
|
"new-recording-rule": "New recording rule",
|
||||||
|
@ -307,7 +307,7 @@
|
|||||||
"title": "Đäŧä şőūřčę-mäʼnäģęđ"
|
"title": "Đäŧä şőūřčę-mäʼnäģęđ"
|
||||||
},
|
},
|
||||||
"grafanaManaged": {
|
"grafanaManaged": {
|
||||||
"export-new-rule": "Ēχpőřŧ ʼnęŵ äľęřŧ řūľę",
|
"export-new-rule": "Ēχpőřŧ řūľę đęƒįʼnįŧįőʼn",
|
||||||
"export-rules": "Ēχpőřŧ řūľęş",
|
"export-rules": "Ēχpőřŧ řūľęş",
|
||||||
"loading": "Ŀőäđįʼnģ...",
|
"loading": "Ŀőäđįʼnģ...",
|
||||||
"new-recording-rule": "Ńęŵ řęčőřđįʼnģ řūľę",
|
"new-recording-rule": "Ńęŵ řęčőřđįʼnģ řūľę",
|
||||||
|
Loading…
Reference in New Issue
Block a user