OS Manuals

/usr/bin/amtool

Prometheus Alertmanager

From prometheus-alertmanager-fips 0.34.2-r1 (enterprise-packages), captured 2026-11-08 by running amtool --help (exit 0). permalink

usage: amtool [<flags>] <command> [<args> ...]

View and modify the current Alertmanager state.

Config File: The alertmanager tool will read a config file in YAML format from one of two default
config locations: $HOME/.config/amtool/config.yml or /etc/amtool/config.yml

All flags can be given in the config file, but the following are the suited for static
configuration:

  alertmanager.url
  	Set a default alertmanager url for each request

  author
  	Set a default author value for new silences. If this argument is not
  	specified then the username will be used

  require-comment
  	Bool, whether to require a comment on silence creation. Defaults to true

  output
  	Set a default output type. Options are (simple, extended, json)

  date.format
  	Sets the output format for dates. Defaults to "2006-01-02 15:04:05 MST"

  http.config.file
  	HTTP client configuration file for amtool to connect to Alertmanager.
  	The format is https://prometheus.io/docs/alerting/latest/configuration/#http_config.

Flags:
  -h, --[no-]help           Show context-sensitive help (also try --help-long and --help-man).
      --date.format="2006-01-02 15:04:05 MST"
                            Format of date output
  -v, --[no-]verbose        Verbose running information
      --alertmanager.url=ALERTMANAGER.URL
                            Alertmanager to talk to
  -o, --output=simple       Output formatter (simple, extended, json)
      --timeout=30s         Timeout for the executed command
      --http.config.file=<filename>
                            HTTP client configuration file for amtool to connect to Alertmanager.
      --[no-]version-check  Check alertmanager version. Use --no-version-check to disable.
      --enable-feature=""   Experimental features to enable, comma separated. Valid options:
                            alert-names-in-metrics, receiver-name-in-metrics, group-key-in-metrics,
                            classic-mode, utf8-strict-mode, auto-gomemlimit, event-recorder
      --[no-]version        Show application version.

Commands:
  help [<command>...]
  alert
    query* [<flags>] [<matcher-groups>...]
    add [<flags>] [<labels>...]
  silence
    add [<flags>] [<matcher-groups>...]
    expire [<silence-ids>...]
    import [<flags>] [<input-file>]
    query* [<flags>] [<matcher-groups>...]
    update [<flags>] [<update-ids>...]
  check-config [<check-files>...]
  cluster
    show*
  config
    show*
    routes [<flags>]
      show*
      test [<flags>] [<labels>...]
  template
    render --template.glob=TEMPLATE.GLOB --template.text=TEMPLATE.TEXT [<flags>]
Options (7)
OptionDescriptionSource
-hShow context-sensitive help (also try --help-long and --help-man).help
-vVerbose running informationhelp
--alertmanager.url ALERTMANAGER.URLAlertmanager to talk tohelp
-o, --output simpleOutput formatter (simple, extended, json)help
--timeout 30sTimeout for the executed commandhelp
--http.config.file filenameHTTP client configuration file for amtool to connect to Alertmanager.help
--enable-feature ""Experimental features to enable, comma separated.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.