Cortex connects to many third-party vendors whose system interfaces frequently change. As a result, integration behavior or configuration steps may shift without notice. If you encounter unexpected issues, check with your system administrator or refer to the vendor’s documentation for the most current information. Additionally, integration sync times vary and are subject to scheduling overrides and timing variance.
Overview
Prometheus is an open-source monitoring and analytics platform that allows customers to analyze, visualize, automate, and alert on metrics data. Integrating Cortex with Prometheus allows you to:- View SLO information from Prometheus on entity pages in Cortex
- Create Scorecards that track progress and drive alignment on projects involving Prometheus SLOs
How to configure Prometheus with Cortex
There are two options for integrating Prometheus: the default configuration method and Cortex Axon Relay, a relay broker allows you to securely connect your on-premises Prometheus data.Prerequisite
Before getting started, set up basic authentication credentials in Prometheus.Default configuration
Default configuration
Configure the integration in Cortex
- In Cortex, navigate to the Prometheus settings page:
- Click Integrations from the main nav. Search for and select Prometheus.
- Click Add integration.
- Configure the Prometheus integration form:
- Account alias: Enter your account alias.
- Username and Password: Enter your Prometheus basic auth credentials.
- Host: Enter your self-managed Prometheus hostname.
- Tenant ID: Optionally, enter your tenant ID.
- If you have multiple tenants, you can enter an ID here to monitor a specific tenant.
- Click Save.
Axon Relay
Axon Relay
Configure Prometheus with Cortex Axon RelaySee Internally hosted integrations for instructions. Make sure to follow the Prometheus-specific instructions for the
docker-compose.yml file.Connecting Cortex entities to Prometheus
Linking SLOs in Cortex
You can create and manage SLOs by listing relevant SLIs through queries.The YAML examples on this page show only the
x-cortex-* block. When you add one to an entity descriptor, nest it inside the info section. Blocks at the root level of the file are ignored without an error. For a full example, see Defining entities with YAML.How Cortex calculates Prometheus SLOs
When Cortex gets an SLO from Prometheus, the following query is calculated for it:Using the Prometheus integration
View Prometheus data in entity pages
When an SLO is defined in an entity’s descriptor, you’ll see detailed data about SLOs in the Monitoring page in the sidebar of an entity details page. See the SLO query, target, the current value for each SLO, and the period of time the SLO is being calculated for. For example, if the time listed is “7 days ago,” then the SLO is looking at the time range starting 7 days ago to now..Scorecards and CQL
With the Prometheus integration, you can create Scorecard rules and write CQL queries based on Prometheus SLOs. See more examples in the CQL Explorer in Cortex.SLOs
SLOs
SLOs associated with the entity via ID or tags. You can use this data to check whether an entity has SLOs associated with it, and if those SLOs are passing.Definition: Use this expression to make sure latency Service Level Indicator (SLI) value is above 99.99%:
slos: List<SLO>ExamplesIn a Scorecard, you can use this expression to make sure an entity is passing its SLOs:View integration logs
This feature is available in Cortex cloud.

Still need help?
The following options are available to get assistance from the Cortex Customer Engineering team:- Email: help@cortex.io, or open a support ticket in the in app 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.