{"id":24072,"date":"2023-06-19T11:04:00","date_gmt":"2023-06-19T09:04:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=24072"},"modified":"2023-06-22T11:30:19","modified_gmt":"2023-06-22T09:30:19","slug":"prometheus-and-the-alertmanager","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/","title":{"rendered":"Prometheus and the AlertManager"},"content":{"rendered":"\n<p>In any monitoring tool, the question of alerting arises. Prometheus has a component dedicated to this function called the &#8220;Alertmanager&#8221;. One of the strengths of Alertmanager is its ability to evaluate and group alerts, thus avoiding false positives and waves of notifications.<\/p>\n\n\n\n<p>This is made possible by four functions of Alertmanager, which are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Routing<\/strong>&nbsp;is the ability to send alerts to various receivers, including Slack, Pagerduty, and email. It is the core feature of Alertmanager.<br><\/li>\n\n\n\n<li><strong>Inhibition<\/strong>&nbsp;is the process of&nbsp;<strong>muting downstream alerts&nbsp;<\/strong>depending on their label set. <br><\/li>\n\n\n\n<li><strong>Silencing<\/strong>&nbsp;allows you to temporarily snooze an alert if you expect it to trigger for a scheduled procedure, such as database maintenance, or if you\u2019ve already acknowledged the alert during an incident and want to keep it from renotifying while you remediate.<br><\/li>\n\n\n\n<li><strong>Throttling<\/strong>&nbsp;solves a similar pain point but in a slightly different fashion. Throttles allow the user to tailor the renotification settings with three primary parameters:<br><code>group_wait<br>group_interval<br>repeat_interval<\/code><br><\/li>\n\n\n\n<li><strong>Grouping<\/strong>&nbsp;in Alertmanager allows multiple alerts sharing a similar label set to be sent simultaneously.<\/li>\n<\/ul>\n\n\n\n<p>After this brief introduction to an alertmanager, I suggest looking at how to install and configure it with Prometheus.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Prometheus Alertmanager<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install Alertmanager<\/h3>\n\n\n\n<p>As part of this blog, we will perform the installation on a Debian distribution with 2 CPUs and 8GB of RAM (Ubuntu 22.04 &#8211; Jammy Jellyfish), which includes a recent version of Prometheus (version 2.44.0) and Node_exporter (version 1.6.0).<\/p>\n\n\n\n<p>Let&#8217;s start by creating a user and  a group for the Alertmanager:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo useradd -M -r -s \/bin\/false alertmanager\n<\/pre><\/div>\n\n\n<p>Next, we will download the binaries for the Alertmanager. To do this, I invite you to choose your version from the <a href=\"https:\/\/prometheus.io\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">official website&#8217;s download <\/a>page. <br>In our case, we will go with version 0.25.0<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nam_version=0.25.0\n\nwget https:\/\/github.com\/prometheus\/alertmanager\/releases\/download\/v$am_version\/alertmanager-$am_version.linux-amd64.tar.gz\n<\/pre><\/div>\n\n\n<p>Extract the file: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntar -xvf  .\/alertmanager-$am_version.linux-amd64.tar.gz\n<\/pre><\/div>\n\n\n<p>Copy the Alertmanager binary file to\u00a0<code>\/usr\/local\/bin\/<\/code>: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo cp alertmanager-$am_version.linux-amd64\/alertmanager \/usr\/local\/bin\/\n<\/pre><\/div>\n\n\n<p>Set the ownership: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo chown alertmanager:alertmanager \/usr\/local\/bin\/alertmanager\n<\/pre><\/div>\n\n\n<p>Make the directory that will contain the configuration files: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo mkdir -p \/etc\/alertmanager\n<\/pre><\/div>\n\n\n<p>Move the default configuration file to the new directory: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo cp alertmanager-$am_version.linux-amd64\/alertmanager.yml \/etc\/alertmanager\n<\/pre><\/div>\n\n\n<p>Set the ownership: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo chown -R alertmanager:alertmanager \/etc\/alertmanager\n<\/pre><\/div>\n\n\n<p>Create a directory to serve as local storage for Alertmanager to use: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo mkdir -p \/var\/lib\/alertmanager\n<\/pre><\/div>\n\n\n<p>Set the ownership: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo chown alertmanager:alertmanager \/var\/lib\/alertmanager\n<\/pre><\/div>\n\n\n<p>Create a&nbsp;<code>systemd<\/code>&nbsp;unit file: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo vi \/etc\/systemd\/system\/alertmanager.service\n<\/pre><\/div>\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex\">\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex\">\n<p>Add the following to the file to download and install the Alertmanager binaries: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[Unit]\nDescription=Prometheus\nAlertmanager Wants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=alertmanager\nGroup=alertmanager\nType=simple\nExecStart=\/usr\/local\/bin\/alertmanager \\\n  --config.file \/etc\/alertmanager\/alertmanager.yml \\\n  --storage.path \/var\/lib\/alertmanager\/\n\n[Install]\nWantedBy=multi-user.target<\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>Enable the&nbsp;<code>alertmanager<\/code>&nbsp;service so it starts automatically on boot: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl enable alertmanager\n<\/pre><\/div>\n\n\n<p>Start the&nbsp;<code>alertmanager<\/code>&nbsp;service: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl start alertmanager\n<\/pre><\/div>\n\n\n<p>Verify the service is running: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo systemctl status alertmanager\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-code\"><code>\u25cf alertmanager.service - Prometheus\n     Loaded: loaded (\/etc\/systemd\/system\/alertmanager.service; enabled; vendor preset: enabled)\n     Active: active (running) since Tue 2023-06-06 04:04:48 UTC; 57s ago\n   Main PID: 2108 (alertmanager)\n      Tasks: 8 (limit: 4632)\n     Memory: 13.1M\n        CPU: 229ms\n     CGroup: \/system.slice\/alertmanager.service\n             \u2514\u25002108 \/usr\/local\/bin\/alertmanager --config.file \/etc\/alertmanager\/alertmanager.yml --storage.path \/var\/lib\/alertmanager\/\n\nJun 06 04:04:48 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:48.871Z caller=main.go:240 level=info msg=\"Starting Alertmanager\" version=\"(version=0.25.0, branch=HEAD, revision=258fab7cdd551f2cf251ed0348f0ad7289aee789)\"\nJun 06 04:04:48 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:48.871Z caller=main.go:241 level=info build_context=\"(go=go1.19.4, user=root@abe866dd5717, date=20221222-14:51:36)\"\nJun 06 04:04:48 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:48.876Z caller=cluster.go:185 level=info component=cluster msg=\"setting advertise address explicitly\" addr=172.31.118.31 port=9094\nJun 06 04:04:48 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:48.884Z caller=cluster.go:681 level=info component=cluster msg=\"Waiting for gossip to settle...\" interval=2s\nJun 06 04:04:48 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:48.980Z caller=coordinator.go:113 level=info component=configuration msg=\"Loading configuration file\" file=\/etc\/alertmanager\/alertmanager.yml\nJun 06 04:04:48 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:48.981Z caller=coordinator.go:126 level=info component=configuration msg=\"Completed loading of configuration file\" file=\/etc\/alertmanager\/alertmanager.yml\nJun 06 04:04:48 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:48.988Z caller=tls_config.go:232 level=info msg=\"Listening on\" address=&#091;::]:9093\nJun 06 04:04:48 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:48.988Z caller=tls_config.go:235 level=info msg=\"TLS is disabled.\" http2=false address=&#091;::]:9093\nJun 06 04:04:50 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:50.885Z caller=cluster.go:706 level=info component=cluster msg=\"gossip not settled\" polls=0 before=0 now=1 elapsed=2.000988159s\nJun 06 04:04:58 dbi-alertmanager01 alertmanager&#091;2108]: ts=2023-06-20T04:04:58.888Z caller=cluster.go:698 level=info component=cluster msg=\"gossip settled; proceeding\" elapsed=10.004121638s<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Verify you can reach it: <code>curl http:\/\/localhost:9093<\/code><\/p>\n\n\n\n<p>You can also access Alertmanager in a web browser at&nbsp;<code>http:\/\/&lt;ALERTMANAGER_SERVER_IP&gt;:9093<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"364\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-1024x364.png\" alt=\"\" class=\"wp-image-26104\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-1024x364.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-300x107.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-768x273.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32.png 1153w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You can test the Alertmanager by quickly creating a silence, even though the application is not yet connected to Prometheus. The creation of silence can be done through the graphical interface, which is quite intuitive.<\/p>\n\n\n\n<p>Click on the &#8220;Silences&#8221; tab, and click on the button &#8220;New Silence&#8221;<\/p>\n\n\n\n<p>From the &#8220;New Silence&#8221; view, specify the duration for the silence, which is the period during which the alert will be muted and set the &#8220;Matchers&#8221; for the alerts affected by the silence.<br>Optionally, add a comment to provide a description or reason for the silence.<br>Click on the &#8220;Create&#8221; button to create the silence.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"729\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-38-1024x729.png\" alt=\"\" class=\"wp-image-26195\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-38-1024x729.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-38-300x213.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-38-768x547.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-38.png 1127w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>A summary will be displayed with the ID of the silence.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"542\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-39.png\" alt=\"\" class=\"wp-image-26196\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-39.png 570w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-39-300x285.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/figure>\n\n\n\n<p>For those interested in automating silence tasks, it is also possible to generate them using the REST API.<\/p>\n\n\n\n<p>As a bonus, here&#8217;s an example of how to create silence using the REST API:<br><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl -X POST http:\/\/localhost:9093\/api\/v2\/silences -H &quot;Content-Type: application\/json&quot; -d &#039;{\n  &quot;matchers&quot;: &#x5B;\n    {\n      &quot;name&quot;: &quot;ENV&quot;,\n      &quot;value&quot;: &quot;Test&quot;,\n      &quot;isRegex&quot;: false\n    }\n  ],\n  &quot;startsAt&quot;: &quot;2023-06-23T08:00:00.533330795Z&quot;,\n  &quot;endsAt&quot;: &quot;2023-06-25T23:11:44.603Z&quot;,\n  &quot;createdBy&quot;: &quot;Nabil&quot;,\n  &quot;comment&quot;: &quot;dbi blog - Silent with Rest API&quot;,\n  &quot;status&quot;: {\n    &quot;state&quot;: &quot;active&quot;\n  }\n}&#039;\n<\/pre><\/div>\n\n\n<p>Make sure to replace <code>http:\/\/localhost:909<\/code>3 with the correct URL for your AlertManager instance.<br>Modify the values in the JSON payload to match your requirements, and execute the command to create the silence via the REST API.<\/p>\n\n\n\n<p>The command should return the silence ID that you have created.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"silenceID\":\"bf9ee8d5-3114-4437-80a1-e9ae5d2c5e66\"}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"559\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-41.png\" alt=\"\" class=\"wp-image-26201\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-41.png 600w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-41-300x280.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p><em>I will cover the REST API part in more detail in another blog.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install\u00a0<code>amtool<\/code><\/h3>\n\n\n\n<p>The &#8220;amtool&#8221; is a command-line tool that comes bundled with Alertmanager. <br>It provides a set of utilities to interact with Alertmanager and perform various administrative tasks like querying alerts, managing silences, testing notification templates, validating configuration and performing health checks aso&#8230;<\/p>\n\n\n\n<p>Here&#8217;s how to install the&nbsp;<code>amtool<\/code>&nbsp;binary:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo cp alertmanager-$am_version.linux-amd64\/amtool \/usr\/local\/bin\/\n<\/pre><\/div>\n\n\n<p>Make the directory that will contain the configuration file: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo mkdir -p \/etc\/amtool\n<\/pre><\/div>\n\n\n<p>Create a config file for&nbsp;<code>amtool<\/code>: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo vi \/etc\/amtool\/config.yml\n<\/pre><\/div>\n\n\n<p>Enter the following content in the config file: <\/p>\n\n\n\n<p><code>alertmanager.url: http:\/\/localhost:9093<\/code><\/p>\n\n\n\n<p>Verify&nbsp;<code>amtool<\/code>&nbsp;is working by pulling the current Alertmanager configuration: <code>amtool config show<\/code> <\/p>\n\n\n\n<p>We should see the default configuration.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"691\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-33.png\" alt=\"\" class=\"wp-image-26105\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-33.png 665w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-33-289x300.png 289w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Prometheus to Use Alertmanager<\/h3>\n\n\n\n<p>We are now reaching the final step, connecting our Alertmanager with our Prometheus application.<br>Open the Prometheus config file: <code>sudo vi \/etc\/prometheus\/prometheus.yml<\/code><\/p>\n\n\n\n<p>Under&nbsp;<code>alerting<\/code>, add your Alertmanager as a target: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">alerting: alertmanagers:<br>static_configs:<br>targets: [\"localhost:9093\"]<\/pre>\n\n\n\n<p>Restart Prometheus to reload the configuration: <code>sudo systemctl restart prometheus<\/code><\/p>\n\n\n\n<p>Access the Prometheus Expression Browser in a web browser at\u00a0<code>http:\/\/&lt;PROMETHEUS_SERVER_IP&gt;:9090\/graph<\/code>.<\/p>\n\n\n\n<p>Enter the following in the query box: <code>prometheus_notifications_alertmanagers_discovered<\/code>,  and ensure the current value is\u00a0<code>1<\/code>.<\/p>\n\n\n\n<p><code>prometheus_notifications_alertmanagers_discovered<\/code> is a metric in Prometheus that provides information about the number of Alertmanager instances discovered by Prometheus for sending notifications. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"235\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-34-1024x235.png\" alt=\"\" class=\"wp-image-26106\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-34-1024x235.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-34-300x69.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-34-768x176.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-34-1536x352.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-34.png 1705w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And there you have it. That&#8217;s about everything you need to know to install and configure an Alertmanager.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In any monitoring tool, the question of alerting arises. Prometheus has a component dedicated to this function called the &#8220;Alertmanager&#8221;. One of the strengths of Alertmanager is its ability to evaluate and group alerts, thus avoiding false positives and waves of notifications. This is made possible by four functions of Alertmanager, which are: After this [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1320],"tags":[143,2234],"type_dbi":[],"class_list":["post-24072","post","type-post","status-publish","format-standard","hentry","category-devops","tag-monitoring","tag-prometheus"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Prometheus and the AlertManager - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Prometheus and the AlertManager\" \/>\n<meta property=\"og:description\" content=\"In any monitoring tool, the question of alerting arises. Prometheus has a component dedicated to this function called the &#8220;Alertmanager&#8221;. One of the strengths of Alertmanager is its ability to evaluate and group alerts, thus avoiding false positives and waves of notifications. This is made possible by four functions of Alertmanager, which are: After this [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-19T09:04:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-22T09:30:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-1024x364.png\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\"},\"headline\":\"Prometheus and the AlertManager\",\"datePublished\":\"2023-06-19T09:04:00+00:00\",\"dateModified\":\"2023-06-22T09:30:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/\"},\"wordCount\":790,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/06\\\/image-32-1024x364.png\",\"keywords\":[\"Monitoring\",\"Prometheus\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/\",\"name\":\"Prometheus and the AlertManager - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/06\\\/image-32-1024x364.png\",\"datePublished\":\"2023-06-19T09:04:00+00:00\",\"dateModified\":\"2023-06-22T09:30:19+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/06\\\/image-32-1024x364.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/06\\\/image-32-1024x364.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/prometheus-and-the-alertmanager\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Prometheus and the AlertManager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/middleware-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Prometheus and the AlertManager - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/","og_locale":"en_US","og_type":"article","og_title":"Prometheus and the AlertManager","og_description":"In any monitoring tool, the question of alerting arises. Prometheus has a component dedicated to this function called the &#8220;Alertmanager&#8221;. One of the strengths of Alertmanager is its ability to evaluate and group alerts, thus avoiding false positives and waves of notifications. This is made possible by four functions of Alertmanager, which are: After this [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/","og_site_name":"dbi Blog","article_published_time":"2023-06-19T09:04:00+00:00","article_modified_time":"2023-06-22T09:30:19+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-1024x364.png","type":"","width":"","height":""}],"author":"Middleware Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"headline":"Prometheus and the AlertManager","datePublished":"2023-06-19T09:04:00+00:00","dateModified":"2023-06-22T09:30:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/"},"wordCount":790,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-1024x364.png","keywords":["Monitoring","Prometheus"],"articleSection":["DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/","url":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/","name":"Prometheus and the AlertManager - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-1024x364.png","datePublished":"2023-06-19T09:04:00+00:00","dateModified":"2023-06-22T09:30:19+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-1024x364.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/06\/image-32-1024x364.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/prometheus-and-the-alertmanager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Prometheus and the AlertManager"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/24072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=24072"}],"version-history":[{"count":22,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/24072\/revisions"}],"predecessor-version":[{"id":26208,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/24072\/revisions\/26208"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=24072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=24072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=24072"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=24072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}