Grafana

Grafana is an open-source observability platform that provides monitoring and visual analytics for application performance. Use Grafana to visualize your data, from bar charts and histograms to pie charts and geomaps.

Integrating Grafana with Cortex allows you to:

How to configure Grafana with Cortex

Prerequisites

Before getting started:

Embed the chart in an entity's YAML file

Define the public embed link in the entity descriptor YAML for each entity where you want to embed a chart.

  1. For the entity where you want to embed a chart, open its YAML file.

    • You can do this locally if following a GitOps approach, or you can edit a YAML file directly in the Cortex UI on the entity's details page.

  2. Add the x-cortex-dashboards block. Include the type (grafana) and the url (the public embed link you obtained from Grafana). See the example below:

x-cortex-dashboards:
  embeds:
    - type: grafana
      url: https://snapshots.raintank.io/dashboard-solo/snapshot/y7zwi2bZ7FcoTlB93WN7yWO4aMiz3pZb?from=1493369923321&to=1493377123321&panelId=4&orgId=0
Field
Description
Required

type

Type of embed (in this case, grafana)

url

Embed URL for the Grafana dashboard

Repeat the steps above for each entity you want to add a Grafana chart to.

Using the Grafana integration

Viewing Grafana charts on an entity

Once you've defined the chart in an entity's YAML, you can view the graphs from an entity's details page.

In an entity's sidebar, click Dashboard. All charts defined in the entity descriptor will be embedded on this page.

Scorecards and CQL

With the Grafana integration, you can create Scorecard rules and write CQL queries based on Grafana charts.

See more examples in the CQL Explorer in Cortex.

Embeds

Query against embeds associated with an entity.

Definition: embeds()

Example

If Grafana charts are a core part of operations at your organization, you can set a Scorecard rule to make sure entities have embedded charts.

embeds().any((embed) => embed.type == "GRAFANA")

Background sync

Grafana charts are updated in real time.

FAQs and troubleshooting

I've correctly added the embed URL, but the graph is showing an error or a blank screen.

You may need to enable embedding in your Grafana instance.

Still need help?

The following options are available to get assistance from the Cortex Customer Engineering team:

  • Email: [email protected], or open a support ticket in the in app Resource Center

  • Chat: Available in the Resource Center

  • Slack: Users with a connected Slack channel will have a workflow added to their account. From here, you can either @CortexTechnicalSupport or add a :ticket: reaction to a question in Slack, and the team will respond directly.

Don’t have a Slack channel? Talk with your Customer Success Manager.

Last updated

Was this helpful?