Nomploy Nomad Packs

← All packs

alertmanager v0.1.0

Observability

Prometheus Alertmanager — handles alerts sent by Prometheus: deduplicates, groups, silences, and routes them to receivers (email, Slack, webhooks, ntfy/gotify, …). Deployed as a host-networked Nomad service with a rendered starter config on a persistent volume. Pairs with the monitoring pack.

nomad-pack run alertmanager --registry nomploy
1 task http 9093 1 volume image prom/alertmanager:latest
Variables 9
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run alertmanager -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "alertmanager"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Alertmanager container image. Pin a tag in production.
image = "prom/alertmanager:latest"

# Host port for the Alertmanager UI / API. Point Prometheus's alerting config at this.
port = 9093

# Full alertmanager.yml contents. The default is a minimal valid config that drops alerts to a no-op receiver — replace it with your real routes/receivers (email, Slack, webhook to the ntfy/gotify packs, …).
config = <<-EOT
    route:
      receiver: default
      group_by: ['alertname']
    receivers:
      - name: default
  EOT

# Docker named volume for /alertmanager (silences + notification log). A fresh volume inherits the image's dir ownership (uid 65534).
data_volume = "alertmanager_data"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 200
    memory = 128
  }
NameTypeDefaultDescription
job_name string
"alertmanager"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"prom/alertmanager:latest"
The Alertmanager container image. Pin a tag in production.
port number
9093
Host port for the Alertmanager UI / API. Point Prometheus's alerting config at this.
config string
<<-EOT
    route:
      receiver: default
      group_by: ['alertname']
    receivers:
      - name: default
  EOT
Full alertmanager.yml contents. The default is a minimal valid config that drops alerts to a no-op receiver — replace it with your real routes/receivers (email, Slack, webhook to the ntfy/gotify packs, …).
data_volume string
"alertmanager_data"
Docker named volume for /alertmanager (silences + notification log). A fresh volume inherits the image's dir ownership (uid 65534).
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 200
    memory = 128
  }
The task resources.
Readme

alertmanager

Prometheus Alertmanager — receives alerts from Prometheus and deduplicates, groups, silences, and routes them to receivers (email, Slack, PagerDuty, or a webhook to the ntfy/gotify packs). Pairs with the monitoring pack. Host-networked Nomad service with a persistent volume.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run alertmanager --registry nomploy

Then point Prometheus at it — in the monitoring pack's config:

alerting:
  alertmanagers:
    - static_configs:
        - targets: ['127.0.0.1:9093']

Open http://<node-ip>:9093 for the UI.

Key variables

Variable Default Notes
image prom/alertmanager:latest Pin a tag in production.
port 9093 UI / API.
config minimal no-op Replace it with your real alertmanager.yml (routes + receivers).
data_volume alertmanager_data Silences + notification log.
constraints [] Placement.
resources cpu 200 / mem 128 Lightweight.

Notes