github.com/polarismesh/polaris@v1.17.8/release/cluster/kubernetes/04-prometheus-config.yaml (about) 1 apiVersion: v1 2 kind: ConfigMap 3 metadata: 4 name: polaris-prometheus-config 5 namespace: polaris-system 6 data: 7 prometheus.yaml: |- 8 # my global config 9 global: 10 scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. 11 evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. 12 # scrape_timeout is set to the global default (10s). 13 14 # Alertmanager configuration 15 alerting: 16 alertmanagers: 17 - static_configs: 18 - targets: 19 - 127.0.0.1:9093 20 21 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. 22 rule_files: 23 # - "first_rules.yml" 24 # - "second_rules.yml" 25 - "/data/prom_rules/prom-alarm-rules.yml" 26 27 # A scrape configuration containing exactly one endpoint to scrape: 28 # Here it's Prometheus itself. 29 scrape_configs: 30 # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. 31 - job_name: "prometheus" 32 # metrics_path defaults to '/metrics' 33 # scheme defaults to 'http'. 34 static_configs: 35 - targets: ["localhost:9090"] 36 http_sd_configs: 37 - url: http://polaris:8090/prometheus/v1/clients 38 honor_labels: true 39 - job_name: "push-metrics" 40 static_configs: 41 - targets: ["localhost:9091"]