No description
  • Python 63.6%
  • Jinja 36.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Adrien Waksberg e7f0825bd5
All checks were successful
/ lint (push) Successful in 10s
/ molecule (push) Successful in 1m3s
first version
2026-07-26 18:20:06 +02:00
.forgejo/workflows first version 2026-07-26 18:20:06 +02:00
defaults first version 2026-07-26 18:20:06 +02:00
handlers first version 2026-07-26 18:20:06 +02:00
meta first version 2026-07-26 18:20:06 +02:00
molecule/default first version 2026-07-26 18:20:06 +02:00
tasks first version 2026-07-26 18:20:06 +02:00
templates first version 2026-07-26 18:20:06 +02:00
.gitignore first version 2026-07-26 18:20:06 +02:00
.yamllint first version 2026-07-26 18:20:06 +02:00
CHANGELOG.md first version 2026-07-26 18:20:06 +02:00
LICENSE first version 2026-07-26 18:20:06 +02:00
README.md first version 2026-07-26 18:20:06 +02:00

Ansible role: Alertmanager

Version License Build

Install and configure Prometheus Alertmanager

Requirements

  • Ansible >= 2.21
  • Debian
    • Trixie

Role variables

Name Type Required Default Comment
alertmanager_version str no 0.33.1 alertmanager version to install
alertmanager_checksum str no sha256:93d802cba6a8d27239d747ce117df7648d326ab67394e32247540b030e9842ba checksum of alertmanager binary
alertmanager_gid int no 2001 gid of alertmanager group used to run service
alertmanager_uid int no 2001 uid of alertmanager user used to run service
alertmanager_data_dir str no /var/lib/alertmanager folder for alertmanager data
alertmanager_args list(str) no alertmanager launcher's arguments 
alertmanager_config dict yes alertmanager general config 

alertmanager_config

alertmanager general config, see documentation for all parameters

global:
  smtp_from: "alertmanager@localhost"
  smtp_smarthost: "localhost:25"
receivers:
  - name: "default-receiver"
    email_configs:
      - to: "support@localhost"
        send_resolved: true
route:
  receiver: "default-receiver"
  group_by: ["instance"]
  group_wait: "30s"
  group_interval: "5m"
  repeat_interval: "1h"
  routes: []

How to use

- hosts: monitoring
  roles:
    - nishiki.alertmanager
  vars:
    alertmanager_version: "0.33.1"
    alertmanager_checksum: "sha256:93d802cba6a8d27239d747ce117df7648d326ab67394e32247540b030e9842ba"
    alertmanager_download_url: >-
      https://github.com/prometheus/alertmanager/releases/download/v{{
      alertmanager_version }}/alertmanager-{{ alertmanager_version }}.linux-amd64.tar.gz
    alertmanager_gid: 2001
    alertmanager_uid: 2001
    alertmanager_data_dir: "/var/lib/alertmanager"
    alertmanager_config:
      global:
        smtp_from: "alertmanager@localhost"
        smtp_smarthost: "localhost:25"
      receivers:
        - name: "default-receiver"
          email_configs:
            - to: "support@localhost"
              send_resolved: true
      route:
        receiver: "default-receiver"
        group_by: ["instance"]
        group_wait: "30s"
        group_interval: "5m"
        repeat_interval: "1h"
        routes: []

Development

Test with molecule and docker

  • install docker
  • install python3 and python3-pip
  • install molecule and dependencies pip3 install molecule molecule-plugins ansible-lint pytest-testinfra yamllint
  • run molecule test

License

Copyright (c) 2026 Adrien Waksberg

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.