prometheus.prometheus.alertmanager role – Prometheus Alertmanager service

Note

This role is part of the prometheus.prometheus collection (version 0.23.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install prometheus.prometheus.

To use it in a playbook, specify: prometheus.prometheus.alertmanager.

Entry point main – Prometheus Alertmanager service

Synopsis

  • Deploy and manage Prometheus alertmanager service using ansible.

Parameters

Parameter

Comments

alertmanager_amtool_config_alertmanager_url

string

URL of the alertmanager

Default: "{{ alertmanager_web_external_url }}"

alertmanager_amtool_config_file

string

Template for amtool config

Default: "amtool.yml.j2"

alertmanager_amtool_config_output

string

Extended output, use "" for simple output.

Default: "extended"

alertmanager_binary_install_dir

string

Advanced

Directory to install binaries

Default: "/usr/local/bin"

alertmanager_binary_url

string

URL of the alertmanager binaries .tar.gz file

Default: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/alertmanager-{{ alertmanager_version }}.{{ ansible_system | lower }}-{{ _alertmanager_go_ansible_arch }}.tar.gz"

alertmanager_checksums_url

string

URL of the alertmanager checksums file

Default: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/sha256sums.txt"

alertmanager_cluster

dictionary

HA cluster network configuration. Disabled by default.

More information in alertmanager readme

Default: {"listen-address": ""}

alertmanager_config_dir

string

Path to directory with alertmanager configuration

Default: "/etc/alertmanager"

alertmanager_config_file

string

Variable used to provide custom alertmanager configuration file in form of ansible template

Default: "alertmanager.yml.j2"

alertmanager_config_flags_extra

dictionary

Additional configuration flags passed to prometheus binary at startup

alertmanager_db_dir

string

Path to directory with alertmanager database

Default: "/var/lib/alertmanager"

alertmanager_hipchat_api_url

string

Hipchat webhook url

alertmanager_hipchat_auth_token

string

Hipchat authentication token

alertmanager_http_config

dictionary

Http config for using custom webhooks

alertmanager_inhibit_rules

list / elements=string

List of inhibition rules. Same as in official docs

alertmanager_local_cache_path

string

Local path to stash the archive and its extraction

Default: "/tmp/alertmanager-{{ ansible_system | lower }}-{{ _alertmanager_go_ansible_arch }}/{{ alertmanager_version }}"

alertmanager_opsgenie_api_key

string

Opsgenie webhook key

alertmanager_opsgenie_api_url

string

Opsgenie webhook url

alertmanager_pagerduty_url

string

Pagerduty webhook url

alertmanager_receivers

list / elements=string

A list of notification receivers. Configuration same as in official docs

alertmanager_resolve_timeout

string

Time after which an alert is declared resolved

Default: "3m"

alertmanager_route

dictionary

Alert routing. More in official docs

alertmanager_slack_api_url

string

Slack webhook url

alertmanager_smtp

dictionary

SMTP (email) configuration

alertmanager_system_group

string

Advanced

System group for alertmanager

Default: "alertmanager"

alertmanager_system_user

string

Advanced

alertmanager system user

Default: "alertmanager"

alertmanager_template_files

list / elements=string

List of folders where ansible will look for template files which will be copied to "{{ alertmanager_config_dir }}/templates/".

Files must have *.tmpl extension

Default: ["alertmanager/templates/*.tmpl"]

alertmanager_time_intervals

list / elements=string

A list of time intervals. Configuration same as in official docs

alertmanager_version

string

Alertmanager package version. Also accepts `latest` as parameter.

Default: "0.27.0"

alertmanager_victorops_api_key

string

VictorOps webhook key

alertmanager_victorops_api_url

string

VictorOps webhook url

alertmanager_web_external_url

string

External address on which alertmanager is available. Useful when behind reverse proxy. Ex. example.org/alertmanager

Default: "http://localhost:9093/"

alertmanager_web_listen_address

string

Address on which alertmanager will be listening

Default: "0.0.0.0:9093"

alertmanager_wechat_corp_id

string

Enterprise WeChat corporation id

alertmanager_wechat_secret

string

Enterprise WeChat secret token

alertmanager_wechat_url

string

Enterprise WeChat webhook url

Authors

  • Prometheus Community