Desactivar el silenciamiento de un monitor
https://api.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.us3.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.us5.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.datadoghq.eu/api/v1/monitor/{monitor_id}/unmutehttps://api.ap1.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.ap2.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.uk1.datadoghq.com/api/v1/monitor/{monitor_id}/unmutehttps://api.ddog-gov.com/api/v1/monitor/{monitor_id}/unmutehttps://api.us2.ddog-gov.com/api/v1/monitor/{monitor_id}/unmuteDescripción general
Desactiva el silenciamiento del monitor especificado.
OAuth apps require the monitors_write authorization scope to access this endpoint.
Argumentos
Parámetros de ruta
monitor_id [required]The id of the monitor
Cadenas de consulta
scopeThe scope to apply the mute to.
For example, if your alert is grouped by {host}, you might mute host:app1.
all_scopesClear muting across all scopes. Default is false.
Respuesta
OK
Object describing a monitor.
assetsThe list of monitor assets tied to a monitor, which represents key links for users to take action on monitor alerts (for example, runbooks).
category [required]Indicates the type of asset this entity represents on a monitor.
runbookname [required]Name for the monitor asset
resource_keyRepresents the identifier of the internal Datadog resource that this asset represents. IDs in this field should be passed in as strings.
resource_typeType of internal Datadog resource associated with a monitor asset.
notebookurl [required]URL link for the asset. For links with an internal resource type set, this should be the relative path to where the Datadog domain is appended internally. For external links, this should be the full URL path.
createdTimestamp of the monitor creation.
creatorObject describing the creator of the shared element.
emailEmail of the creator.
handleHandle of the creator.
nameName of the creator.
deletedWhether or not the monitor is deleted. (Always null)
draft_statusIndicates whether the monitor is in a draft or published state.
draft: The monitor appears as Draft and does not send notifications.
published: The monitor is active and evaluates conditions and notify as configured.
This field is in preview. The draft value is only available to customers with the feature enabled.
publisheddraft, publishedidID of this monitor.
matching_downtimesA list of active v1 downtimes that match this monitor.
endPOSIX timestamp to end the downtime.
id [required]The downtime ID.
scopeThe scope(s) to which the downtime applies. Must be in key:value format. For example, host:app2.
Provide multiple scopes as a comma-separated list like env:dev,env:prod.
The resulting downtime applies to sources that matches ALL provided scopes (env:dev AND env:prod).
startPOSIX timestamp to start the downtime.
messageA message to include with notifications for this monitor.
modifiedLast timestamp when the monitor was edited.
multiWhether or not the monitor is broken down on different groups.
nameThe monitor name.
optionsList of options associated with your monitor.
aggregationType of aggregation performed in the monitor query.
group_byGroup to break down the monitor on.
metricMetric name used in the monitor.
typeMetric type used in the monitor.
device_idsDEPRECATED IDs of the device the Synthetics monitor is running on.
enable_logs_sampleWhether or not to send a log sample when the log monitor triggers.
enable_samplesWhether or not to send a list of samples when the monitor triggers. This is only used by CI Test and Pipeline monitors.
escalation_messageWe recommend using the is_renotify,
block in the original message instead.
A message to include with a re-notification. Supports the @username notification we allow elsewhere.
Not applicable if renotify_interval is None.
evaluation_delayTime (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min),
the timeframe is set to last_5m and the time is 7:00, the monitor evaluates data from 6:50 to 6:55.
This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor always has data during evaluation.
group_retention_durationThe time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: "60m", "1h", and "2d". This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.
groupby_simple_monitorDEPRECATED Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold. Use notify_by instead.
include_tagsA Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title.
Examples
- If
True,[Triggered on {host:h1}] Monitor Title - If
False,[Triggered] Monitor Title
truelockedDEPRECATED Whether or not the monitor is locked (only editable by creator and admins). Use restricted_roles instead.
min_failure_durationHow long the test should be in failure before alerting (integer, number of seconds, max 7200).
0min_location_failedThe minimum number of locations in failure at the same time during
at least one moment in the min_failure_duration period (min_location_failed and min_failure_duration
are part of the advanced alerting rules - integer, >= 1).
1new_group_delayTime (in seconds) to skip evaluations for new groups.
For example, this option can be used to skip evaluations for new hosts while they initialize.
Must be a non negative integer.
new_host_delayDEPRECATED Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non negative integer.
Use new_group_delay instead.
300no_data_timeframeThe number of minutes before a monitor notifies after data stops reporting. Datadog recommends at least 2x the monitor timeframe for query alerts or 2 minutes for service checks. If omitted, 2x the evaluation timeframe is used for query alerts, and 24 hours is used for service checks.
notification_preset_nameToggles the display of additional content sent in the monitor notification.
show_allshow_all, hide_query, hide_handles, hide_all, hide_query_and_handles, show_only_snapshot, hide_handles_and_footernotify_auditA Boolean indicating whether tagged users is notified on changes to this monitor.
falsenotify_byControls what granularity a monitor alerts on. Only available for monitors with groupings.
For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each
new cluster violating the alert conditions by setting notify_by to ["cluster"]. Tags mentioned
in notify_by must be a subset of the grouping tags in the query.
For example, a query grouped by cluster and namespace cannot notify on region.
Setting notify_by to ["*"] configures the monitor to notify as a simple-alert.
notify_no_dataA Boolean indicating whether this monitor notifies when data stops reporting. Defaults to false.
on_missing_dataControls how groups or monitors are treated if an evaluation does not return any data points.
The default option results in different behavior depending on the monitor query type.
For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions.
For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status.
This option is available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.
It is also required for metric monitors that use scheduling_options.custom_schedule.
default, show_no_data, show_and_notify_no_data, resolverenotify_intervalThe number of minutes after the last notification before a monitor re-notifies on the current status. It only re-notifies if it’s not resolved.
nullrenotify_occurrencesThe number of times re-notification messages should be sent on the current status at the provided re-notification interval.
renotify_statusesThe types of monitor statuses for which re-notification messages are sent.
Default: null if renotify_interval is null.
If renotify_interval is set, defaults to renotify on Alert and No Data.
require_full_windowA Boolean indicating whether this monitor needs a full window of data before it’s evaluated.
We highly recommend you set this to false for sparse metrics,
otherwise some evaluations are skipped. Default is false. This setting only applies to
metric monitors.
scheduling_optionsConfiguration options for scheduling.
custom_scheduleConfiguration options for the custom schedule. This feature is in private beta.
recurrencesArray of custom schedule recurrences.
rruleDefines the recurrence rule (RRULE) for a given schedule.
startDefines the start date and time of the recurring schedule.
timezoneDefines the timezone the schedule runs on.
evaluation_windowConfiguration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.
day_startsThe time of the day at which a one day cumulative evaluation window starts.
hour_startsThe minute of the hour at which a one hour cumulative evaluation window starts.
month_startsThe day of the month at which a one month cumulative evaluation window starts.
timezoneThe timezone of the time of the day of the cumulative evaluation window start.
silencedDEPRECATED Information about the downtime applied to the monitor. Only shows v1 downtimes.
<any-key>UTC epoch timestamp in seconds when the downtime for the group expires.
synthetics_check_idDEPRECATED ID of the corresponding Synthetic check.
threshold_windowsAlerting time window options.
recovery_windowDescribes how long an anomalous metric must be normal before the alert recovers.
trigger_windowDescribes how long a metric must be anomalous before an alert triggers.
thresholdsList of the different monitor threshold available.
criticalThe monitor CRITICAL threshold.
critical_queryQuery evaluated as a dynamic CRITICAL threshold. Only supported on metric monitors with a formula query and options['variables']. Cannot be combined with static thresholds. This field is in preview.
critical_recoveryThe monitor CRITICAL recovery threshold.
critical_recovery_queryQuery evaluated as a dynamic CRITICAL recovery threshold. Only supported on metric monitors with a formula query and options['variables']. Cannot be combined with static thresholds. This field is in preview.
okThe monitor OK threshold.
unknownThe monitor UNKNOWN threshold.
warningThe monitor WARNING threshold.
warning_recoveryThe monitor WARNING recovery threshold.
timeout_hThe number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.
nullvariablesList of requests that can be used in the monitor query. This feature is currently in beta.
Object 1A formula and functions events query.
compute [required]Compute options.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgintervalA time interval in milliseconds.
metricMeasurable attribute to compute.
nameThe name assigned to this aggregation, when multiple aggregations are defined for a query.
sourceSource reference for composite query payloads.
data_source [required]Data source for event platform-based queries.
rum, ci_pipelines, ci_tests, audit, events, logs, spans, database_queries, network, network_pathgroup_byGroup by options.
facet [required]Event facet.
limitNumber of groups to return.
sortOptions for sorting group by results.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgmetricMetric used for sorting group by results.
orderDirection of sort.
descasc, descsourceSource reference for composite query payloads.
indexesAn array of index names to query in the stream. Omit or use [] to query all indexes at once.
name [required]Name of the query for use in formulas.
searchSearch options.
query [required]Events search string.
Object 2A formula and functions cost query.
aggregatorAggregation methods for metric queries.
avg, sum, max, min, last, area, l2norm, percentile, stddevdata_source [required]Data source for cost queries.
metrics, cloud_cost, datadog_usagename [required]Name of the query for use in formulas.
query [required]The monitor query.
Object 3A formula and functions data quality query.
data_source [required]Data source for data quality queries.
data_quality_metricsfilter [required]Filter expression used to match on data entities. Uses Aastra query syntax.
group_byOptional grouping fields for aggregation.
measure [required]The data quality measure to query. Common values include:
bytes, cardinality, custom, freshness, max, mean, min,
nullness, percent_negative, percent_zero, row_count, stddev,
sum, uniqueness. Additional values may be supported.
monitor_optionsMonitor configuration options for data quality queries.
crontab_overrideCrontab expression to override the default schedule.
custom_sqlCustom SQL query for the monitor.
custom_whereCustom WHERE clause for the query.
group_by_columnsColumns to group results by.
model_configurationTuning options for the anomaly detection model used by the monitor.
auto_resolve_daysNumber of days after which an open alert is automatically resolved. When unset, alerts stay open until the measure returns within bounds.
enable_flatline_detectionWhether to alert when the measure stops changing entirely.
Defaults to true.
functionFunction applied to the measure before it is compared against the predicted bounds.
DIFF, DIFF_PERCENTmin_lower_bound_sizeMinimum distance between the predicted value and the lower bound. Widening the lower bound to at least this size suppresses alerts on small downward deviations. When unset, no minimum is enforced.
min_upper_bound_sizeMinimum distance between the predicted value and the upper bound. Widening the upper bound to at least this size suppresses alerts on small upward deviations. When unset, no minimum is enforced.
model_bounds_overrideRestricts which predicted bound the monitor alerts on. UPPER_ONLY alerts only when
the measure rises above the upper bound, LOWER_ONLY only when it falls below the
lower bound. When unset, the monitor alerts on both.
UPPER_ONLY, LOWER_ONLYmodel_type_overrideOverride for the model type used in anomaly detection.
freshness, percentage, anysensitivitySensitivity of the anomaly detection model, expressed as a multiplier on the width
of the predicted bounds. Higher values widen the bounds and produce fewer alerts;
lower values tighten them and produce more alerts. Defaults to 3.0.
source_to_target_configConfiguration for a source to target monitor, which compares the same measure across two data entities and alerts on the difference between them.
diff_type [required]How the difference between the source and target measures is computed.
absolute subtracts the two values, diff_percent expresses the difference
as a percentage of the source value.
absolute, diff_percententity_type [required]Type of the data entities being compared.
source [required]Measure configuration for one side of a source to target comparison.
custom_sqlCustom SQL query used to compute the measure for this entity.
custom_whereCustom WHERE clause applied when computing the measure for this entity.
entity_id [required]Identifier of the data entity to measure.
entity_type [required]Type of the data entity to measure.
group_by_columnsColumns to group results by when computing the measure for this entity.
target [required]Measure configuration for one side of a source to target comparison.
custom_sqlCustom SQL query used to compute the measure for this entity.
custom_whereCustom WHERE clause applied when computing the measure for this entity.
entity_id [required]Identifier of the data entity to measure.
entity_type [required]Type of the data entity to measure.
group_by_columnsColumns to group results by when computing the measure for this entity.
name [required]Name of the query for use in formulas.
schema_versionSchema version for the data quality query.
scopeOptional scoping expression to further filter metrics. Uses metrics filter syntax. This is useful when an entity has been configured to emit metrics with additional tags.
Object 4A formula and functions data jobs query.
job_type [required]The type of job being monitored. Valid values include:
databricks.job, spark.application, airflow.dag,
dbt.job, dbt.model, dbt.test, glue.job.
Custom job types are supported with the custom.ol. prefix.
jobs_query [required]Filter expression used to select the jobs to monitor.
name [required]Name of the query for use in formulas. Must be run_query.
query_dialect [required]Query dialect for data jobs queries. Currently only metric is supported.
Object 5A formula and functions aggregate augmented query. Used to enrich base query results with data from a reference table.
augment_query [required]Augment query for aggregate augmented queries. Can be an events query or a reference table query.
Object 1A formula and functions events query.
compute [required]Compute options.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgintervalA time interval in milliseconds.
metricMeasurable attribute to compute.
nameThe name assigned to this aggregation, when multiple aggregations are defined for a query.
sourceSource reference for composite query payloads.
data_source [required]Data source for event platform-based queries.
rum, ci_pipelines, ci_tests, audit, events, logs, spans, database_queries, network, network_pathgroup_byGroup by options.
facet [required]Event facet.
limitNumber of groups to return.
sortOptions for sorting group by results.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgmetricMetric used for sorting group by results.
orderDirection of sort.
descasc, descsourceSource reference for composite query payloads.
indexesAn array of index names to query in the stream. Omit or use [] to query all indexes at once.
name [required]Name of the query for use in formulas.
searchSearch options.
query [required]Events search string.
<data_source=reference_table>A reference table query for use in aggregate queries.
columnsList of columns to retrieve from the reference table.
aliasOptional alias for the column.
name [required]Name of the column.
data_source [required]Data source for reference table queries.
reference_tablenameName of the query.
query_filterOptional filter expression for the reference table query.
table_name [required]Name of the reference table.
base_query [required]Base query for aggregate queries. Can be an events query or a metrics query.
Object 1A formula and functions events query.
compute [required]Compute options.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgintervalA time interval in milliseconds.
metricMeasurable attribute to compute.
nameThe name assigned to this aggregation, when multiple aggregations are defined for a query.
sourceSource reference for composite query payloads.
data_source [required]Data source for event platform-based queries.
rum, ci_pipelines, ci_tests, audit, events, logs, spans, database_queries, network, network_pathgroup_byGroup by options.
facet [required]Event facet.
limitNumber of groups to return.
sortOptions for sorting group by results.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgmetricMetric used for sorting group by results.
orderDirection of sort.
descasc, descsourceSource reference for composite query payloads.
indexesAn array of index names to query in the stream. Omit or use [] to query all indexes at once.
name [required]Name of the query for use in formulas.
searchSearch options.
query [required]Events search string.
Object 2A formula and functions metrics query for use in aggregate queries.
aggregatorAggregator for metrics queries.
avg, min, max, sum, last, mean, area, l2norm, percentile, stddevShow 1 more
count_uniquedata_source [required]Data source for metrics queries.
metrics, cloud_cost, datadog_usagenameName of the query for use in formulas.
query [required]The metrics query definition.
compute [required]Compute options for the query.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgintervalA time interval in milliseconds.
metricMeasurable attribute to compute.
nameThe name assigned to this aggregation, when multiple aggregations are defined for a query.
sourceSource reference for composite query payloads.
data_source [required]Data source for aggregate augmented queries.
aggregate_augmented_querygroup_by [required]Group by options for the query.
facet [required]Event facet.
limitNumber of groups to return.
sortOptions for sorting group by results.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgmetricMetric used for sorting group by results.
orderDirection of sort.
descasc, descsourceSource reference for composite query payloads.
join_condition [required]Join condition for aggregate augmented queries.
augment_attribute [required]Attribute from the augment query to join on.
base_attribute [required]Attribute from the base query to join on.
join_type [required]Join type for aggregate query join conditions.
inner, leftnameName of the query for use in formulas.
Object 6A formula and functions aggregate filtered query. Used to filter base query results using data from another source.
base_query [required]Base query for aggregate queries. Can be an events query or a metrics query.
Object 1A formula and functions events query.
compute [required]Compute options.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgintervalA time interval in milliseconds.
metricMeasurable attribute to compute.
nameThe name assigned to this aggregation, when multiple aggregations are defined for a query.
sourceSource reference for composite query payloads.
data_source [required]Data source for event platform-based queries.
rum, ci_pipelines, ci_tests, audit, events, logs, spans, database_queries, network, network_pathgroup_byGroup by options.
facet [required]Event facet.
limitNumber of groups to return.
sortOptions for sorting group by results.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgmetricMetric used for sorting group by results.
orderDirection of sort.
descasc, descsourceSource reference for composite query payloads.
indexesAn array of index names to query in the stream. Omit or use [] to query all indexes at once.
name [required]Name of the query for use in formulas.
searchSearch options.
query [required]Events search string.
Object 2A formula and functions metrics query for use in aggregate queries.
aggregatorAggregator for metrics queries.
avg, min, max, sum, last, mean, area, l2norm, percentile, stddevShow 1 more
count_uniquedata_source [required]Data source for metrics queries.
metrics, cloud_cost, datadog_usagenameName of the query for use in formulas.
query [required]The metrics query definition.
computeCompute options for the query.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgintervalA time interval in milliseconds.
metricMeasurable attribute to compute.
nameThe name assigned to this aggregation, when multiple aggregations are defined for a query.
sourceSource reference for composite query payloads.
data_source [required]Data source for aggregate filtered queries.
aggregate_filtered_queryfilter_query [required]Filter query for aggregate filtered queries. Can be an events query or a reference table query.
Object 1A formula and functions events query.
compute [required]Compute options.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgintervalA time interval in milliseconds.
metricMeasurable attribute to compute.
nameThe name assigned to this aggregation, when multiple aggregations are defined for a query.
sourceSource reference for composite query payloads.
data_source [required]Data source for event platform-based queries.
rum, ci_pipelines, ci_tests, audit, events, logs, spans, database_queries, network, network_pathgroup_byGroup by options.
facet [required]Event facet.
limitNumber of groups to return.
sortOptions for sorting group by results.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgmetricMetric used for sorting group by results.
orderDirection of sort.
descasc, descsourceSource reference for composite query payloads.
indexesAn array of index names to query in the stream. Omit or use [] to query all indexes at once.
name [required]Name of the query for use in formulas.
searchSearch options.
query [required]Events search string.
<data_source=reference_table>A reference table query for use in aggregate queries.
columnsList of columns to retrieve from the reference table.
aliasOptional alias for the column.
name [required]Name of the column.
data_source [required]Data source for reference table queries.
reference_tablenameName of the query.
query_filterOptional filter expression for the reference table query.
table_name [required]Name of the reference table.
filters [required]Filter conditions for the query.
base_attribute [required]Attribute from the base query to filter on.
excludeWhether to exclude matching records instead of including them.
falsefilter_attribute [required]Attribute from the filter query to match against.
group_byGroup by options for the query.
facet [required]Event facet.
limitNumber of groups to return.
sortOptions for sorting group by results.
aggregation [required]Aggregation methods for event platform queries.
count, cardinality, median, pc75, pc90, pc95, pc98, pc99, sum, minShow 2 more
max, avgmetricMetric used for sorting group by results.
orderDirection of sort.
descasc, descsourceSource reference for composite query payloads.
nameName of the query for use in formulas.
overall_stateThe different states your monitor can be in.
Alert, Ignored, No Data, OK, Skipped, Unknown, WarnpriorityInteger from 1 (high) to 5 (low) indicating alert severity.
query [required]The monitor query.
restricted_rolesA list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the Roles API and are located in the data.id field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. You can use the Restriction Policies API to manage write authorization for individual monitors by teams and users, in addition to roles.
stateWrapper object with the different monitor states.
groupsDictionary where the keys are groups (comma separated lists of tags) and the values are the list of groups your monitor is broken down on.
<any-key>Monitor state for a single group.
last_nodata_tsLatest timestamp the monitor was in NO_DATA state.
last_notified_tsLatest timestamp of the notification sent for this monitor group.
last_resolved_tsLatest timestamp the monitor group was resolved.
last_triggered_tsLatest timestamp the monitor group triggered.
nameThe name of the monitor.
statusThe different states your monitor can be in.
Alert, Ignored, No Data, OK, Skipped, Unknown, WarntagsTags associated to your monitor.
type [required]The type of the monitor. For more information about type, see the monitor options docs.
composite, event alert, log alert, metric alert, process alert, query alert, rum alert, service check, synthetics alert, trace-analytics alertShow 13 more
slo alert, event-v2 alert, audit alert, ci-pipelines alert, ci-tests alert, error-tracking alert, database-monitoring alert, network-performance alert, cost alert, data-quality alert, network-path alert, data-jobs alert, llm-observability alert{
"assets": [
{
"category": "runbook",
"name": "Monitor Runbook",
"resource_key": "12345",
"resource_type": "string",
"url": "/notebooks/12345"
}
],
"created": "2019-09-19T10:00:00.000Z",
"creator": {
"email": "string",
"handle": "string",
"name": "string"
},
"deleted": "2019-09-19T10:00:00.000Z",
"draft_status": "string",
"id": "integer",
"matching_downtimes": [
{
"end": 1412792983,
"id": 1625,
"scope": [
"env:staging"
],
"start": 1412792983
}
],
"message": "string",
"modified": "2019-09-19T10:00:00.000Z",
"multi": false,
"name": "My monitor",
"options": {
"aggregation": {
"group_by": "host",
"metric": "metrics.name",
"type": "count"
},
"device_ids": [],
"enable_logs_sample": false,
"enable_samples": false,
"escalation_message": "string",
"evaluation_delay": "integer",
"group_retention_duration": "string",
"groupby_simple_monitor": false,
"include_tags": false,
"locked": false,
"min_failure_duration": "integer",
"min_location_failed": "integer",
"new_group_delay": "integer",
"new_host_delay": "integer",
"no_data_timeframe": "integer",
"notification_preset_name": "string",
"notify_audit": false,
"notify_by": [],
"notify_no_data": false,
"on_missing_data": "string",
"renotify_interval": "integer",
"renotify_occurrences": "integer",
"renotify_statuses": [],
"require_full_window": false,
"scheduling_options": {
"custom_schedule": {
"recurrences": [
{
"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR",
"start": "2023-08-31T16:30:00",
"timezone": "Europe/Paris"
}
]
},
"evaluation_window": {
"day_starts": "04:00",
"hour_starts": 0,
"month_starts": 1,
"timezone": "Europe/Paris"
}
},
"silenced": {
"<any-key>": "integer"
},
"synthetics_check_id": "string",
"threshold_windows": {
"recovery_window": "string",
"trigger_window": "string"
},
"thresholds": {
"critical": "number",
"critical_query": "formula(\"2 * query1\").rollup(\"avg\").last(\"6mo\")",
"critical_recovery": "number",
"critical_recovery_query": "formula(\"1.5 * query1\").rollup(\"avg\").last(\"3mo\")",
"ok": "number",
"unknown": "number",
"warning": "number",
"warning_recovery": "number"
},
"timeout_h": "integer",
"variables": [
{
"compute": {
"aggregation": "avg",
"interval": 60000,
"metric": "@duration",
"name": "compute_result",
"source": "filter_query"
},
"data_source": "rum",
"group_by": [
{
"facet": "status",
"limit": 10,
"sort": {
"aggregation": "avg",
"metric": "string",
"order": "asc"
},
"source": "filter_query"
}
],
"indexes": [
"days-3",
"days-7"
],
"name": "query_errors",
"search": {
"query": "service:query"
}
}
]
},
"overall_state": "string",
"priority": "integer",
"query": "avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100",
"restricted_roles": [],
"state": {
"groups": {
"<any-key>": {
"last_nodata_ts": "integer",
"last_notified_ts": "integer",
"last_resolved_ts": "integer",
"last_triggered_ts": "integer",
"name": "string",
"status": "string"
}
}
},
"tags": [],
"type": "query alert"
}Bad Request
Error response object.
errors [required]Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Authentication error
Error response object.
errors [required]Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Monitor Not Found error
Error response object.
errors [required]Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Too many requests
Error response object.
errors [required]Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Ejemplo de código
# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export monitor_id="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/monitor/${monitor_id}/unmute" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"from datadog import initialize, api
options = {
'api_key': '<DATADOG_API_KEY>',
'app_key': '<DATADOG_APPLICATION_KEY>'
}
initialize(**options)
# Unmute all alerts
api.Monitor.unmute(2088)
Instructions
First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"DD_SITE="us3.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"DD_SITE="us5.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"DD_SITE="datadoghq.eu" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"DD_SITE="ap1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"DD_SITE="ap2.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"DD_SITE="uk1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"DD_SITE="ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"DD_SITE="us2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python "example.py"require 'dogapi'
api_key = '<DATADOG_API_KEY>'
app_key = '<DATADOG_APPLICATION_KEY>'
dog = Dogapi::Client.new(api_key, app_key)
# Unmute an alert
dog.unmute_monitor(62_628)
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"DD_SITE="us3.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"DD_SITE="us5.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"DD_SITE="datadoghq.eu" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"DD_SITE="ap1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"DD_SITE="ap2.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"DD_SITE="uk1.datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"DD_SITE="ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"DD_SITE="us2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"