from datadog import initialize, api options = { 'api_key': 'api_key', 'app_key': 'app_key', 'thresholds': {'critical': 100, 'warning': 80} } initialize(**options) resp = api.Monitor.create( type="metric alert", query="avg(last_1h):sum:system.net.bytes_rcvd{*} > 100", name="Bytes received on host1", message="We may need to add web hosts if this is consistently high.", tags=['test'], options=options ) print resp