prometheus-formula/pillar.example

79 lines
2.5 KiB
Plaintext
Raw Normal View History

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
prometheus:
pkg:
name: prometheus
archive:
source: https://github.com/prometheus/prometheus/releases/download/v2.10.0/prometheus-2.10.0.linux-amd64.tar.gz
source_hash: f4233783826f18606b79e5cef0686e4a9c2030146a3c7ce134f0add09f5adcb7
enforce_toplevel: False
config_file: /etc/prometheus/prometheus.yml
environ_file: /etc/default/prometheus.sh
service:
name: prometheus
args:
web.listen-address: 0.0.0.0:9090
tofs:
# The files_switch key serves as a selector for alternative
# directories under the formula files directory. See TOFS pattern
# doc for more info.
# Note: Any value not evaluated by `config.get` will be used literally.
# This can be used to set custom paths, as many levels deep as required.
files_switch:
- any/path/can/be/used/here
- id
- osfinger
- os
- os_family
# All aspects of path/file resolution are customisable using the options below.
# This is unnecessary in most cases; there are sensible defaults.
# path_prefix: prometheus_alt
# dirs:
# files: files_alt
# default: default_alt
# source_files:
# prometheus-config-file-file-managed:
# - 'example_alt.tmpl'
# - 'example_alt.tmpl.jinja'
# Pillar-based config
environ:
- 'export PATH=${PATH}:/opt/prometheus-2.10.0.linux-amd64'
config:
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
2019-04-26 13:09:43 +02:00
exporters:
node:
args:
web.listen-address: ":9110"