Datadog integration
In short
Query metrics and logs, read monitors and dashboards, post events. Connect it on the Integrations page; your app then calls Datadog through Sapilon without ever holding a Datadog credential.
Lets your app query metrics, search logs, read monitors, dashboards and incidents, and post events to your Datadog organisation.
Connecting
On the Integrations page choose Connect on Datadog and fill in:
- Site — Your Datadog site: datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com or ddog-gov.com.
- API key — Organization settings → API keys.
- Application key — Organization settings → Application keys → New key. Scope it to what the app needs.
Sapilon checks the key with the provider before it saves it, and stores it encrypted; it is never shown again.
What your app can do
Only these requests are available; anything else is refused.
GET /api/v1/orgGET /api/v1/queryPOST /api/v2/logs/events/searchGET /api/v1/monitorGET /api/v1/monitor/*GET /api/v1/dashboardGET /api/v1/dashboard/*GET /api/v2/incidentsPOST /api/v1/events
How the agent uses it
Use integrations.request('datadog', …); paths are relative to https://api.<site>.
GET /api/v1/query— metrics. Example:{ method: 'GET', path: '/api/v1/query', query: { from: '1760600000', to: '1760603600', query: 'avg:system.cpu.user{env:prod}' } }(Unix seconds).POST /api/v2/logs/events/search—body: { filter: { query: 'service:checkout status:error', from: 'now-15m', to: 'now' }, page: { limit: 50 } }.GET /api/v1/monitor(query: { monitor_tags: 'team:shop' }),GET /api/v1/monitor/{id}—overall_stateisOK,WarnorAlert.GET /api/v1/dashboard,GET /api/v1/dashboard/{id};GET /api/v2/incidents;GET /api/v1/org.POST /api/v1/events—body: { title: 'Deployed 1.4', text: 'by the app', tags: ['env:prod'] }.
Muting, editing or deleting is not allowed.
More from Datadog: https://docs.datadoghq.com/api/latest/