Thanks to the Prometheus Alertmanager webhook functionality practically any receiver can be configured to distribute alerts. This blog post describes how to deploy alertmanager-signal-receiver using Nomad. The job definition use Consul Connect for the integrations between alertmanager and the receiver.

This blog post assumes the following is installed and configured.

  • A Consul cluster.
  • A Nomad cluster.
  • Consul Connect is configured for both Consul and Nomad.
  • A Signal user is registered and configured by following the steps from the receivers Setup

Registration of the Signal user creates a JSON file which contains all secrets and configuration. This file is needed by the nomad job deployment. We deploy it by passing it using the signal_credential_content variable. The contents of the variable must be in base64 format.

cat ./data/data/+{{PHONENUMBER}} | base64

Start by creating the job file for the alertmanager receiver using the gist below.

Create a variable file containing the Signal settings and Nomad specific environment settings. The job file contains proxy variables which can be removed if no proxy server is required. This nomad job wil start a single task using the alertmanager-signal-receiver docker image.

Start the deployment using the following command.

nomad run alertmanager-signal-receiver.nomad

Test if the receiver is functional using the test message from the Setup documentation. Use the Consul disco URL for the URL.

Next up is the alertmanager deployment. This job definition contains the alertmanager configuration as template. Critical alerts will be send to Signal.

Start the deployment using the following command.

nomad run alertmanager.nomad

After the deployment is succesfull the alertmanager should be reachable on its consul port and service.

References