This is just a little guy that allows you to quickly mute and unmute hosts in Datadog.
go install github.com/hkrutzer/dd-mute-host@latest
The tool requires Datadog API credentials. Set the following environment variables:
DD_API_KEY
: Your Datadog API keyDD_APP_KEY
: Your Datadog application key
To see all hosts and their mute status:
dd-mute-host list
To mute one or more hosts for a specified duration:
dd-mute-host mute [--duration minutes] host1 [host2 ...]
Options:
--duration
: How many minutes to mute the host for (default: 60)
Example:
# Mute a single host for 30 minutes
dd-mute-host mute --duration 30 webserver1
# Mute multiple hosts for the default duration (60 minutes)
dd-mute-host mute webserver1 webserver2 webserver3
To unmute one or more hosts:
dd-mute-host unmute host1 [host2 ...]
Example:
# Unmute a single host
dd-mute-host unmute webserver1
# Unmute multiple hosts
dd-mute-host unmute webserver1 webserver2 webserver3