TeamEnterprise
Overview
The Prometheus metric name and label format specifies [a-zA-Z_][a-zA-Z0-9_]*
as valid characters. Where Flink resource names (e.g. jobs) contain characters outside of that range Flex will convert non-matching characters to _
.
Configuration
To enable Prometheus endpoints set the following environment variable:
PROMETHEUS_EGRESS=true
Security
warning
Prometheus Endpoints are not secure by default.
To secure all metric endpoints you can configure basic authentication:
PROMETHEUS_USERNAME=foo
PROMETHEUS_PASSWORD=bar
Getting started
See our how-to blogpost on alerting and monitoring with Kpow, Prometheus, and AlertManager, whose approach can be adapted for Flex.
Endpoints
Flex provides a Prometheus endpoint for all TaskManager, JobManager, and job metrics:
* GET /metrics/v1 - all metrics
Sample scraper configuration
Sample Prometheus scraper configuration that we use to test Flex:
scrape_configs:
- job_name: 'flex'
metrics_path: '/metrics/v1'
static_configs:
- targets: ['host.docker.internal:3000']