6
0
Fork 0
This repository has been archived on 2022-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
cdist-recycledcloud/type/__prometheus/files/prometheus.yml.sh

30 lines
941 B
Bash
Executable File

#!/bin/sh
cat << EOF
global:
scrape_interval: ${GLOBAL_SCRAPE_INTERVAL:?} # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: ${GLOBAL_EVALUATION_INTERVAL:?} # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels: $EXTERNAL_LABELS
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets: [ $ALERTMANAGER_ADDR ]
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files: [ $RULE_FILES ]
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
EOF
for config in $SCRAPE_JOB_CONFIGS; do
sed 's/^/ /' < "$config"
done