Prometheus mirror
Pull telemetry from Prometheus using mirroring.
This page describes StackState version 4.0.
The StackState 4.0 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.0 version range to upgrade to a more recent release.
Prometheus Mirror
Prometheus mirror is a gateway between StackState and Prometheus that enables Prometheus telemetry in StackState.
Prerequisites
The Prometheus Mirror has the following prerequisites:
The mirror must be reachable from StackState
Prometheus must be reachable from the mirror without authentication
Helm
The Prometheus mirror is available via the StackState helm repository. Configure your helm with these 2 commands:
Install the Prometheus mirror with the following command:
Alternatively, you can use the docker container directly:
Mirror configuration
The Prometheus mirror is configured using the following parameters:
global.apiKey
- the API key used to authenticate communication between the mirror and StackStateworkers
- number of workers processes (default:20
)port
- the port the mirror is listening on (default:9900
)
StackState configuration
In order to start using Prometheus mirror in StackState one has to create Mirror Datasource
Configure Mirror Datasource
Create a new Mirror datasource:
DataSourceUrl - points to Prometheus mirror endpoint http://:9900
Api Key - should be the same key as specified by
global.apiKey
mirror configurationConnection Details JSON - the mirror configuration json, e.g.
Prometheus host/port refers to the actual Prometheus host/port (not the mirror).
Query Configuration
Prometheus Counter
Counter queries fetch counter metrics from Prometheus. The retrieved counter values are transformed to a rate.
The following are sample parameters for a counter query:
__counter__ = go_memstats_lookups_total
job = payment-service
name = payment
instance = 127.0.0.1:80
Prometheus Gauge
Gauge queries fetch gauge metrics from Prometheus.
The following are sample parameters for a gauge query:
__gauge__ = go_gc_duration_seconds
job = payment-service
name = payment
instance = 127.0.0.1:80
Prometheus Histogram and Summary
Prometheus histogram and summary queries are not supported from the query interface. They still can be configured using tilda-query.
Tilda ~ query
The query allows arbitrary Prometheus queries, e.g.
Last updated