Prometheus
Overview
Prometheus is an open-source monitoring and analytics platform that allows customers to analyze, visualize, automate, and alert on metrics data. Integrate Cortex with Prometheus to drive insights into SLOs.
After configuring the integration, you will be able to view SLO information from Prometheus on entity pages in Cortex.
How to configure Prometheus with Cortex
Prerequisite
Before getting started, set up basic authentication credentials in Prometheus.
Configure the integration in Cortex
In Cortex, navigate to the Prometheus settings page:
In Cortex, click your avatar in the lower left corner, then click Settings.
Under "Integrations", click 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.
Configure the integration for multiple Prometheus accounts
The Prometheus integration has multi-account support. You can add a configuration for each additional by repeating the process above.
Each configuration requires an alias, which Cortex uses to correlate the designated with registrations for various entities. Registrations can also use a default configuration without a listed alias. You can edit aliases and default configurations from the Prometheus page in your Cortex settings. Select the edit icon next to a given configuration and toggle Set as default on. If you only have one configuration, it will automatically be set as the default.
Connecting Cortex entities to Prometheus
Linking SLOs in Cortex
You can create and manage SLOs by listing relevant SLIs through queries.
errorQuery
Query that indicates error events for your metric.
totalQuery
Query that indicates all events to be considered for your metric.
slo
Target number for SLO.
alias
Ties the SLO registration to a Prometheus instance listed under Settings → Prometheus. The alias parameter is optional, but if not provided the SLO will use the default configuration under Settings → Prometheus.
name
The SLO's name in Prometheus. The name parameter is optional.
Expected results
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(s), and the current value for each SLO.
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.
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
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