amtool
TLDR
List all current alerts
SYNOPSIS
amtool command [options] [arguments]
DESCRIPTION
amtool is the official command-line client for interacting with Prometheus Alertmanager. It provides capabilities for querying alerts, managing silences, testing routing configurations, and validating configuration files.
The tool connects to an Alertmanager instance via its HTTP API to perform operations. It is particularly useful for creating silences during maintenance windows, debugging alert routing, and integrating Alertmanager management into automation scripts.
Configuration can be validated offline using check-config without requiring a running Alertmanager instance. The config routes test command helps verify that alerts will be routed to expected receivers based on their labels.
PARAMETERS
alert
Query and manage alerts.silence add matchers
Create a new silence matching the specified labels.silence query
List active silences.silence expire id
Remove a silence by its ID.check-config file
Validate an Alertmanager configuration file.cluster show
Display cluster membership status.config routes
Display routing tree from configuration.config routes test labels
Test which route matches given labels.--alertmanager.url url
Alertmanager URL (default: http://localhost:9093).--comment text
Comment for a silence (required).--author name
Author of a silence.--duration duration
Duration for a silence (e.g., 1h, 30m).-o, --output format
Output format: simple, extended, json.
CAVEATS
Requires network access to the Alertmanager API endpoint. Silences require a comment; creating them without --comment will fail. The --alertmanager.url must be specified if Alertmanager is not running on localhost:9093. Configuration file validation may not catch all runtime issues.
HISTORY
amtool was developed alongside Alertmanager as part of the Prometheus ecosystem. It was created to provide operators with a scriptable interface for alert management, complementing the web UI for automation and CI/CD integration. The tool is maintained by the Prometheus project and distributed as part of the Alertmanager release.
SEE ALSO
alertmanager(1), prometheus(1), promtool(1)


