An execution module that interacts with the Datadog API
The following parameters are required for all functions.
Full argument reference is available on the Datadog API reference page https://docs.datadoghq.com/api/
salt.modules.datadog_api.
cancel_downtime
(api_key=None, app_key=None, scope=None, id=None)¶Cancel a downtime by id or by scope.
CLI Example:
salt-call datadog.cancel_downtime scope='host:app01' \
api_key='0123456789' \
app_key='9876543210'`
Arguments - Either scope or id is required.
Parameters: |
|
---|
salt.modules.datadog_api.
post_event
(api_key=None, app_key=None, title=None, text=None, date_happened=None, priority=None, host=None, tags=None, alert_type=None, aggregation_key=None, source_type_name=None)¶Post an event to the Datadog stream.
CLI Example
salt-call datadog.post_event api_key='0123456789' \
app_key='9876543210' \
title='Salt Highstate' \
text="Salt highstate was run on $(salt-call grains.get id)" \
tags='["service:salt", "event:highstate"]'
Required arguments
Parameters: |
|
---|
Optional arguments
Parameters: |
|
---|
salt.modules.datadog_api.
schedule_downtime
(scope, api_key=None, app_key=None, monitor_id=None, start=None, end=None, message=None, recurrence=None, timezone=None, test=False)¶Schedule downtime for a scope of monitors.
CLI Example:
salt-call datadog.schedule_downtime 'host:app2' \
stop=$(date --date='30 minutes' +%s) \
app_key='0123456789' \
api_key='9876543210'
Optional arguments
Parameters: |
|
---|
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2018.3.2