$linuxjunkies
>

amtool(1)

Command-line tool for managing and querying Alertmanager alerts and silence rules.

UbuntuDebianFedoraArch

Synopsis

amtool [OPTION]... COMMAND [ARG]...

Description

amtool is the official command-line client for Alertmanager, allowing operators to query active alerts, manage silences, and interact with Alertmanager instances from the command line or scripts.

It provides subcommands for viewing alerts, creating/managing silences, querying the Alertmanager API, and managing alert routing and grouping. Authentication and TLS configuration are supported for remote instances.

Common options

FlagWhat it does
--alertmanager.urlURL of the Alertmanager instance (default: http://localhost:9093)
-o, --outputOutput format: simple, json, extended (default: simple)
--timeoutTimeout for API requests (default: 30s)
--insecure-skip-verifySkip TLS certificate verification for HTTPS endpoints
--cert-filePath to client certificate for mutual TLS authentication
--key-filePath to client private key for mutual TLS authentication
-c, --configConfiguration file path (YAML format)
--verboseEnable verbose logging output

Examples

List all active alerts from the default Alertmanager instance

amtool alert query

Query only critical-severity alerts with label matching

amtool alert query severity=critical

Create a 24-hour silence for all DiskFull alerts

amtool silence add alertname=DiskFull duration=24h

Display all active silence rules

amtool silence list

Immediately expire a silence by its ID

amtool silence expire 1234567890abcdef

Query alerts in JSON format for programmatic processing

amtool alert query -o json | jq

Query alerts from a remote Alertmanager instance

amtool --alertmanager.url http://remote-alert:9093 alert query

Add silence with a comment explaining the reason

amtool silence add job=prometheus duration=1h comment='Testing'

Related commands