instruction: How do you set up a complete Prometheus monitoring stack?
output: Configuration | Prometheus Prometheus Docs Download Community Support &amp; Training Blog Ctrl + K Show nav Introduction Overview First steps Comparison to alternatives FAQ Roadmap Design documents Media Glossary Long-term support Concepts Data model Metric types Jobs and instances Prometheus Server Getting started Installation Configuration Configuration Recording rules Alerting rules Template examples Template reference Unit testing for rules HTTPS and authentication Querying Basics Operators Functions Examples HTTP API Remote Read API Storage Federation HTTP SD Management API Command Line prometheus promtool Migration API stability Feature flags Visualization Expression browser Grafana Perses Console templates Instrumenting Client libraries Writing client libraries Pushing metrics Exporters and integrations Writing exporters Exposition formats UTF-8 escaping schemes Content negotiation Operating Security Integrations Alertmanager Alerting overview Alertmanager Configuration Clients Notification template reference Notification template examples Management API HTTPS and authentication Best practices Metric and label naming Consoles and dashboards Instrumentation Histograms and summaries Alerting Recording rules When to use the Pushgateway Remote write tuning Guides Basic auth Monitoring Docker container metrics using cAdvisor Use file-based service discovery to discover scrape targets Instrumenting a Go application Understanding and using the multi-target exporter pattern Monitoring Linux host metrics with the Node Exporter OpenTelemetry UTF-8 in Prometheus Docker Swarm Query log TLS encryption Tutorials Getting started with Prometheus Understanding metric types Instrumenting HTTP server written in Go Visualizing metrics using Grafana Alerting based on metrics Specifications Native Histograms [EXPERIMENTAL] OpenMetrics 1.0 Remote Write 1.0 2.0 Configuration Alertmanager is configured via command-line flags and a configuration file. While the command-line flags configure immutable system parameters, the configuration file defines inhibition rules, notification routing and notification receivers. The visual editor can assist in building routing trees. To view all available command-line flags, run alertmanager -h . Alertmanager can reload its configuration at runtime. If the new configuration is not well-formed, the changes will not be applied and an error is logged. A configuration reload is triggered by sending a SIGHUP to the process or sending an HTTP POST request to the /-/reload endpoint. Limits Alertmanager supports a number of configurable limits via command-line flags. To limit the maximum number of silences, including expired ones, use the --silences.max-silences flag. You can limit the maximum size of individual silences with --silences.max-per-silence-bytes , where the unit is in bytes. Both limits are disabled by default. Configuration file introduction To specify which configuration file to load, use the --config.file flag. ./alertmanager --config.file=alertmanager.yml The file is written in the YAML format , defined by the scheme described below. Brackets indicate that a parameter is optional. For non-list parameters the value is set to the specified default. Generic placeholders are defined as follows: &lt;duration&gt; : a duration matching the regular expression ((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0) , e.g. 1d , 1h30m , 5m , 10s &lt;labelname&gt; : a string matching the regular expression [a-zA-Z_][a-zA-Z0-9_]* &lt;labelvalue&gt; : a string of unicode characters &lt;filepath&gt; : a valid path in the current working directory &lt;boolean&gt; : a boolean that can take the values true or false &lt;string&gt; : a regular string &lt;secret&gt; : a regular string that is a secret, such as a password &lt;tmpl_string&gt; : a string which is template-expanded before usage &lt;tmpl_secret&gt; : a string which is template-expanded before usage that is a secret &lt;int&gt; : an integer value &lt;regex&gt; : any valid RE2 regular expression (The regex is anchored on both ends. To un-anchor the regex, use .*&lt;regex&gt;.* .) The other placeholders are specified separately. A provided valid example file shows usage in context. File layout and global settings The global configuration specifies parameters that are valid in all other configuration contexts. They also serve as defaults for other configuration sections. The other top-level sections are documented below on this page. global : # The default SMTP From header field. [ smtp_from : &lt;tmpl_string&gt; ] # The default SMTP smarthost used for sending emails, including port number. # Port number usually is 25, or 587 for SMTP over TLS (sometimes referred to as STARTTLS). # Example: smtp.example.org:587 [ smtp_smarthost : &lt;string&gt; ] # The default hostname to identify to the SMTP server. [ smtp_hello : &lt;string&gt; | default = &quot;localhost&quot; ] # SMTP Auth using CRAM-MD5, LOGIN and PLAIN. If empty, Alertmanager doesn&#x27;t authenticate to the SMTP server. [ smtp_auth_username : &lt;string&gt; ] # SMTP Auth using LOGIN and PLAIN. [ smtp_auth_password : &lt;secret&gt; ] # SMTP Auth using LOGIN and PLAIN. [ smtp_auth_password_file : &lt;string&gt; ] # SMTP Auth using PLAIN. [ smtp_auth_identity : &lt;string&gt; ] # SMTP Auth using CRAM-MD5. [ smtp_auth_secret : &lt;secret&gt; ] # The default SMTP TLS requirement. # Note that Go does not support unencrypted connections to remote SMTP endpoints. [ smtp_require_tls : &lt;bool&gt; | default = true ] # The default TLS configuration for SMTP receivers [ smtp_tls_config : &lt;tls_config&gt; ] # Default settings for the JIRA integration. [ jira_api_url : &lt;string&gt; ] # The API URL to use for Slack notifications. [ slack_api_url : &lt;secret&gt; ] [ slack_api_url_file : &lt;filepath&gt; ] [ victorops_api_key : &lt;secret&gt; ] [ victorops_api_key_file : &lt;filepath&gt; ] [ victorops_api_url : &lt;string&gt; | default = &quot;https://alert.victorops.com/integrations/generic/20131114/alert/&quot; ] [ pagerduty_url : &lt;string&gt; | default = &quot;https://events.pagerduty.com/v2/enqueue&quot; ] [ opsgenie_api_key : &lt;secret&gt; ] [ opsgenie_api_key_file : &lt;filepath&gt; ] [ opsgenie_api_url : &lt;string&gt; | default = &quot;https://api.opsgenie.com/&quot; ] [ rocketchat_api_url : &lt;string&gt; | default = &quot;https://open.rocket.chat/&quot; ] [ rocketchat_token : &lt;secret&gt; ] [ rocketchat_token_file : &lt;filepath&gt; ] [ rocketchat_token_id : &lt;secret&gt; ] [ rocketchat_token_id_file : &lt;filepath&gt; ] [ wechat_api_url : &lt;string&gt; | default = &quot;https://qyapi.weixin.qq.com/cgi-bin/&quot; ] [ wechat_api_secret : &lt;secret&gt; ] [ wechat_api_corp_id : &lt;string&gt; ] [ telegram_api_url : &lt;string&gt; | default = &quot;https://api.telegram.org&quot; ] [ webex_api_url : &lt;string&gt; | default = &quot;https://webexapis.com/v1/messages&quot; ] # The default HTTP client configuration [ http_config : &lt;http_config&gt; ] # ResolveTimeout is the default value used by alertmanager if the alert does # not include EndsAt, after this time passes it can declare the alert as resolved if it has not been updated. # This has no impact on alerts from Prometheus, as they always include EndsAt. [ resolve_timeout : &lt;duration&gt; | default = 5m ] # Files from which custom notification template definitions are read. # The last component may use a wildcard matcher, e.g. &#x27;templates/*.tmpl&#x27;. templates : [ - &lt;filepath&gt; ... ] # The root node of the routing tree. route : &lt;route&gt; # A list of notification receivers. receivers : - &lt;receiver&gt; ... # A list of inhibition rules. inhibit_rules : [ - &lt;inhibit_rule&gt; ... ] # DEPRECATED: use time_intervals below. # A list of mute time intervals for muting routes. mute_time_intervals : [ - &lt;mute_time_interval&gt; ... ] # A list of time intervals for muting/activating routes. time_intervals : [ - &lt;time_interval&gt; ... ] Route-related settings Routing-related settings allow configuring how alerts are routed, aggregated, throttled, and muted based on time. &lt;route&gt; A route block defines a node in a routing tree and its children. Its optional configuration parameters are inherited from its parent node if not set. Every alert enters the routing tree at the configured top-level route, which must match all alerts (i.e. not have any configured matchers). It then traverses the child nodes. If continue is set to false, it stops after the first matching child. If continue is true on a matching node, the alert will continue matching against subsequent siblings. If an alert does not match any children of a node (no matching child nodes, or none exist), the alert is handled based on the configuration parameters of the current node. See Alertmanager concepts for more information on grouping. [ receiver : &lt;string&gt; ] # The labels by which incoming alerts are grouped together. For example, # multiple alerts coming in for cluster=A and alertname=LatencyHigh would # be batched into a single group. # # To aggregate by all possible labels use the special value &#x27;...&#x27; as the sole label name, for example: # group_by: [&#x27;...&#x27;] # This effectively disables aggregation entirely, passing through all # alerts as-is. This is unlikely to be what you want, unless you have # a very low alert volume or your upstream notification system performs # its own grouping. [ group_by : &#x27;[&#x27; &lt;labelname&gt; , ... &#x27; ] &#x27; ] # Whether an alert should continue matching subsequent sibling nodes. [ continue: &lt;boolean&gt; | default = false ] # DEPRECATED: Use matchers below. # A set of equality matchers an alert has to fulfill to match the node. match: [ &lt;labelname&gt; : &lt;labelvalue&gt; , ... ] # DEPRECATED: Use matchers below. # A set of regex-matchers an alert has to fulfill to match the node. match_re: [ &lt;labelname&gt; : &lt;regex&gt; , ... ] # A list of matchers that an alert has to fulfill to match the node. matchers: [ - &lt;matcher&gt; ... ] # How long to initially wait to send a notification for a group # of alerts. Allows to wait for an inhibiting alert to arrive or collect # more initial alerts for the same group. (Usually ~0s to few minutes.) # If omitted, child routes inherit the group_wait of the parent route. [ group_wait: &lt;duration&gt; | default = 30s ] # How long to wait before sending a notification about new alerts that # are added to a group of alerts for which an initial notification has # already been sent. (Usually ~5m or more.) If omitted, child routes # inherit the group_interval of the parent route. [ group_interval: &lt;duration&gt; | default = 5m ] # How long to wait before sending a notification again if it has already # been sent successfully for an alert. (Usually ~3h or more). If omitted, # child routes inherit the repeat_interval of the parent route. # Note that this parameter is implicitly bound by Alertmanager&#x27;s # `--data.retention` configuration flag. Notifications will be resent after either # repeat_interval or the data retention period have passed, whichever # occurs first. `repeat_interval` should be a multiple of `group_interval`. [ repeat_interval : &lt;duration&gt; | default = 4h ] # Times when the route should be muted. These must match the name of a # time interval defined in the time_intervals section. # Additionally, the root node cannot have any mute times. # When a route is muted it will not send any notifications, but # otherwise acts normally (including ending the route-matching process # if the `continue` option is not set.) mute_time_intervals : [ - &lt;string&gt; ... ] # Times when the route should be active. These must match the name of a # time interval defined in the time_intervals section. An empty value # means that the route is always active. # Additionally, the root node cannot have any active times. # The route will send notifications only when active, but otherwise # acts normally (including ending the route-matching process # if the `continue` option is not set). active_time_intervals : [ - &lt;string&gt; ... ] # Zero or more child routes. routes : [ - &lt;route&gt; ... ] Example # The root route with all parameters, which are inherited by the child # routes if they are not overwritten. route : receiver : &#x27;default-receiver&#x27; group_wait : 30s group_interval : 5m repeat_interval : 4h group_by : [ cluster , alertname ] # All alerts that do not match the following child routes # will remain at the root node and be dispatched to &#x27;default-receiver&#x27;. routes : # All alerts with service=mysql or service=cassandra # are dispatched to the database pager. - receiver : &#x27;database-pager&#x27; group_wait : 10s matchers : - service=~&quot;mysql|cassandra&quot; # All alerts with the team=frontend label match this sub-route. # They are grouped by product and environment rather than cluster # and alertname. - receiver : &#x27;frontend-pager&#x27; group_by : [ product , environment ] matchers : - team=&quot;frontend&quot; # All alerts with the service=inhouse-service label match this sub-route. # the route will be muted during offhours and holidays time intervals. # even if it matches, it will continue to the next sub-route - receiver : &#x27;dev-pager&#x27; matchers : - service=&quot;inhouse-service&quot; mute_time_intervals : - offhours - holidays continue : true # All alerts with the service=inhouse-service label match this sub-route # the route will be active only during offhours and holidays time intervals. - receiver : &#x27;on-call-pager&#x27; matchers : - service=&quot;inhouse-service&quot; active_time_intervals : - offhours - holidays &lt;time_interval&gt; A time_interval specifies a named interval of time that may be referenced in the routing tree to mute/activate particular routes for particular times of the day. name : &lt;string&gt; time_intervals : [ - &lt;time_interval_spec&gt; ... ] &lt;time_interval_spec&gt; A time_interval_spec contains the actual definition for an interval of time. The syntax supports the following fields: - times : [ - &lt;time_range&gt; ... ] weekdays : [ - &lt;weekday_range&gt; ... ] days_of_month : [ - &lt;days_of_month_range&gt; ... ] months : [ - &lt;month_range&gt; ... ] years : [ - &lt;year_range&gt; ... ] location : &lt;string&gt; All fields are lists. Within each non-empty list, at least one element must be satisfied to match the field. If a field is left unspecified, any value will match the field. For an instant of time to match a complete time interval, all fields must match. Some fields support ranges and negative indices, and are detailed below. If a time zone is not specified, then the times are taken to be in UTC. time_range : Ranges inclusive of the starting time and exclusive of the end time to make it easy to represent times that start/end on hour boundaries. For example, start_time: &#x27;17:00&#x27; and end_time: &#x27;24:00&#x27; will begin at 17:00 and finish immediately before 24:00. They are specified like so: times : - start_time : HH:MM end_time : HH:MM weekday_range : A list of days of the week, where the week begins on Sunday and ends on Saturday. Days should be specified by name (e.g. &#x27;Sunday&#x27;). For convenience, ranges are also accepted of the form &lt;start_day&gt;:&lt;end_day&gt; and are inclusive on both ends. For example: [&#x27;monday:wednesday&#x27;,&#x27;saturday&#x27;, &#x27;sunday&#x27;] days_of_month_range : A list of numerical days in the month. Days begin at 1. Negative values are also accepted which begin at the end of the month, e.g. -1 during January would represent January 31. For example: [&#x27;1:5&#x27;, &#x27;-3:-1&#x27;] . Extending past the start or end of the month will cause it to be clamped. E.g. specifying [&#x27;1:31&#x27;] during February will clamp the actual end date to 28 or 29 depending on leap years. Inclusive on both ends. month_range : A list of calendar months identified by a case-insensitive name (e.g. &#x27;January&#x27;) or by number, where January = 1. Ranges are also accepted. For example, [&#x27;1:3&#x27;, &#x27;may:august&#x27;, &#x27;december&#x27;] . Inclusive on both ends. year_range : A numerical list of years. Ranges are accepted. For example, [&#x27;2020:2022&#x27;, &#x27;2030&#x27;] . Inclusive on both ends. location : A string that matches a location in the IANA time zone database. For example, &#x27;Australia/Sydney&#x27; . The location provides the time zone for the time interval. For example, a time interval with a location of &#x27;Australia/Sydney&#x27; that contained something like: times : - start_time : 09:00 end_time : 17:00 weekdays : [ &#x27;monday:friday&#x27; ] would include any time that fell between the hours of 9:00AM and 5:00PM, between Monday and Friday, using the local time in Sydney, Australia. You may also use &#x27;Local&#x27; as a location to use the local time of the machine where Alertmanager is running, or &#x27;UTC&#x27; for UTC time. If no timezone is provided, the time interval is taken to be in UTC time. Note: On Windows, only Local or UTC are supported unless you provide a custom time zone database using the ZONEINFO environment variable. Inhibition-related settings Inhibition allows muting a set of alerts based on the presence of another set of alerts. This allows establishing dependencies between systems or services such that only the most relevant of a set of interconnected alerts are sent out during an outage. See Alertmanager concepts for more information on inhibition. &lt;inhibit_rule&gt; An inhibition rule mutes an alert (target) matching a set of matchers when an alert (source) exists that matches another set of matchers. Both target and source alerts must have the same label values for the label names in the equal list. Semantically, a missing label and a label with an empty value are the same thing. Therefore, if all the label names listed in equal are missing from both the source and target alerts, the inhibition rule will apply. To prevent an alert from inhibiting itself, an alert that matches both the target and the source side of a rule cannot be inhibited by alerts for which the same is true (including itself). However, we recommend to choose target and source matchers in a way that alerts never match both sides. It is much easier to reason about and does not trigger this special case. # DEPRECATED: Use target_matchers below. # Matchers that have to be fulfilled in the alerts to be muted. target_match : [ &lt;labelname&gt; : &lt;labelvalue&gt; , ... ] # DEPRECATED: Use target_matchers below. target_match_re : [ &lt;labelname&gt; : &lt;regex&gt; , ... ] # A list of matchers that have to be fulfilled by the target # alerts to be muted. target_matchers : [ - &lt;matcher&gt; ... ] # DEPRECATED: Use source_matchers below. # Matchers for which one or more alerts have to exist for the # inhibition to take effect. source_match : [ &lt;labelname&gt; : &lt;labelvalue&gt; , ... ] # DEPRECATED: Use source_matchers below. source_match_re : [ &lt;labelname&gt; : &lt;regex&gt; , ... ] # A list of matchers for which one or more alerts have # to exist for the inhibition to take effect. source_matchers : [ - &lt;matcher&gt; ... ] # Labels that must have an equal value in the source and target # alert for the inhibition to take effect. [ equal : &#x27;[&#x27; &lt;labelname&gt; , ... &#x27; ] &#x27; ] Label matchers Label matchers match alerts to routes, silences, and inhibition rules. Important : Prometheus is adding support for UTF-8 in labels and metrics. In order to also support UTF-8 in the Alertmanager, Alertmanager versions 0.27 and later have a new parser for matchers that has a number of backwards incompatible changes. While most matchers will be forward-compatible, some will not. Alertmanager is operating a transition period where it supports both UTF-8 and classic matchers, and has provided a number of tools to help you prepare for the transition. If this is a new Alertmanager installation, we recommend enabling UTF-8 strict mode before creating an Alertmanager configuration file. You can find instructions on how to enable UTF-8 strict mode here . If this is an existing Alertmanager installation, we recommend running the Alertmanager in the default mode called fallback mode before enabling UTF-8 strict mode. In this mode, Alertmanager will log a warning if you need to make any changes to your configuration file before UTF-8 strict mode can be enabled. Alertmanager will make UTF-8 strict mode the default in the next two versions, so it&#x27;s important to transition as soon as possible. Irrespective of whether an Alertmanager installation is a new or existing installation, you can also use amtool to validate that an Alertmanager configuration file is compatible with UTF-8 strict mode before enabling it in Alertmanager server. You do not need a running Alertmanager server to do this. You can find instructions on how to validate an Alertmanager configuration file using amtool here . Alertmanager server operational modes During the transition period, Alertmanager supports three modes of operation. These are known as fallback mode, UTF-8 strict mode and classic mode. Fallback mode is the default mode. Operators of Alertmanager servers should transition to UTF-8 strict mode before the end of the transition period. Alertmanager will make UTF-8 strict mode the default in the next two versions, so it&#x27;s important to transition as soon as possible. Fallback mode Alertmanager runs in a special mode called fallback mode as its default mode. As operators, you should not experience any difference in how your routes, silences or inhibition rules work. In fallback mode, configurations are first parsed as UTF-8 matchers, and if incompatible with the UTF-8 parser, are then parsed as classic matchers. If your Alertmanager configuration contains matchers that are incompatible with the UTF-8 parser, Alertmanager will parse them as classic matchers and log a warning. This warning also includes a suggestion on how to change the matchers from classic matchers to UTF-8 matchers. For example: ts=2024-02-11T10:00:00Z caller=parse.go:176 level=warn msg=&quot;Alertmanager is moving to a new parser for labels and matchers, and this input is incompatible. Alertmanager has instead parsed the input using the classic matchers parser as a fallback. To make this input compatible with the UTF-8 matchers parser please make sure all regular expressions and values are double-quoted and backslashes are escaped. If you are still seeing this message please open an issue.&quot; input=&quot;foo=&quot; origin=config err=&quot;end of input: expected label value&quot; suggestion=&quot;foo=\&quot;\&quot;&quot; Here the matcher foo= can be made into a valid UTF-8 matcher by double quoting the right hand side of the expression to give foo=&quot;&quot; . These two matchers are equivalent, however with UTF-8 matchers the right hand side of the matcher is a required field. In rare cases, a configuration can cause disagreement between the UTF-8 and classic parser. This happens when a matcher is valid in both parsers, but due to added support for UTF-8, results in different parsings depending on which parser is used. If your Alertmanager configuration has disagreement, Alertmanager will use the classic parser and log a warning. For example: ts=2024-02-11T10:00:00Z caller=parse.go:183 level=warn msg=&quot;Matchers input has disagreement&quot; input=&quot;qux=\&quot;\\xf0\\x9f\\x99\\x82\&quot;\n&quot; origin=config Any occurrences of disagreement should be looked at on a case by case basis as depending on the nature of the disagreement, the configuration might not need updating before enabling UTF-8 strict mode. For example \xf0\x9f\x99\x82 is the byte sequence for the 🙂 emoji. If the intention is to match a literal 🙂 emoji then no change is required. However, if the intention is to match the literal \xf0\x9f\x99\x82 then the matcher should be changed to qux=&quot;\\xf0\\x9f\\x99\\x82&quot; . UTF-8 strict mode In UTF-8 strict mode, Alertmanager disables support for classic matchers: alertmanager --config.file=config.yml --enable-feature= &quot;utf8-strict-mode&quot; This mode should be enabled for new Alertmanager installations, and existing Alertmanager installations once all warnings of incompatible matchers have been resolved. Alertmanager will not start in UTF-8 strict mode until all the warnings of incompatible matchers have been resolved: ts=2024-02-11T10:00:00Z caller=coordinator.go:118 level=error component=configuration msg=&quot;Loading configuration file failed&quot; file=config.yml err=&quot;end of input: expected label value&quot; UTF-8 strict mode will be the default mode of Alertmanager at the end of the transition period. Classic mode Classic mode is equivalent to Alertmanager versions 0.26.0 and older: alertmanager --config.file=config.yml --enable-feature= &quot;classic-mode&quot; You can use this mode if you suspect there is an issue with fallback mode or UTF-8 strict mode. In such cases, please open an issue on GitHub with as much information as possible. Verification You can use amtool to validate that an Alertmanager configuration file is compatible with UTF-8 strict mode before enabling it in Alertmanager server. You do not need a running Alertmanager server to do this. Just like Alertmanager server, amtool will log a warning if the configuration is incompatible or contains disagreement: amtool check-config config.yml Checking &#x27;config.yml&#x27; level=warn msg=&quot;Alertmanager is moving to a new parser for labels and matchers, and this input is incompatible. Alertmanager has instead parsed the input using the classic matchers parser as a fallback. To make this input compatible with the UTF-8 matchers parser please make sure all regular expressions and values are double-quoted and backslashes are escaped. If you are still seeing this message please open an issue.&quot; input=&quot;foo=&quot; origin=config err=&quot;end of input: expected label value&quot; suggestion=&quot;foo=\&quot;\&quot;&quot; level=warn msg=&quot;Matchers input has disagreement&quot; input=&quot;qux=\&quot;\\xf0\\x9f\\x99\\x82\&quot;\n&quot; origin=config SUCCESS Found: - global config - route - 2 inhibit rules - 2 receivers - 0 templates You will know if a configuration is compatible with UTF-8 strict mode when no warnings are logged in amtool : amtool check-config config.yml Checking &#x27;config.yml&#x27; SUCCESS Found: - global config - route - 2 inhibit rules - 2 receivers - 0 templates You can also use amtool in UTF-8 strict mode as an additional level of verification. You will know that a configuration is invalid because the command will fail: amtool check-config config.yml --enable-feature=&quot;utf8-strict-mode&quot; level=warn msg=&quot;UTF-8 mode enabled&quot; Checking &#x27;config.yml&#x27; FAILED: end of input: expected label value amtool: error: failed to validate 1 file(s) You will know that a configuration is valid because the command will succeed: amtool check-config config.yml --enable-feature=&quot;utf8-strict-mode&quot; level=warn msg=&quot;UTF-8 mode enabled&quot; Checking &#x27;config.yml&#x27; SUCCESS Found: - global config - route - 2 inhibit rules - 2 receivers - 0 templates &lt;matcher&gt; UTF-8 matchers A UTF-8 matcher consists of three tokens: An unquoted literal or a double-quoted string for the label name. One of = , != , =~ , or !~ . = means equals, != means not equal, =~ means matches the regular expression and !~ means doesn&#x27;t match the regular expression. An unquoted literal or a double-quoted string for the regular expression or label value. Unquoted literals can contain all UTF-8 characters other than the reserved characters. The reserved characters include whitespace and all characters in { } ! = ~ , \ &quot; &#x27; ` . For example, foo , [a-zA-Z]+ , and Προμηθεύς (Prometheus in Greek) are all examples of valid unquoted literals. However, foo! is not a valid literal as ! is a reserved character. Double-quoted strings can contain all UTF-8 characters. Unlike unquoted literals, there are no reserved characters. However, literal double quotes and backslashes must be escaped with a single backslash. For example, to match the regular expression \d+ the backslash must be escaped &quot;\\d+&quot; . This is because double-quoted strings follow the same rules as Go&#x27;s string literals . Double-quoted strings also support UTF-8 code points. For example, &quot;foo!&quot; , &quot;bar,baz&quot; , &quot;\&quot;baz qux\&quot;&quot; and &quot;\xf0\x9f\x99\x82&quot; . Classic matchers A classic matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a classic matcher consists of three tokens: A valid Prometheus label name. One of = , != , =~ , or !~ . = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors. A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace. The 3rd token may be the empty string. Within the 3rd token, OpenMetrics escaping rules apply: \&quot; for a double-quote, \n for a line feed, \\ for a literal backslash. Unescaped &quot; must not occur inside the 3rd token (only as the 1st or last character). However, literal line feed characters are tolerated, as are single \ characters not followed by \ , n , or &quot; . They act as a literal backslash in that case. Composition of matchers You can compose matchers to create complex match expressions. When composed, all matchers must match for the entire expression to match. For example, the expression {alertname=&quot;Watchdog&quot;, severity=~&quot;warning|critical&quot;} will match an alert with labels alertname=Watchdog, severity=critical but not an alert with labels alertname=Watchdog, severity=none as while the alertname is Watchdog the severity is neither warning nor critical. You can compose matchers into expressions with a YAML list: matchers : - alertname = Watchdog - severity =~ &quot;warning|critical&quot; or as a PromQL inspired expression where each matcher is comma separated: {alertname=&quot;Watchdog&quot;, severity=~&quot;warning|critical&quot;} A single trailing comma is permitted: {alertname=&quot;Watchdog&quot;, severity=~&quot;warning|critical&quot;,} The open { and close } brace are optional: alertname=&quot;Watchdog&quot;, severity=~&quot;warning|critical&quot; However, both must be either present or omitted. You cannot have incomplete open or close braces: {alertname=&quot;Watchdog&quot;, severity=~&quot;warning|critical&quot; alertname=&quot;Watchdog&quot;, severity=~&quot;warning|critical&quot;} You cannot have duplicate open or close braces either: {{alertname=&quot;Watchdog&quot;, severity=~&quot;warning|critical&quot;,}} Whitespace (spaces, tabs and newlines) is permitted outside double quotes and has no effect on the matchers themselves. For example: { alertname = &quot;Watchdog&quot;, severity =~ &quot;warning|critical&quot;, } is equivalent to: {alertname=&quot;Watchdog&quot;,severity=~&quot;warning|critical&quot;} More examples Here are some more examples: Two equals matchers composed as a YAML list: matchers : - foo = bar - dings != bums Two matchers combined composed as a short-form YAML list: matchers : [ foo = bar , dings != bums ] As shown below, in the short-form, it&#x27;s better to use double quotes to avoid problems with special characters like commas: matchers : [ &quot;foo = \&quot; bar,baz \&quot; &quot; , &quot;dings != bums&quot; ] You can also put both matchers into one PromQL-like string. Single quotes work best here: matchers : [ &#x27;{foo=&quot;bar&quot;, dings!=&quot;bums&quot;}&#x27; ] To avoid issues with escaping and quoting rules in YAML, you can also use a YAML block: matchers : - | {quote=~&quot;She said: \&quot;Hi, all!( How&#x27;re you…)?\&quot;&quot;} General receiver-related settings These receiver settings allow configuring notification destinations (receivers) and HTTP client options for HTTP-based receivers. &lt;receiver&gt; Receiver is a named configuration of one or more notification integrations. Note: As part of lifting the past moratorium on new receivers it was agreed that, in addition to the existing requirements, new notification integrations will be required to have a committed maintainer with push access. # The unique name of the receiver. name : &lt;string&gt; # Configurations for several notification integrations. discord_configs : [ - &lt;discord_config&gt; , ... ] email_configs : [ - &lt;email_config&gt; , ... ] msteams_configs : [ - &lt;msteams_config&gt; , ... ] msteamsv2_configs : [ - &lt;msteamsv2_config&gt; , ... ] jira_configs : [ - &lt;jira_config&gt; , ... ] opsgenie_configs : [ - &lt;opsgenie_config&gt; , ... ] pagerduty_configs : [ - &lt;pagerduty_config&gt; , ... ] pushover_configs : [ - &lt;pushover_config&gt; , ... ] rocketchat_configs : [ - &lt;rocketchat_config&gt; , ... ] slack_configs : [ - &lt;slack_config&gt; , ... ] sns_configs : [ - &lt;sns_config&gt; , ... ] telegram_configs : [ - &lt;telegram_config&gt; , ... ] victorops_configs : [ - &lt;victorops_config&gt; , ... ] webex_configs : [ - &lt;webex_config&gt; , ... ] webhook_configs : [ - &lt;webhook_config&gt; , ... ] wechat_configs : [ - &lt;wechat_config&gt; , ... ] &lt;http_config&gt; An http_config allows configuring the HTTP client that the receiver uses to communicate with HTTP-based API services. # Note that `basic_auth` and `authorization` options are mutually exclusive. # Sets the `Authorization` header with the configured username and password. # password and password_file are mutually exclusive. basic_auth : [ username : &lt;string&gt; ] [ password : &lt;secret&gt; ] [ password_file : &lt;string&gt; ] # Optional the `Authorization` header configuration. authorization : # Sets the authentication type. [ type : &lt;string&gt; | default : Bearer ] # Sets the credentials. It is mutually exclusive with # `credentials_file`. [ credentials : &lt;secret&gt; ] # Sets the credentials with the credentials read from the configured file. # It is mutually exclusive with `credentials`. [ credentials_file : &lt;filename&gt; ] # Optional OAuth 2.0 configuration. # Cannot be used at the same time as basic_auth or authorization. oauth2 : [ &lt;oauth2&gt; ] # Whether to enable HTTP2. [ enable_http2 : &lt;bool&gt; | default : true ] # Optional proxy URL. [ proxy_url : &lt;string&gt; ] # Comma-separated string that can contain IPs, CIDR notation, domain names # that should be excluded from proxying. IP and domain names can # contain port numbers. [ no_proxy : &lt;string&gt; ] # Use proxy URL indicated by environment variables (HTTP_PROXY, http_proxy, HTTPS_PROXY, https_proxy, NO_PROXY, and no_proxy) [ proxy_from_environment : &lt;boolean&gt; | default : false ] # Specifies headers to send to proxies during CONNECT requests. [ proxy_connect_header : [ &lt;string&gt; : [ &lt;secret&gt; , ... ] ] ] # Configure whether HTTP requests follow HTTP 3xx redirects. [ follow_redirects : &lt;bool&gt; | default = true ] # Configures the TLS settings. tls_config : [ &lt;tls_config&gt; ] &lt;oauth2&gt; OAuth 2.0 authentication using the client credentials grant type. Alertmanager fetches an access token from the specified endpoint with the given client access and secret keys. client_id : &lt;string&gt; [ client_secret : &lt;secret&gt; ] # Read the client secret from a file. # It is mutually exclusive with `client_secret`. [ client_secret_file : &lt;filename&gt; ] # Scopes for the token request. scopes : [ - &lt;string&gt; ... ] # The URL to fetch the token from. token_url : &lt;string&gt; # Optional parameters to append to the token URL. endpoint_params : [ &lt;string&gt; : &lt;string&gt; ... ] # Configures the token request&#x27;s TLS settings. tls_config : [ &lt;tls_config&gt; ] # Optional proxy URL. [ proxy_url : &lt;string&gt; ] # Comma-separated string that can contain IPs, CIDR notation, domain names # that should be excluded from proxying. IP and domain names can # contain port numbers. [ no_proxy : &lt;string&gt; ] # Use proxy URL indicated by environment variables (HTTP_PROXY, https_proxy, HTTPs_PROXY, https_proxy, and no_proxy) [ proxy_from_environment : &lt;boolean&gt; | default : false ] # Specifies headers to send to proxies during CONNECT requests. [ proxy_connect_header : [ &lt;string&gt; : [ &lt;secret&gt; , ... ] ] ] &lt;tls_config&gt; A tls_config allows configuring TLS connections. # CA certificate to validate the server certificate with. [ ca_file : &lt;filepath&gt; ] # Certificate and key files for client cert authentication to the server. [ cert_file : &lt;filepath&gt; ] [ key_file : &lt;filepath&gt; ] # ServerName extension to indicate the name of the server. # http://tools.ietf.org/html/rfc4366#section-3.1 [ server_name : &lt;string&gt; ] # Disable validation of the server certificate. [ insecure_skip_verify : &lt;boolean&gt; | default = false ] # Minimum acceptable TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS # 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). # If unset, Prometheus will use Go default minimum version, which is TLS 1.2. # See MinVersion in https://pkg.go.dev/crypto/tls#Config. [ min_version : &lt;string&gt; ] # Maximum acceptable TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS # 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). # If unset, Prometheus will use Go default maximum version, which is TLS 1.3. # See MaxVersion in https://pkg.go.dev/crypto/tls#Config. [ max_version : &lt;string&gt; ] Receiver integration settings These settings allow configuring specific receiver integrations. &lt;discord_config&gt; Discord notifications are sent via the Discord webhook API . See Discord&#x27;s &quot;Intro to Webhooks&quot; article to learn how to configure a webhook integration for a channel. # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The Discord webhook URL. # webhook_url and webhook_url_file are mutually exclusive. webhook_url : &lt;secret&gt; webhook_url_file : &lt;filepath&gt; # Message title template. [ title : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;discord.default.title&quot; . }} &#x27; ] # Message body template. [ message: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;discord.default.message&quot; . }} &#x27; ] # Message content template. Limited to 2000 characters. [ content: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;discord.default.content&quot; . }} &#x27; ] # Message username. [ username: &lt;string&gt; | default = &#x27;&#x27; ] # Message avatar URL. [ avatar_url: &lt;string&gt; | default = &#x27;&#x27; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;email_config&gt; # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = false ] # The email address to send notifications to. # Allows a comma separated list of rfc5322 compliant email addresses. to : &lt;tmpl_string&gt; # The sender&#x27;s address. [ from : &lt;tmpl_string&gt; | default = global.smtp_from ] # The SMTP host through which emails are sent. [ smarthost : &lt;string&gt; | default = global.smtp_smarthost ] # The hostname to identify to the SMTP server. [ hello : &lt;string&gt; | default = global.smtp_hello ] # SMTP authentication information. # auth_password and auth_password_file are mutually exclusive. [ auth_username : &lt;string&gt; | default = global.smtp_auth_username ] [ auth_password : &lt;secret&gt; | default = global.smtp_auth_password ] [ auth_password_file : &lt;string&gt; | default = global.smtp_auth_password_file ] [ auth_secret : &lt;secret&gt; | default = global.smtp_auth_secret ] [ auth_identity : &lt;string&gt; | default = global.smtp_auth_identity ] # The SMTP TLS requirement. # Note that Go does not support unencrypted connections to remote SMTP endpoints. [ require_tls : &lt;bool&gt; | default = global.smtp_require_tls ] # TLS configuration. tls_config : [ &lt;tls_config&gt; | default = global.smtp_tls_config ] # The HTML body of the email notification. [ html : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;email.default.html&quot; . }} &#x27; ] # The text body of the email notification. [ text: &lt;tmpl_string&gt; ] # Further headers email header key/value pairs. Overrides any headers # previously set by the notification implementation. [ headers: { &lt;string&gt; : &lt;tmpl_string&gt; , ... } ] &lt;msteams_config&gt; Microsoft Teams notifications are sent via the Incoming Webhooks API endpoint. DEPRECATION NOTICE: Microsoft is deprecating the creation and usage of Microsoft 365 connectors via Microsoft Teams . Consider migrating to using Workflows with the msteamsv2 config. # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The incoming webhook URL. # webhook_url and webhook_url_file are mutually exclusive. [ webhook_url : &lt;secret&gt; ] [ webhook_url_file : &lt;filepath&gt; ] # Message title template. [ title : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;msteams.default.title&quot; . }} &#x27; ] # Message summary template. [ summary: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;msteams.default.summary&quot; . }} &#x27; ] # Message body template. [ text: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;msteams.default.text&quot; . }} &#x27; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;msteamsv2_config&gt; Microsoft Teams v2 notifications using the new message format with adaptive cards as required by flows . Please follow the documentation for more information on how to set up this integration. # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The incoming webhook URL. # webhook_url and webhook_url_file are mutually exclusive. [ webhook_url : &lt;secret&gt; ] [ webhook_url_file : &lt;filepath&gt; ] # Message title template. [ title : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;msteamsv2.default.title&quot; . }} &#x27; ] # Message body template. [ text: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;msteamsv2.default.text&quot; . }} &#x27; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;jira_config&gt; JIRA notifications are sent via JIRA Rest API v2 or JIRA REST API v3 . Note: This integration is only tested against a Jira Cloud instance. Jira Data Center (on premise instance) can work, but it&#x27;s not guaranteed. Both APIs have the same feature set. The difference is that V2 supports Wiki Markup for the issue description and V3 supports Atlassian Document Format (ADF) . The default jira.default.description template only works with V2. # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The URL to send API requests to. The full API path must be included. # Example: https://company.atlassian.net/rest/api/2/ [ api_url : &lt;string&gt; | default = global.jira_api_url ] # The project key where issues are created. project : &lt;string&gt; # Issue summary template. [ summary : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;jira.default.summary&quot; . }} &#x27; ] # Issue description template. [ description: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;jira.default.description&quot; . }} &#x27; ] # Labels to be added to the issue. labels: [ - &lt;tmpl_string&gt; ... ] # Priority of the issue. [ priority: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;jira.default.priority&quot; . }} &#x27; ] # Type of the issue (e.g. Bug). [ issue_type: &lt;string&gt; ] # Name of the workflow transition to resolve an issue. The target status must have the category &quot;done&quot;. # NOTE: The name of the transition can be localized and depends on the language setting of the service account. [ resolve_transition: &lt;string&gt; ] # Name of the workflow transition to reopen an issue. The target status should not have the category &quot;done&quot;. # NOTE: The name of the transition can be localized and depends on the language setting of the service account. [ reopen_transition: &lt;string&gt; ] # If reopen_transition is defined, ignore issues with that resolution. [ wont_fix_resolution: &lt;string&gt; ] # If reopen_transition is defined, reopen the issue when it is not older than this value (rounded down to the nearest minute). # The resolutiondate field is used to determine the age of the issue. [ reopen_duration: &lt;duration&gt; ] # Other issue and custom fields. fields: [ &lt;string&gt; : &lt;jira_field&gt; ... ] # The HTTP client&#x27;s configuration. You must use this configuration to supply the personal access token (PAT) as part of the HTTP `Authorization` header. # For Jira Cloud, use basic_auth with the email address as the username and the PAT as the password. # For Jira Data Center, use the &#x27;authorization&#x27; field with &#x27;credentials: &lt;PAT value&gt;&#x27;. [ http_config : &lt;http_config&gt; | default = global.http_config ] The labels field is a list of labels added to the issue. Template expressions are supported. For example: labels : - &#x27;alertmanager&#x27; - &#x27;{{ .CommonLabels.severity }}&#x27; &lt;jira_field&gt; Jira issue field can have multiple types. Depends on the field type, the values must be provided differently. See https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#setting-custom-field-data-for-other-field-types for further examples. fields : # Components components : { name : &quot;Monitoring&quot; } # Custom Field TextField customfield_10001 : &quot;Random text&quot; # Custom Field SelectList customfield_10002 : { &quot;value&quot; : &quot;red&quot; } # Custom Field MultiSelect customfield_10003 : [{ &quot;value&quot; : &quot;red&quot; }, { &quot;value&quot; : &quot;blue&quot; }, { &quot;value&quot; : &quot;green&quot; }] &lt;opsgenie_config&gt; OpsGenie notifications are sent via the OpsGenie API . # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The API key to use when talking to the OpsGenie API. [ api_key : &lt;secret&gt; | default = global.opsgenie_api_key ] # The filepath to API key to use when talking to the OpsGenie API. Conflicts with api_key. [ api_key_file : &lt;filepath&gt; | default = global.opsgenie_api_key_file ] # The host to send OpsGenie API requests to. [ api_url : &lt;string&gt; | default = global.opsgenie_api_url ] # Alert text limited to 130 characters. [ message : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;opsgenie.default.message&quot; . }} &#x27; ] # A description of the alert. [ description: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;opsgenie.default.description&quot; . }} &#x27; ] # A backlink to the sender of the notification. [ source: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;opsgenie.default.source&quot; . }} &#x27; ] # A set of arbitrary key/value pairs that provide further detail # about the alert. # All common labels are included as details by default. [ details: { &lt;string&gt; : &lt;tmpl_string&gt; , ... } ] # List of responders responsible for notifications. responders: [ - &lt;responder&gt; ... ] # Comma separated list of tags attached to the notifications. [ tags: &lt;tmpl_string&gt; ] # Additional alert note. [ note: &lt;tmpl_string&gt; ] # Priority level of alert. Possible values are P1, P2, P3, P4, and P5. [ priority: &lt;tmpl_string&gt; ] # Whether to update message and description of the alert in OpsGenie if it already exists # By default, the alert is never updated in OpsGenie, the new message only appears in activity log. [ update_alerts: &lt;boolean&gt; | default = false ] # Optional field that can be used to specify which domain alert is related to. [ entity: &lt;tmpl_string&gt; ] # Comma separated list of actions that will be available for the alert. [ actions: &lt;tmpl_string&gt; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;responder&gt; # Exactly one of these fields should be defined. [ id : &lt;tmpl_string&gt; ] [ name : &lt;tmpl_string&gt; ] [ username : &lt;tmpl_string&gt; ] # One of `team`, `teams`, `user`, `escalation` or `schedule`. # # The `teams` responder is configured using the `name` field above. # This field can contain a comma-separated list of team names. # If the list is empty, no responders are configured. type : &lt;tmpl_string&gt; &lt;pagerduty_config&gt; PagerDuty notifications are sent via the PagerDuty API . PagerDuty provides documentation on how to integrate. There are important differences with Alertmanager&#x27;s v0.11 and greater support of PagerDuty&#x27;s Events API v2. # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The routing and service keys are mutually exclusive. # The PagerDuty integration key (when using PagerDuty integration type `Events API v2`). # It is mutually exclusive with `routing_key_file`. routing_key : &lt;tmpl_secret&gt; # Read the Pager Duty routing key from a file. # It is mutually exclusive with `routing_key`. routing_key_file : &lt;filepath&gt; # The PagerDuty integration key (when using PagerDuty integration type `Prometheus`). # It is mutually exclusive with `service_key_file`. service_key : &lt;tmpl_secret&gt; # Read the Pager Duty service key from a file. # It is mutually exclusive with `service_key`. service_key_file : &lt;filepath&gt; # The URL to send API requests to [ url : &lt;string&gt; | default = global.pagerduty_url ] # The client identification of the Alertmanager. [ client : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;pagerduty.default.client&quot; . }} &#x27; ] # A backlink to the sender of the notification. [ client_url: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;pagerduty.default.clientURL&quot; . }} &#x27; ] # A description of the incident. [ description: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;pagerduty.default.description&quot; . }} &#x27; ] # Severity of the incident. [ severity: &lt;tmpl_string&gt; | default = &#x27;error&#x27; ] # Unique location of the affected system. [ source : &lt;tmpl_string&gt; | default = client ] # A set of arbitrary key/value pairs that provide further detail # about the incident. [ details : { &lt;string&gt; : &lt;tmpl_string&gt; , ... } | default = { firing : &#x27;{{ template &quot;pagerduty.default.instances&quot; .Alerts.Firing }}&#x27; resolved : &#x27;{{ template &quot;pagerduty.default.instances&quot; .Alerts.Resolved }}&#x27; num_firing : &#x27;{{ .Alerts.Firing | len }}&#x27; num_resolved : &#x27;{{ .Alerts.Resolved | len }}&#x27; } ] # Images to attach to the incident. images : [ &lt;image_config&gt; ... ] # Links to attach to the incident. links : [ &lt;link_config&gt; ... ] # The part or component of the affected system that is broken. [ component : &lt;tmpl_string&gt; ] # A cluster or grouping of sources. [ group : &lt;tmpl_string&gt; ] # The class/type of the event. [ class : &lt;tmpl_string&gt; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;image_config&gt; The fields are documented in the PagerDuty API documentation . href : &lt;tmpl_string&gt; src : &lt;tmpl_string&gt; alt : &lt;tmpl_string&gt; &lt;link_config&gt; The fields are documented in the PagerDuty API documentation . href : &lt;tmpl_string&gt; text : &lt;tmpl_string&gt; &lt;pushover_config&gt; Pushover notifications are sent via the Pushover API . # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The recipient user&#x27;s key. # user_key and user_key_file are mutually exclusive. user_key : &lt;secret&gt; user_key_file : &lt;filepath&gt; # Your registered application&#x27;s API token, see https://pushover.net/apps # You can also register a token by cloning this Prometheus app: # https://pushover.net/apps/clone/prometheus # token and token_file are mutually exclusive. token : &lt;secret&gt; token_file : &lt;filepath&gt; # Notification title. [ title : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;pushover.default.title&quot; . }} &#x27; ] # Notification message. [ message: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;pushover.default.message&quot; . }} &#x27; ] # A supplementary URL shown alongside the message. [ url: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;pushover.default.url&quot; . }} &#x27; ] # Optional device to send notification to, see https://pushover.net/api#device [ device: &lt;string&gt; ] # Optional sound to use for notification, see https://pushover.net/api#sound [ sound: &lt;string&gt; ] # Priority, see https://pushover.net/api#priority [ priority: &lt;tmpl_string&gt; | default = &#x27; {{ if eq .Status &quot;firing&quot; }} 2 {{ else }} 0 {{ end }} &#x27; ] # How often the Pushover servers will send the same notification to the user. # Must be at least 30 seconds. [ retry: &lt;duration&gt; | default = 1m ] # How long your notification will continue to be retried for, unless the user # acknowledges the notification. [ expire: &lt;duration&gt; | default = 1h ] # Optional time to live (TTL) to use for notification, see https://pushover.net/api#ttl [ ttl: &lt;duration&gt; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;rocketchat_config&gt; Rocketchat notifications are sent via the Rocketchat REST API . # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] [ api_url : &lt;string&gt; | default = global.rocketchat_api_url ] [ channel : &lt;tmpl_string&gt; | default = global.rocketchat_api_url ] # The sender token and token_id # See https://docs.rocket.chat/use-rocket.chat/user-guides/user-panel/my-account#personal-access-tokens # token and token_file are mutually exclusive. # token_id and token_id_file are mutually exclusive. token : &lt;secret&gt; token_file : &lt;filepath&gt; token_id : &lt;secret&gt; token_id_file : &lt;filepath&gt; [ color : &lt;tmpl_string | default &#x27; {{ if eq .Status &quot;firing&quot; }} red {{ else }} green {{ end }} &#x27; ] [ emoji &lt;tmpl_string | default = &#x27; {{ template &quot;rocketchat.default.emoji&quot; . }} &#x27; [ icon_url &lt;tmpl_string | default = &#x27; {{ template &quot;rocketchat.default.iconurl&quot; . }} &#x27; [ text &lt;tmpl_string | default = &#x27; {{ template &quot;rocketchat.default.text&quot; . }} &#x27; [ title &lt;tmpl_string | default = &#x27; {{ template &quot;rocketchat.default.title&quot; . }} &#x27; [ titleLink &lt;tmpl_string | default = &#x27; {{ template &quot;rocketchat.default.titlelink&quot; . }} &#x27; [ text: &lt;tmpl_string | default = &#x27; {{ template &quot;rocketchat.default.text&quot; . }} &#x27; fields: [ &lt;rocketchat_field_config&gt; ... ] [ image_url &lt;tmpl_string&gt; ] [ thumb_url &lt;tmpl_string&gt; ] [ link_names &lt;tmpl_string&gt; ] [ short_fields: &lt;boolean&gt; | default = false ] actions: [ &lt;rocketchat_action_config&gt; ... ] &lt;rocketchat_field_config&gt; The fields are documented in the Rocketchat API documentation . [ title : &lt;tmpl_string&gt; ] [ value : &lt;tmpl_string&gt; ] [ short : &lt;boolean&gt; | default = rocketchat_config.short_fields ] &lt;rocketchat_action_config&gt; The fields are documented in the Rocketchat API api models . [ type : &lt;tmpl_string&gt; | ignored , only &quot;button&quot; is supported ] [ text : &lt;tmpl_string&gt; ] [ url : &lt;tmpl_string&gt; ] [ msg : &lt;tmpl_string&gt; ] &lt;slack_config&gt; Slack notifications can be sent via Incoming webhooks or Bot tokens . If using an incoming webhook then api_url must be set to the URL of the incoming webhook, or written to the file referenced in api_url_file . If using Bot tokens then api_url must be set to https://slack.com/api/chat.postMessage , the bot token must be set as the authorization credentials in http_config , and channel must contain either the name of the channel or Channel ID to send notifications to. If using the name of the channel the # is optional. The notification contains an attachment . # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = false ] # The Slack webhook URL. Either api_url or api_url_file should be set. # Defaults to global settings if none are set here. [ api_url : &lt;secret&gt; | default = global.slack_api_url ] [ api_url_file : &lt;filepath&gt; | default = global.slack_api_url_file ] # The channel or user to send notifications to. channel : &lt;tmpl_string&gt; # API request data as defined by the Slack webhook API. [ icon_emoji : &lt;tmpl_string&gt; ] [ icon_url : &lt;tmpl_string&gt; ] [ link_names : &lt;boolean&gt; | default = false ] [ username : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;slack.default.username&quot; . }} &#x27; ] # The following parameters define the attachment. actions: [ &lt;action_config&gt; ... ] [ callback_id: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;slack.default.callbackid&quot; . }} &#x27; ] [ color: &lt;tmpl_string&gt; | default = &#x27; {{ if eq .Status &quot;firing&quot; }} danger {{ else }} good {{ end }} &#x27; ] [ fallback: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;slack.default.fallback&quot; . }} &#x27; ] fields: [ &lt;field_config&gt; ... ] [ footer: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;slack.default.footer&quot; . }} &#x27; ] [ mrkdwn_in: &#x27; [ &#x27; &lt;string&gt; , ... &#x27; ] &#x27; | default = [&quot;fallback&quot;, &quot;pretext&quot;, &quot;text&quot;] ] [ pretext: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;slack.default.pretext&quot; . }} &#x27; ] [ short_fields: &lt;boolean&gt; | default = false ] [ text: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;slack.default.text&quot; . }} &#x27; ] [ title: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;slack.default.title&quot; . }} &#x27; ] [ title_link: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;slack.default.titlelink&quot; . }} &#x27; ] [ image_url: &lt;tmpl_string&gt; ] [ thumb_url: &lt;tmpl_string&gt; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;action_config&gt; The fields are documented in the Slack API documentation for message attachments and interactive messages . text : &lt;tmpl_string&gt; type : &lt;tmpl_string&gt; # Either url or name and value are mandatory. [ url : &lt;tmpl_string&gt; ] [ name : &lt;tmpl_string&gt; ] [ value : &lt;tmpl_string&gt; ] [ confirm : &lt;action_confirm_field_config&gt; ] [ style : &lt;tmpl_string&gt; | default = &#x27;&#x27; ] &lt;action_confirm_field_config&gt; The fields are documented in the Slack API documentation . text : &lt;tmpl_string&gt; [ dismiss_text : &lt;tmpl_string&gt; | default &#x27;&#x27; ] [ ok_text : &lt;tmpl_string&gt; | default &#x27;&#x27; ] [ title : &lt;tmpl_string&gt; | default &#x27;&#x27; ] &lt;field_config&gt; The fields are documented in the Slack API documentation . title : &lt;tmpl_string&gt; value : &lt;tmpl_string&gt; [ short : &lt;boolean&gt; | default = slack_config.short_fields ] &lt;sns_config&gt; # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The SNS API URL i.e. https://sns.us-east-2.amazonaws.com. # If not specified, the SNS API URL from the SNS SDK will be used. [ api_url : &lt;tmpl_string&gt; ] # Configures AWS&#x27;s Signature Verification 4 signing process to sign requests. sigv4 : [ &lt;sigv4_config&gt; ] # SNS topic ARN, i.e. arn:aws:sns:us-east-2:698519295917:My-Topic # If you don&#x27;t specify this value, you must specify a value for the phone_number or target_arn. # If you are using a FIFO SNS topic you should set a message group interval longer than 5 minutes # to prevent messages with the same group key being deduplicated by the SNS default deduplication window [ topic_arn : &lt;tmpl_string&gt; ] # Subject line when the message is delivered to email endpoints. [ subject : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;sns.default.subject&quot; . }} &#x27; ] # Phone number if message is delivered via SMS in E.164 format. # If you don&#x27;t specify this value , you must specify a value for the topic_arn or target_arn. [ phone_number : &lt;tmpl_string&gt; ] # The mobile platform endpoint ARN if message is delivered via mobile notifications. # If you don&#x27;t specify this value, you must specify a value for the topic_arn or phone_number. [ target_arn : &lt;tmpl_string&gt; ] # The message content of the SNS notification. [ message : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;sns.default.message&quot; . }} &#x27; ] # SNS message attributes. attributes: [ &lt;string&gt; : &lt;string&gt; ... ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;sigv4_config&gt; # The AWS region. If blank, the region from the default credentials chain is used. [ region : &lt;string&gt; ] # The AWS API keys. Both access_key and secret_key must be supplied or both must be blank. # If blank the environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are used. [ access_key : &lt;string&gt; ] [ secret_key : &lt;secret&gt; ] # Named AWS profile used to authenticate. [ profile : &lt;string&gt; ] # AWS Role ARN, an alternative to using AWS API keys. [ role_arn : &lt;string&gt; ] &lt;telegram_config&gt; # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The Telegram API URL i.e. https://api.telegram.org. # If not specified, default API URL will be used. [ api_url : &lt;string&gt; | default = global.telegram_api_url ] # Telegram bot token. It is mutually exclusive with `bot_token_file`. [ bot_token : &lt;secret&gt; ] # Read the Telegram bot token from a file. It is mutually exclusive with `bot_token`. [ bot_token_file : &lt;filepath&gt; ] # ID of the chat where to send the messages. [ chat_id : &lt;int&gt; ] # Optional ID of the message thread where to send the messages. [ message_thread_id : &lt;int&gt; ] # Message template. [ message : &lt;tmpl_string&gt; default = &#x27; {{ template &quot;telegram.default.message&quot; . }} &#x27; ] # Disable telegram notifications [ disable_notifications: &lt;boolean&gt; | default = false ] # Parse mode for telegram message, supported values are MarkdownV2, Markdown, HTML and empty string for plain text. [ parse_mode: &lt;string&gt; | default = &quot;HTML&quot; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;victorops_config&gt; VictorOps notifications are sent out via the VictorOps API # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The API key to use when talking to the VictorOps API. # It is mutually exclusive with `api_key_file`. [ api_key : &lt;secret&gt; | default = global.victorops_api_key ] # Reads the API key to use when talking to the VictorOps API from a file. # It is mutually exclusive with `api_key`. [ api_key_file : &lt;filepath&gt; | default = global.victorops_api_key_file ] # The VictorOps API URL. [ api_url : &lt;string&gt; | default = global.victorops_api_url ] # A key used to map the alert to a team. routing_key : &lt;tmpl_string&gt; # Describes the behavior of the alert (CRITICAL, WARNING, INFO). [ message_type : &lt;tmpl_string&gt; | default = &#x27;CRITICAL&#x27; ] # Contains summary of the alerted problem. [ entity_display_name : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;victorops.default.entity_display_name&quot; . }} &#x27; ] # Contains long explanation of the alerted problem. [ state_message: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;victorops.default.state_message&quot; . }} &#x27; ] # The monitoring tool the state message is from. [ monitoring_tool: &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;victorops.default.monitoring_tool&quot; . }} &#x27; ] # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] &lt;webhook_config&gt; The webhook receiver allows configuring a generic receiver. # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The endpoint to send HTTP POST requests to. # url and url_file are mutually exclusive. url : &lt;secret&gt; url_file : &lt;filepath&gt; # The HTTP client&#x27;s configuration. [ http_config : &lt;http_config&gt; | default = global.http_config ] # The maximum number of alerts to include in a single webhook message. Alerts # above this threshold are truncated. When leaving this at its default value of # 0, all alerts are included. [ max_alerts : &lt;int&gt; | default = 0 ] # The maximum time to wait for a webhook request to complete, before failing the # request and allowing it to be retried. The default value of 0s indicates that # no timeout should be applied. # NOTE: This will have no effect if set higher than the group_interval. [ timeout : &lt;duration&gt; | default = 0s ] The Alertmanager will send HTTP POST requests in the following JSON format to the configured endpoint: { &quot;version&quot;: &quot;4&quot;, &quot;groupKey&quot;: &lt;string&gt; , // key identifying the group of alerts (e.g. to deduplicate) &quot;truncatedAlerts&quot;: &lt;int&gt; , // how many alerts have been truncated due to &quot;max_alerts&quot; &quot;status&quot;: &quot;&lt;resolved|firing&gt;&quot;, &quot;receiver&quot;: &lt;string&gt; , &quot;groupLabels&quot;: &lt;object&gt;, &quot;commonLabels&quot;: &lt;object&gt;, &quot;commonAnnotations&quot;: &lt;object&gt;, &quot;externalURL&quot;: &lt;string&gt; , // backlink to the Alertmanager. &quot;alerts&quot;: [ { &quot;status&quot;: &quot;&lt;resolved|firing&gt;&quot;, &quot;labels&quot;: &lt;object&gt;, &quot;annotations&quot;: &lt;object&gt;, &quot;startsAt&quot;: &quot;&lt;rfc3339&gt;&quot;, &quot;endsAt&quot;: &quot;&lt;rfc3339&gt;&quot;, &quot;generatorURL&quot;: &lt;string&gt; , // identifies the entity that caused the alert &quot;fingerprint&quot;: &lt;string&gt; // fingerprint to identify the alert }, ... ] } There is a list of integrations with this feature. &lt;wechat_config&gt; WeChat notifications are sent via the WeChat API . # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = false ] # The API key to use when talking to the WeChat API. [ api_secret : &lt;secret&gt; | default = global.wechat_api_secret ] # The WeChat API URL. [ api_url : &lt;string&gt; | default = global.wechat_api_url ] # The corp id for authentication. [ corp_id : &lt;string&gt; | default = global.wechat_api_corp_id ] # API request data as defined by the WeChat API. [ message : &lt;tmpl_string&gt; | default = &#x27; {{ template &quot;wechat.default.message&quot; . }} &#x27; ] # Type of the message type, supported values are `text` and `markdown`. [ message_type: &lt;string&gt; | default = &#x27;text&#x27; ] [ agent_id : &lt;string&gt; | default = &#x27; {{ template &quot;wechat.default.agent_id&quot; . }} &#x27; ] [ to_user: &lt;string&gt; | default = &#x27; {{ template &quot;wechat.default.to_user&quot; . }} &#x27; ] [ to_party: &lt;string&gt; | default = &#x27; {{ template &quot;wechat.default.to_party&quot; . }} &#x27; ] [ to_tag: &lt;string&gt; | default = &#x27; {{ template &quot;wechat.default.to_tag&quot; . }} &#x27; ] &lt;webex_config&gt; # Whether to notify about resolved alerts. [ send_resolved : &lt;boolean&gt; | default = true ] # The Webex Teams API URL i.e. https://webexapis.com/v1/messages # If not specified, default API URL will be used. [ api_url : &lt;string&gt; | default = global.webex_api_url ] # ID of the Webex Teams room where to send the messages. room_id : &lt;tmpl_string&gt; # Message template. [ message : &lt;tmpl_string&gt; default = &#x27; {{ template &quot;webex.default.message&quot; . }} &#x27; ] # The HTTP client&#x27;s configuration. You must use this configuration to supply the bot token as part of the HTTP `Authorization` header. [ http_config : &lt;http_config&gt; | default = global.http_config ] Previous Alertmanager Edit Edit this page Next Clients On this page © Prometheus Authors 2014- 2025 | Documentation Distributed under CC-BY-4.0 © 2025 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.