2019-04-24 18:18:44 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=yaml
|
|
|
|
---
|
|
|
|
prometheus:
|
2019-06-08 19:39:21 +02:00
|
|
|
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
|
2019-04-24 18:18:44 +02:00
|
|
|
config_file: /etc/prometheus/prometheus.yml
|
2019-06-08 19:39:21 +02:00
|
|
|
environ_file: /etc/default/prometheus.sh
|
2019-04-24 18:18:44 +02:00
|
|
|
service:
|
|
|
|
name: prometheus
|
2019-04-26 14:02:30 +02:00
|
|
|
args:
|
|
|
|
web.listen-address: 0.0.0.0:9090
|
2019-04-24 18:18:44 +02:00
|
|
|
|
|
|
|
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
|
2019-06-08 19:39:21 +02:00
|
|
|
environ:
|
|
|
|
- 'export PATH=${PATH}:/opt/prometheus-2.10.0.linux-amd64'
|
2019-04-24 18:18:44 +02:00
|
|
|
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"
|