Use when setting up Prometheus monitoring, writing PromQL queries, configuring alerting rules, instrumenting applications with Prometheus metrics, scrape configuration, recording rules, service discovery, relabeling, histogram_quantile calculations, or Alertmanager routing. Do NOT use for Datadog/New Relic/Splunk proprietary monitoring, log aggregation (use ELK/Loki), distributed tracing (use Jaeger/Tempo), or general Grafana dashboard design without Prometheus.
Prometheus uses a pull-based scrape model — the server periodically scrapes HTTP /metrics endpoints.
Core components: Prometheus Server (scrape, rule evaluation, TSDB storage), Alertmanager (dedup, group, route, silence alerts), Pushgateway (short-lived batch jobs only), Exporters (third-party metric translation), Client Libraries (application instrumentation).
Federation — higher-level Prometheus scrapes /federate from lower-level instances:
- job_name: 'federate'
honor_labels: true
metrics_path: '/federate'
params:
'match[]': ['{job="app"}']
static_configs:
- targets: ['prometheus-dc1:9090', 'prometheus-dc2:9090']
使用 Arthas 的 watch/trace 获取 EagleEye traceId / 获取请求的 traceId