Grafana
Grafana is an open-source observability platform that provides monitoring and visual analytics for application performance. Grafana allows you to visualize your data, from bar charts and histograms to pie charts and geomaps.
In this guide, you'll learn how to set up and use the Grafana integration to embed Grafana dashboards into Cortex and drive insights into key values:
- Dashboards
- Real-time metrics
- KPIs
Setup and configuration
In order to embed a Grafana dashboard, you'll first need to make the dashboard public. Then, get the public embed link provided in the iframe
snippet. Make sure to enable iframe embedding.
Registration
Discovery
Cortex does not automatically discover Grafana dashboards based on an entity tag. Instead, you'll define the public embed link from the prior step in the YAML for each related entity.
Entity descriptor
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 | ✓ |
Expected results
Entity pages
Once you've defined the dashboard(s) in a YAML, you'll be able to view the graphs from an entity's details page. Open the Dashboard page from the Integrations tab in the side panel. All dashboards defined in the descriptor will be embedded on this page.
Grafana dashboards must be defined individually for each entity.
Scorecards and CQL
With the Grafana integration, you can create Scorecard rules and write CQL queries based on Grafana dashboards.
See more examples in the CQL Explorer in Cortex.
Embeds
Query against embeds associated with an entity.
Definition: embeds()
Example
If dashboards are a core part of operations at your organization, you can set a Scorecard rule to make sure entities have embedded dashboards.
embeds().any((embed) => embed.type == "GRAFANA")
Background sync
Dashboards 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 are all the ways to get assistance from our customer engineering team. Please use the option that is best for your users:
- Email: help@cortex.io, 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.