How To Install prometheus-alertmanager on Ubuntu 20.04

In this tutorial we learn how to install prometheus-alertmanager on Ubuntu 20.04. prometheus-alertmanager is Handle and deliver alerts created by Prometheus Handle and deliver alerts created by Prometheus

Introduction

In this tutorial we learn how to install prometheus-alertmanager on Ubuntu 20.04.

What is prometheus-alertmanager

prometheus-alertmanager is:

The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.

Package: prometheus-alertmanager Architecture: amd64 Version: 0.15.3+ds-3 Built-Using: golang-1.10 (= 1.10.4-2ubuntu1), golang-github-alecthomas-units (= 0.0~git20151022.0.2efee85-4), golang-github-armon-go-metrics (= 0.0~git20180917.f0300d1-1), golang-github-beorn7-perks (= 0.0~git20160804.0.4c0e845-1), golang-github-cenkalti-backoff (= 2.0.0-1), golang-github-cespare-xxhash (= 1.1.0-1), golang-github-go-kit-kit (= 0.6.0-2), golang-github-go-logfmt-logfmt (= 0.3.0-1), golang-github-go-stack-stack (= 1.5.2-2), golang-github-hashicorp-errwrap (= 1.0.0-1), golang-github-hashicorp-go-immutable-radix (= 1.0.0-1), golang-github-hashicorp-go-msgpack (= 0.0~git20150518.0.fa3f638-6), golang-github-hashicorp-go-multierror (= 1.0.0-1), golang-github-hashicorp-go-sockaddr (= 0.0~git20170627.41949a1+ds-2), golang-github-hashicorp-golang-lru (= 0.5.0-1), golang-github-hashicorp-memberlist (= 0.1.0+git20180209.2288bf30-1), golang-github-julienschmidt-httprouter (= 1.1-5), golang-github-miekg-dns (= 1.0.4+ds-1), golang-github-mwitkow-go-conntrack (= 0.0~git20161129.cc309e4-3), golang-github-oklog-ulid (= 0.3.0+git20170117.66bb656-1), golang-github-pkg-errors (= 0.8.1-1), golang-github-prometheus-client-golang (= 0.9.2-0ubuntu2), golang-github-prometheus-client-model (= 0.0.2+git20171117.99fa1f4-1), golang-github-prometheus-common (= 0+git20181119.b36ad28-1), golang-github-satori-go.uuid (= 1.2.0-2), golang-go.crypto (= 1:0.0~git20181203.505ab14-1), golang-gogoprotobuf (= 1.0.0+git20180330.1ef32a8b-1), golang-golang-x-net-dev (= 1:0.0+git20181201.351d144+dfsg-2), golang-gopkg-alecthomas-kingpin.v2 (= 2.2.6-1), golang-goprotobuf (= 1.2.0-1), golang-procfs (= 0+git20181204.1dc9a6c-1), golang-protobuf-extensions (= 1.0.1-1), golang-yaml.v2 (= 2.2.2-1) Priority: extra Section: universe/net Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Go Packaging Team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 19757 Depends: daemon | systemd-sysv, libc6 (>= 2.4) Filename: pool/universe/p/prometheus-alertmanager/prometheus-alertmanager_0.15.3+ds-3_amd64.deb Size: 4713396 MD5sum: e8044d4b3fe79fcff9dbbdfe9bfd7085 SHA1: bf5513d12ac45efb6d54a80a42e3a5a86421fbaf SHA256: 3fd0a7ea36a931497be7a0f97d915bd56e3d3e91c945aea0efd5bc5fd33464e1 Homepage: https://prometheus.io/ Description-en: Handle and deliver alerts created by Prometheus The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.

There are three methods to install prometheus-alertmanager on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install prometheus-alertmanager Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install prometheus-alertmanager using apt-get by running the following command:

sudo apt-get -y install prometheus-alertmanager

Install prometheus-alertmanager Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install prometheus-alertmanager using apt by running the following command:

sudo apt -y install prometheus-alertmanager

Install prometheus-alertmanager Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install prometheus-alertmanager using aptitude by running the following command:

sudo aptitude -y install prometheus-alertmanager

How To Uninstall prometheus-alertmanager on Ubuntu 20.04

To uninstall only the prometheus-alertmanager package we can use the following command:

sudo apt-get remove prometheus-alertmanager

Uninstall prometheus-alertmanager And Its Dependencies

To uninstall prometheus-alertmanager and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove prometheus-alertmanager

Remove prometheus-alertmanager Configurations and Data

To remove prometheus-alertmanager configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge prometheus-alertmanager

Remove prometheus-alertmanager configuration, data, and all of its dependencies

We can use the following command to remove prometheus-alertmanager configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge prometheus-alertmanager

References

Summary

In this tutorial we learn how to install prometheus-alertmanager package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.