Plugins
ApplicationGrafana
Grafana Advisor logo

Grafana Advisor

Grafana Labs

Get plugin

Create an alert from Advisor results

Create a Grafana alert rule that monitors Advisor check results and fires when Advisor detects failures.

Before you begin

Before you create the alert, ensure you have:

  • Grafana permissions: The Admin role, to create a service account and a data source, and permission to create alert rules.
  • Plugins: The Infinity data source (opens in new tab), version 3.3.0 or later, which supports the JQ parser used in this guide.

Create a service account and token

Advisor results are available through the Advisor HTTP API. To query the API, create a service account and a token:

  1. Click Administration > Users and access > Service accounts in the left-side menu.
  2. Click Add service account.
  3. Enter a name, for example advisor-alert-service-account.
  4. Set the role to Admin, which gives the service account the required permissions.
  5. Click Create.
  6. In the service account details, click Add service account token.
  7. Enter a token name and set an expiration date.
  8. Click Generate token.

Caution

Copy the token value immediately and store it securely. You can't view it again.

Set up the Infinity data source

The Infinity data source queries the Advisor HTTP API using the service account token.

  1. Click Connections > Add new connection.
  2. Search for Infinity.
  3. If the plugin isn't installed, click Install and wait for the installation to finish.
  4. On the plugin page, click Add new data source.
  5. Configure the data source:
    • Name: Enter a descriptive name, for example Advisor API.
    • Auth type: Select Bearer Token, then paste the service account token in Auth details.
    • Allowed hosts: Enter https://<GRAFANA_HOST> and click Add. Replace <GRAFANA_HOST> with the host of your Grafana instance.
  6. Click Save & test to verify the connection.

Create the alert rule

  1. Click Alerting > Alert rules in the left-side menu.
  2. Click New alert rule.
  3. Enter a rule name, for example Advisor failures alert.

Configure the query

  1. In Data source, select the Infinity data source you set up.
  2. Configure the query settings:
    • Type: JSON
    • Parser: JQ
    • Source: URL
    • Format: Table
    • Method: GET
    • URL: https://<GRAFANA_HOST>/apis/advisor.grafana.app/v0alpha1/namespaces/<NAMESPACE>/checks

Replace the following placeholders in the URL:

For more information about this endpoint, refer to the Advisor HTTP API (opens in new tab).

Configure parsing options

In Rows/Root, paste the following JQ expression:

.items | map({
  type: .metadata.labels["advisor.grafana.app/type"],
  creationTimestamp: .metadata.creationTimestamp,
  failuresCount: (.status.report.failures | length)
}) | group_by(.type) | map(sort_by(.creationTimestamp) | last)

This expression returns the most recent result for each check type, with its timestamp and failure count. You can use it to alert when any check type has more than 0 failures.

In Columns, add the following columns:

SelectorFormat
creationTimestampTime
failuresCountNumber
typeString

Filter by check type

Optionally, alert only on specific check types:

  1. Go to the Computed columns, Filter, Group by section.
  2. Add a Filter, for example type == "license". Replace license with the check type you want to alert on.

Set the alert condition

  1. In Alert condition, select WHEN Last OF QUERY Is above 0. The alert fires when any check type has failures.
  2. Click Preview alert rule condition to view the result of the query.

Complete the alert configuration

Select your evaluation behavior, for example every 24 hours, and configure the notification settings.

Save the alert rule

Click Save and verify that the alert fires as expected.

Insights

  • Adoption

    Running on 1,008,230 active Grafana instances.

  • Activity

    Last updated 17 Nov 2026.

    11 releases in the past year.

Version
1.1.4
Dependencies
  • Grafana >=13.2.0-0
Developer
Grafana Labs

Grafana Cloud

Connect any plugin in Grafana Cloud.

  • 150+ data source integrations
  • Grafana Assistant - AI that correlates your data, builds queries, and answers questions
  • 10k Prometheus metrics + 50 GB logs, traces, and profiles on the free tier
  • ...and more
Create free account