For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/es/api/latest/hosts/mute-a-host.md. A documentation index is available at /llms.txt.
Language
Datadog site

Silenciar un host

POSThttps://api.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.us3.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.us5.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.datadoghq.eu/api/v1/host/{host_name}/mutehttps://api.ap1.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.ap2.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.uk1.datadoghq.com/api/v1/host/{host_name}/mutehttps://api.ddog-gov.com/api/v1/host/{host_name}/mutehttps://api.us2.ddog-gov.com/api/v1/host/{host_name}/mute

Descripción general

Silencia un host. Nota: Esta acción crea un tiempo de inactividad V2 para el host.

Argumentos

Parámetros de ruta

Nombre
Type
Descripción
host_name [required]
string

Name of the host to mute.

Solicitud

Body Data (required)

Silencia el cuerpo de una solicitud de host.

Campo
Type
Descripción
end
int64

Combinación de parámetros para silenciar un host.

message
string

Message to associate with the muting of this host.

override
boolean

If true and the host is already muted, replaces existing host mute settings.

Respuesta

OK

Response with the list of muted host for your organization.

Campo
Type
Descripción
action
string

Action applied to the hosts.

end
int64

POSIX timestamp in seconds when the host is unmuted.

hostname
string

The host name.

message
string

Message associated with the mute.

Ejemplo de código

Silenciar un host
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF
# Path parameters
export host_name="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/host/${host_name}/mute" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "end": 1579098130,
  "message": "Muting this host for a test!",
  "override": false
}
EOF