diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2021-10-17 20:45:38 -0400 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2021-10-17 20:45:38 -0400 |
| commit | a83c53c2997327c9ee7ddf4856c6360ccf541a0a (patch) | |
| tree | 258668929292530a5ef90b415e92d2f6ede3147d /defaults/main.yml | |
| parent | 01cda8792213340fdedcd364dedb2a73564d27f2 (diff) | |
| download | prometheus-master.tar.gz prometheus-master.tar.xz | |
TLS Support for everything if you configure the vars properly.
Blackbox exporter.
Alertmanager discord for sending alerts there via webhooks.
Runit services for all of them.
Diffstat (limited to 'defaults/main.yml')
| -rw-r--r-- | defaults/main.yml | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/defaults/main.yml b/defaults/main.yml index 7d67f8e..baef38c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,10 +6,10 @@ 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" +prometheus_version: "2.30.3" # Should resolve to "linux" prometheus_os: "{{ansible_facts['system']|lower}}" -prometheus_checksum: 9001a9cb939e0a6d9f2b67d22506c620bc9457777272fced43274b032ba35f44 +prometheus_checksum: 1ccd386d05f73a98b69aa5e0ed31fffac95cd9dadf7df1540daf2f182c5287e2 prometheus_architecture: amd64 prometheus_url: "https://github.com/prometheus/prometheus/releases/download/v{{prometheus_version}}/prometheus-{{prometheus_version}}.{{prometheus_os}}-{{prometheus_architecture}}.tar.gz" @@ -22,15 +22,28 @@ prometheus_opts: | --web.listen-address "{{prometheus_ui_listen}}" --web.enable-admin-api +# Be sure to set `--web.config.file={{prometheus_home_dir}}/conf/web_conf.yml` +# if you enable this +# prometheus_web_config: +# tls_server_config: +# cert_file: '{{prometheus_home_dir}}/conf/crt' +# key_file: '{{prometheus_home_dir}}/conf/key' +# client_ca_file: '{{prometheus_home_dir}}/conf/ca.crt' +# client_auth_type: RequireAndVerifyClientCert -# Filtered through 'to_nice_yaml' +# Anything defined in this map is written out verbatim to the conf/ dir +# prometheus_other_config: +# filename: | +# Some content in here + +# Filtered through 'to_nice_json' # prometheus_config: alertmanager: true -alertmanager_version: '0.21.0' +alertmanager_version: '0.23.0' alertmanager_checksum_alg: sha256 -alertmanager_checksum: 9ccd863937436fd6bfe650e22521a7f2e6a727540988eef515dde208f9aef232 +alertmanager_checksum: 77793c4d9bb92be98f7525f8bc50cb8adb8c5de2e944d5500e90ab13918771fc 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 @@ -39,6 +52,7 @@ alertmanager_data_dir: '{{prometheus_home_dir}}/alertmanager-data' alertmanager_log: '{{prometheus_home_dir}}/alertmanager.log' # Newlines are automatically replaced with spaces +# you can reuse the same --web.config.file from prometheus here alertmanager_opts: | --config.file "{{prometheus_home_dir}}/conf/alertmanager.yml" --storage.path {{alertmanager_data_dir}} @@ -53,9 +67,6 @@ alertmanager_opts: | # - 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. @@ -69,3 +80,31 @@ alertmanager_nodes_w_port: '{{alertmanager_nodes | forEachAppend(":" + alertmana # slack_configs: # - channel: '#{{slack_alerts_channel}}' # send_resolved: true + + +blackbox_exporter: false +blackbox_exporter_version: 0.19.0 +blackbox_exporter_checksum: af2ae1394c4f9b46962ac1510e1dacac78115c11e625991fb6c54825d2240896 +blackbox_exporter_url: 'https://github.com/prometheus/blackbox_exporter/releases/download/v{{blackbox_exporter_version}}/blackbox_exporter-{{blackbox_exporter_version}}.{{prometheus_os}}-{{prometheus_architecture}}.tar.gz' +blackbox_exporter_bind: 127.0.0.1:9115 +blackbox_exporter_log: '{{prometheus_home_dir}}/blackbox_exporter.log' +blackbox_exporter_opts: | + --web.listen-address="{{blackbox_exporter_bind}}" + --config.file={{prometheus_home_dir}}/conf/blackbox_exporter.yml +# Check out: +# https://github.com/prometheus/blackbox_exporter/blob/master/example.yml +blackbox_exporter_conf: + + +alertmanager_discord: false +alertmanager_discord_url: 'https://git.riedstra.dev/pub/alertmanager-discord/plain/build/alertmanager-discord-{{prometheus_os}}-{{prometheus_architecture}}.gz?h=binaries' +# Linux amd64 +alertmanager_discord_checksum: 3cd33d08824f140d93d7cdbfcb054be730b542d2afd33e9b47723b8270809325 +blackbox_exporter_checksum_alg: sha256 +alertmanager_discord_port: '9098' +alertmanager_discord_webhook_url: "<changeme>" +alertmanager_discord_opts: | + -listen.address "127.0.0.1:{{alertmanager_discord_port}}" + -webhook.url "{{alertmanager_discord_webhook_url}}" + +alertmanager_discord_log: '{{prometheus_home_dir}}/alertmanager_discord.log' |
