aboutsummaryrefslogtreecommitdiff
path: root/defaults/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'defaults/main.yml')
-rw-r--r--defaults/main.yml58
1 files changed, 47 insertions, 11 deletions
diff --git a/defaults/main.yml b/defaults/main.yml
index afe2627..7d67f8e 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -1,18 +1,15 @@
---
-# Use this to override the template for more complicated uses
-prometheus_template_source: prometheus/prometheus.yml
-
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.15.1"
+prometheus_version: "2.22.1"
# Should resolve to "linux"
prometheus_os: "{{ansible_facts['system']|lower}}"
-prometheus_checksum: f8d2b9e8f9551a3dd6f476a43ea9f699d18d2cc6558baf0eebe0143d8f9c1d5a
+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"
@@ -26,10 +23,49 @@ prometheus_opts: |
--web.enable-admin-api
-# The default template makes it easy to scrape Netdata from internal hosts
-prometheus_netdata_hosts:
- - localhost:19999
+# 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)}}'
-# Only inserted into the template if defined
-# prometheus_netdata_tls_hosts:
-# - example.com:19443
+# 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