Update dependency prettier to v3.6.2 (#108689)

* Update dependency prettier to v3.6.2

* run prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
renovate[bot]
2025-07-25 17:47:44 +01:00
committed by GitHub
parent 20cea80795
commit c94f930950
104 changed files with 50 additions and 250 deletions

View File

@ -51,17 +51,14 @@ Learning about alert instances and notification policies is useful if you have m
There are different ways you can follow along with this tutorial.
- **Grafana Cloud**
- As a Grafana Cloud user, you don't have to install anything. [Create your free account](http://www.grafana.com/auth/sign-up/create-user).
Continue to [Alert instances](#alert-instances).
- **Interactive learning environment**
- Alternatively, you can try out this example in our interactive learning environment: [Get started with Grafana Alerting - Alert routing](https://killercoda.com/grafana-labs/course/grafana/alerting-get-started-pt2/). It's a fully configured environment with all the dependencies already installed.
- **Grafana OSS**
- If you opt to run a Grafana stack locally, ensure you have the following applications installed:
- [Docker Compose](https://docs.docker.com/get-docker/) (included in Docker for Desktop for macOS and Windows)
@ -252,7 +249,6 @@ Grafana includes a [test data source](https://grafana.com/docs/grafana/latest/da
The above CSV data simulates a data source returning multiple time series, each leading to the creation of an alert instance for that specific time series. Note that the data returned matches the example in the [Alert instance](#alert-instances) section.
1. In the **Alert condition** section:
- Keep `Last` as the value for the reducer function (`WHEN`), and `IS ABOVE 1000` as the threshold value. This is the value above which the alert rule should trigger.
1. Click **Preview alert rule condition** to run the queries.

View File

@ -68,17 +68,14 @@ In this tutorial, you will:
There are different ways you can follow along with this tutorial.
- **Grafana Cloud**
- As a Grafana Cloud user, you don't have to install anything. [Create your free account](http://www.grafana.com/auth/sign-up/create-user).
Continue to [How alert rule grouping works](#how-alert-rule-grouping-works).
- **Interactive learning environment**
- Alternatively, you can try out this example in our interactive learning environment: [Get started with Grafana Alerting - Grouping](https://killercoda.com/grafana-labs/course/grafana/alerting-get-started-pt3/). It's a fully configured environment with all the dependencies already installed.
- **Grafana OSS**
- If you opt to run a Grafana stack locally, ensure you have the following applications installed:
- [Docker Compose](https://docs.docker.com/get-docker/) (included in Docker for Desktop for macOS and Windows)
@ -227,16 +224,13 @@ Following the above example, [notification policies](ref:notification-policies)
<!-- INTERACTIVE ignore START -->
1. Sign in to Grafana:
- **Grafana Cloud** users: Log in via Grafana Cloud.
- **OSS users**: Go to [http://localhost:3000](http://localhost:3000).
1. Navigate to **Notification Policies**:
- Go to **Alerts & IRM > Alerting > Notification Policies**.
1. Add a child policy:
- In the Default policy, click **+ New child policy**.
- **Label**: `region`
- **Operator**: `=`
@ -245,31 +239,26 @@ Following the above example, [notification policies](ref:notification-policies)
This label matches alert rules where the region label is us-west.
1. Choose a **Contact point**:
- Select **Webhook**.
If you dont have any contact points, add a [Contact point](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/#add-a-contact-point).
1. Enable Continue matching:
- Turn on **Continue matching subsequent sibling nodes** so the evaluation continues even after one or more labels (i.e. region label) match.
1. Override grouping settings:
- Toggle **Override grouping**.
- **Group by**: Add `region` as label. Remove any existing labels.
**Group by** consolidates alerts that share the same grouping label into a single notification. For example, all alerts with `region=us-west` will be combined into one notification, making it easier to manage and reducing alert fatigue.
1. Set custom timing:
- Toggle **Override general timings**.
- **Group interval**: `2m`. This ensures follow-up notifications for the same alert group will be sent at intervals of 2 minutes. While the default is 5 minutes, we chose 2 minutes here to provide faster feedback for demonstration purposes.
**Timing options** control how often notifications are sent and can help balance timely alerting with minimizing noise.
1. Save and repeat:
- Repeat the steps above for `region = us-east` but without overriding grouping and timing options. Use a different webhook endpoint as the contact point.
{{< figure src="/media/docs/alerting/notificaiton-policies-region.png" max-width="750px" alt="Two nested notification policies to route and group alert notifications" >}}
@ -290,7 +279,6 @@ Following the above example, [notification policies](ref:notification-policies)
1. Visit [http://localhost:3000](http://localhost:3000), where Grafana should be running
1. Navigate to **Alerts & IRM > Alerting > Notification policies**.
1. In the Default policy, click **+ New child policy**.
- In the Default policy, click **+ New child policy**.
- **Label**: `region`
- **Operator**: `=`
@ -299,31 +287,26 @@ Following the above example, [notification policies](ref:notification-policies)
This label matches alert rules where the region label is us-west
1. Choose a **Contact point**:
- Select **Webhook**.
If you dont have any contact points, add a Contact point.
1. Enable Continue matching:
- Turn on **Continue matching subsequent sibling nodes** so the evaluation continues even after one or more labels (i.e. region label) match.
1. Override grouping settings:
- Toggle **Override grouping**.
- **Group by**: `region`.
**Group by** consolidates alerts that share the same grouping label into a single notification. For example, all alerts with `region=us-west` will be combined into one notification, making it easier to manage and reducing alert fatigue.
1. Set custom timing:
- Toggle **Override general timings**.
- **Group interval**: `2m`. This ensures follow-up notifications for the same alert group will be sent at intervals of 2 minutes. While the default is 5 minutes, we chose 2 minutes here to provide faster feedback for demonstration purposes.
**Timing options** control how often notifications are sent and can help balance timely alerting with minimizing noise.
1. Save and repeat:
- Repeat for `region = us-east` with a different webhook or a different contact point.
**Note**: Label matchers are combined using the `AND` logical operator. This means that all matchers must be satisfied for a rule to be linked to a policy. If you attempt to use the same label key (e.g., region) with different values (e.g., us-west and us-east), the condition will not match, because it is logically impossible for a single key to have multiple values simultaneously.
@ -355,7 +338,6 @@ Grafana includes a [test data source](https://grafana.com/docs/grafana/latest/da
1. From the drop-down menu, select **TestData** data source.
1. From **Scenario** select **CSV Content**.
1. Copy in the following CSV data:
- Select **TestData** as the data source.
- Set **Scenario** to **CSV Content**.
- Use the following CSV data:
@ -375,7 +357,6 @@ Grafana includes a [test data source](https://grafana.com/docs/grafana/latest/da
The returned data simulates a data source returning multiple time series, each leading to the creation of an alert instance for that specific time series.
1. In the **Alert condition** section:
- Keep `Last` as the value for the reducer function (`WHEN`), and `IS ABOVE 75` as the threshold value. This is the value above which the alert rule should trigger.
1. Click **Preview alert rule condition** to run the queries.

View File

@ -100,17 +100,14 @@ There are different ways you can follow along with this tutorial.
> Note: Some of the templating features in Grafana Alerting discussed in this tutorial are currently available in Grafana Cloud but have not yet been released to the Open Source (OSS) version.
- **Grafana Cloud**
- As a Grafana Cloud user, you don't have to install anything. [Create your free account](http://www.grafana.com/auth/sign-up/create-user).
Continue to [how templating works](#how-templating-works).
- **Interactive learning environment**
- Alternatively, you can try out this example in our interactive learning environment: [Get started with Grafana Alerting - Templating](https://killercoda.com/grafana-labs/course/grafana/alerting-get-started-pt4/). It's a fully configured environment with all the dependencies already installed.
- **Grafana OSS**
- If you opt to run a Grafana stack locally, ensure you have the following applications installed:
- [Docker Compose](https://docs.docker.com/get-docker/) (included in Docker for Desktop for macOS and Windows)
@ -215,7 +212,6 @@ Now that we've introduced how templating works, lets move on to the next step
### Create an alert rule
1. Sign in to Grafana:
- **Grafana Cloud** users: Log in via Grafana Cloud.
- **OSS users**: Go to [http://localhost:3000](http://localhost:3000).
@ -224,7 +220,6 @@ Now that we've introduced how templating works, lets move on to the next step
- Click **+ New alert rule**.
- Enter an **alert rule name**. Name it `High CPU usage`
1. **Define query an alert condition** section:
- Select TestData data source from the drop-down menu.
[TestData](https://grafana.com/docs/grafana/latest/datasources/testdata/) is included in the demo environment. If youre working in Grafana Cloud or your own local Grafana instance, you can add the data source through the Connections menu.
@ -243,7 +238,6 @@ Now that we've introduced how templating works, lets move on to the next step
This dataset simulates a data source returning multiple time series, with each time series generating a separate alert instance.
1. **Alert condition** section:
- Keep Last as the value for the reducer function (`WHEN`), and `IS ABOVE 75` as the threshold value, representing CPU usage above 75% .This is the value above which the alert rule should trigger.
- Click **Preview alert rule condition** to run the queries.
@ -252,7 +246,6 @@ Now that we've introduced how templating works, lets move on to the next step
{{< figure src="/media/docs/alerting/part-4-firing-instances-preview.png" max-width="1200px" caption="Preview of a query returning alert instances" >}}
1. Add folders and labels section:
- In **Folder**, click **+ New folder** and enter a name. For example: `System metrics` . This folder contains our alert rules.
Note: while it's possible to template labels here, in this tutorial, we focus on templating the summary and annotations fields instead.
@ -265,13 +258,11 @@ Now that we've introduced how templating works, lets move on to the next step
1. **Configure notifications** section:
Select who should receive a notification when an alert rule fires.
- Select a **Contact point**. If you dont have any contact points, click _View or create contact points_.
1. **Configure notification message** section:
In this step, youll configure the **summary** and **description** annotations to make your alert notifications informative and easy to understand. These annotations use templates to dynamically include key information about the alert.
- **Summary** annotation: Enter the following code as the value for the annotation.:
```go
@ -412,7 +403,6 @@ In this tutorial, we learned how to use templating in Grafana Alerting to create
To deepen your understanding of Grafanas templating, explore the following resources:
- **Overview of the functions and operators used in templates**:
- [Notification template language](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/template-notifications/language/)
- [Alert rule template language](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/templates/language/)

View File

@ -37,7 +37,6 @@ In this tutorial you will learn how to:
## Before you begin
- **Interactive learning environment**
- Alternatively, you can [try out this example in our interactive learning environment](https://killercoda.com/grafana-labs/course/grafana/alerting-get-started-pt5/). Its a fully configured environment with all the dependencies already installed.
- **Grafana OSS**
@ -174,14 +173,12 @@ Notification policies route alert instances to contact points via label matchers
Although our application doesn't explicitly include an `environment` label, we can rely on other labels like `instance` or `deployment`, which may contain keywords (like prod or staging) that indicate the environment.
1. Sign in to Grafana:
- **Grafana Cloud** users: Log in via Grafana Cloud.
- **OSS users**: Go to [http://localhost:3000](http://localhost:3000).
1. Navigate to **Alerts & IRM > Alerting > Notification Policies**.
1. Add a child policy:
- In the **Default policy**, click **+ New child policy**.
- **Label**: `environment`.
- **Operator**: `=`.
@ -189,17 +186,14 @@ Although our application doesn't explicitly include an `environment` label, we c
- This label matches alert rules where the environment label is `prod`.
1. Choose a **contact point**:
- If you dont have any contact points, add a [Contact point](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/#add-a-contact-point).
For a quick test, you can use a public webhook from [webhook.site](https://webhook.site/) to capture and inspect alert notifications. If you choose this method, select **Webhook** from the drop-down menu in contact points.
1. Enable continue matching:
- Turn on **Continue matching subsequent sibling nodes** so the evaluation continues even after one or more labels (i.e., _environment_ labels) match.
1. Save and repeat
- Create another child policy by following the same steps.
- Use `environment = staging` as the label/value pair.
- Feel free to use a different contact point.
@ -234,7 +228,6 @@ Make it short and descriptive, as this will appear in your alert notification. F
```
1. **Alert condition** section:
- Enter `75` as the value for **WHEN QUERY IS ABOVE** to set the threshold for the alert.
- Click **Preview alert rule condition** to run the queries.

View File

@ -39,7 +39,6 @@ In this tutorial you will learn how to:
## Before you begin
- **Interactive learning environment**
- Alternatively, you can [try out this example in our interactive learning environment](https://killercoda.com/grafana-labs/course/grafana/alerting-get-started-pt6/). Its a fully configured environment with all the dependencies already installed.
- **Grafana OSS**
@ -150,12 +149,10 @@ To keep track of these metrics you can set up a visualization for CPU usage and
The time-series visualization supports alert rules to provide more context in the form of annotations and alert rule state. Follow these steps to create a visualization to monitor the applications metrics.
1. Log in to Grafana:
- Navigate to [http://localhost:3000](http://localhost:3000), where Grafana should be running.
- Username and password: `admin`
1. Create a time series panel:
- Navigate to **Dashboards**.
- Click **+ Create dashboard**.
- Click **+ Add visualization**.
@ -163,7 +160,6 @@ The time-series visualization supports alert rules to provide more context in th
- Enter a title for your panel, e.g., **CPU and Memory Usage**.
1. Add queries for metrics:
- In the query area, copy and paste the following PromQL query:
** switch to **Code** mode if not already selected **
@ -177,7 +173,6 @@ The time-series visualization supports alert rules to provide more context in th
This query should display the simulated CPU usage data for the **prod** environment.
1. Add memory usage query:
- Click **+ Add query**.
- In the query area, paste the following PromQL query:
@ -219,7 +214,6 @@ Make it short and descriptive, as this will appear in your alert notification. F
```
1. **Alert condition**
- Enter 75 as the value for **WHEN QUERY IS ABOVE** to set the threshold for the alert.
- Click **Preview alert rule condition** to run the queries.

View File

@ -57,17 +57,14 @@ After you have completed Part 1, dont forget to explore the advanced but esse
There are different ways you can follow along with this tutorial.
- **Grafana Cloud**
- As a Grafana Cloud user, you don't have to install anything. [Create your free account](http://www.grafana.com/auth/sign-up/create-user).
Continue to [Create a contact point](#create-a-contact-point).
- **Interactive learning environment**
- Alternatively, you can [try out this example in our interactive learning environment](https://killercoda.com/grafana-labs/course/grafana/alerting-get-started/). It's a fully configured environment with all the dependencies already installed.
- **Grafana OSS**
- If you opt to run a Grafana stack locally, ensure you have the following applications installed:
- [Docker Compose](https://docs.docker.com/get-docker/) (included in Docker for Desktop for macOS and Windows)
@ -194,7 +191,6 @@ Grafana includes a [test data source](https://grafana.com/docs/grafana/latest/da
1. Select the **TestData** data source from the drop-down menu.
1. In the **Alert condition** section:
- Keep **Random Walk** as the _Scenario_.
- Keep `Last` as the value for the reducer function (`WHEN`), and `IS ABOVE 0` as the threshold value. This is the value above which the alert rule should trigger.

View File

@ -65,12 +65,10 @@ There are different ways you can follow along with this tutorial.
- **Grafana OSS**
To run a Grafana stack locally, ensure you have the following applications installed:
- [Docker Compose](https://docs.docker.com/get-docker/) (included in Docker for Desktop for macOS and Windows)
- [Git](https://git-scm.com/)
- **Interactive learning environment**
- Alternatively, you can [try out this example in our interactive learning environment](https://killercoda.com/grafana-labs/course/grafana/alerting-loki-logs). It's a fully configured environment with all the dependencies already installed.
## Set up the Grafana stack
@ -227,7 +225,6 @@ In this section, we use the default options for Grafana-managed alert rule creat
{{< /docs/ignore >}}
1. In the **Alert condition** section:
- Keep `Last` as the value for the reducer function (`WHEN`), and `0` as the threshold value. This is the value above which the alert rule should trigger.
1. Click **Preview alert rule condition** to run the query.

View File

@ -375,7 +375,6 @@ The most basic alert rule consists of two parts:
> {{< /docs/ignore >}}
Some popular channels include:
- [Email](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-email/)
- [Webhooks](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier/)
- [Telegram](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram/)