blob: 7d67f8e96817c7b06249e4f6761dd72030a0c530 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
---
prometheus_ui_listen: ':9090'
prometheus_home_dir: /var/lib/prometheus
prometheus_data_dir: '{{prometheus_home_dir}}/data'
prometheus_retention_time: "730d"
prometheus_log: '{{prometheus_home_dir}}/log'
prometheus_user: prometheus
prometheus_version: "2.22.1"
# Should resolve to "linux"
prometheus_os: "{{ansible_facts['system']|lower}}"
prometheus_checksum: 9001a9cb939e0a6d9f2b67d22506c620bc9457777272fced43274b032ba35f44
prometheus_architecture: amd64
prometheus_url: "https://github.com/prometheus/prometheus/releases/download/v{{prometheus_version}}/prometheus-{{prometheus_version}}.{{prometheus_os}}-{{prometheus_architecture}}.tar.gz"
# Newlines are automatically replaced with spaces
prometheus_opts: |
--config.file "{{prometheus_home_dir}}/conf/prometheus.yml"
--storage.tsdb.path "{{prometheus_data_dir}}"
--storage.tsdb.retention.time "{{prometheus_retention_time}}"
--web.listen-address "{{prometheus_ui_listen}}"
--web.enable-admin-api
# Filtered through 'to_nice_yaml'
# prometheus_config:
alertmanager: true
alertmanager_version: '0.21.0'
alertmanager_checksum_alg: sha256
alertmanager_checksum: 9ccd863937436fd6bfe650e22521a7f2e6a727540988eef515dde208f9aef232
alertmanager_url: 'https://github.com/prometheus/alertmanager/releases/download/v{{alertmanager_version}}/alertmanager-{{alertmanager_version}}.{{prometheus_os}}-{{prometheus_architecture}}.tar.gz'
alertmanager_port: '9093'
# Note that this is also UDP
alertmanager_cluster_port: '9094'
alertmanager_data_dir: '{{prometheus_home_dir}}/alertmanager-data'
alertmanager_log: '{{prometheus_home_dir}}/alertmanager.log'
# Newlines are automatically replaced with spaces
alertmanager_opts: |
--config.file "{{prometheus_home_dir}}/conf/alertmanager.yml"
--storage.path {{alertmanager_data_dir}}
--web.listen-address "0.0.0.0:{{alertmanager_port}}"
--cluster.listen-address "0.0.0.0:{{alertmanager_cluster_port}}"
# You can either specify them by hand, or pull them out of the inventory with
# a query()
# alertmanager_nodes:
# - prometheus0.example.com
# - prometheus1.example.com
# alertmanager_nodes: "{{query('inventory_hostnames', 'prometheus')}}"
# Append the configured port number, used in the config in a few spots
alertmanager_nodes_w_port: '{{alertmanager_nodes | forEachAppend(":" + alertmanager_cluster_port)}}'
# alertmanager_conf:
# global:
# # The API URL to use for Slack notifications.
# slack_api_url: '{{slack_webhook_uri}}'
#
# route:
# receiver: 'slack-notifications'
#
# receivers:
# - name: 'slack-notifications'
# slack_configs:
# - channel: '#{{slack_alerts_channel}}'
# send_resolved: true
|