Datadog
56 min
the datadog connector integrates with swimlane to monitor cloud scale applications, including monitoring servers, databases, tools, and services through the datadog saas platform prerequisites the datadog connector requires both an api key and an application key api key in order to obtain the api key, login to datadog and go to the api tab and click api keys then create api key you may also name your key application key in order to obtain the application key, login to datadog and go to the api tab and click application keys then create api key you may also name your key capabilities this connector provides the following capabilities create events list events get events create host tag get host tag list tags update host tags delete host tags get metric metadata search metrics update metric metadata list active metrics limitations currently no limitations on the datadog integration and api asset setup datadog requires both an api key and an application key for full access to datadog's programmatic api thus without both keys this integration will not connect successfully task setup get event in order to get target event id you can use the query events task query events start and end fields can take date/time inputs (ex 2020 03 12t00 00 00z ) according to iso8601 configurations api key authentication authenticates using an api key configuration parameters parameter description type required url a url to the target host string required dd api key api key string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional dd application key application key string optional actions create event this endpoint allows you to post events to the stream tag them, set priority and event aggregate them with other events endpoint url api/v1/events method post input argument name type required description aggregation key string optional an arbitrary string to use for aggregation limited to 100 characters if you specify a key, all events using that key are grouped together in the event stream alert type string optional if an alert event is enabled, set its type for example, error, warning, info, success, user update, recommendation, and snapshot date happened number optional posix timestamp of the event must be sent as an integer (that is no quotes) limited to events no older than 18 hours device name string optional a device name host string optional host name to associate with the event any tags associated with the host are also applied to this event priority string optional the priority of the event allowed enum values are normal,low related event id number optional id of the parent event must be sent as an integer (that is no quotes) source type name string optional the type of event being posted option examples include nagios, hudson, jenkins, my apps, chef, puppet, git, bitbucket, etc tags array optional a list of tags to apply to the event text string required the body of the event limited to 4000 characters the text supports markdown to use markdown in the event text, start the text block with %%% \n and end the text block with \n %%% title string required the event title output parameter type description status code number http status code of the response reason string response reason phrase status string a status event object object representing an event id number integer id of the event alert type string if an alert event is enabled, set its type for example, error, warning, info, success, user update, recommendation, and snapshot device name string a device name host string host name to associate with the event any tags associated with the host are also applied to this event payload string payload of the event source type name string the type of event being posted option examples include nagios, hudson, jenkins, my apps, chef, puppet, git, bitbucket, etc id str string handling ids as large 64 bit numbers can cause loss of accuracy issues with some programming languages instead, use the string representation of the event id to avoid losing accuracy title string the event title text string the body of the event limited to 4000 characters the text supports markdown to use markdown in the event text, start the text block with %%% \n and end the text block with \n %%% date happened number posix timestamp of the event must be sent as an integer (that is no quotes) limited to events no older than 18 hours handle object output field handle priority string the priority of the event for example, normal or low allowed enum values are normal,low related event id number unique identifier tags array a list of tags to apply to the event url string url of the event example \[ { "status code" 200, "response headers" { "content type" "application/json", "date" "thu, 01 jan 2024 00 00 00 gmt" }, "reason" "ok", "json body" { "status" "active", "event" {} } } ] create host tag this endpoint allows you to add new tags to a host, optionally specifying where these tags come from endpoint url api/v1/tags/hosts/{{host name}} method post input argument name type required description host name string required this endpoint allows you to add new tags to a host, optionally specifying where the tags came from source string optional the source of the tags host string optional your host name tags array optional a list of tags to apply to the host output parameter type description status code number http status code of the response reason string response reason phrase host string your host name tags array a list of tags to apply to the host example \[ { "status code" 200, "response headers" { "content type" "application/json", "date" "thu, 01 jan 2024 00 00 00 gmt" }, "reason" "ok", "json body" { "host" "string", "tags" \[] } } ] delete host tags this endpoint allows you to remove all user assigned tags for a single host endpoint url api/v1/tags/hosts/{{host name}} method delete input argument name type required description host name string required this endpoint allows you to remove all user assigned tags for a single host source string optional the source of the tags (for example chef, puppet) output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 204, "response headers" { "date" "tue, 05 sep 2023 13 02 46 gmt", "content type" "application/json", "content length" "12", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok" } ] get event this endpoint allows you to query for event details endpoint url api/v1/events/{{event id}} method get input argument name type required description event id string required the id of the event output parameter type description status code number http status code of the response reason string response reason phrase json data object response data event object object representing an event alert type string if an alert event is enabled, set its type for example, error, warning, info, success, user update, recommendation, and snapshot allowed enum values are error,warning,info,success,user update,recommendation,snapshot date happened string posix timestamp of the event must be sent as an integer (that is no quotes) limited to events no older than 18 hours device name string a device name host string host name to associate with the event any tags associated with the host are also applied to this event id string integer id of the event id str string handling ids as large 64 bit numbers can cause loss of accuracy issues with some programming languages instead, use the string representation of the event id to avoid losing accuracy payload string payload of the event priority string the priority of the event for example, normal or low allowed enum values are normal,low source type name string the type of event being posted option examples include nagios, hudson, jenkins, my apps, chef, puppet, git, bitbucket, etc tags array a list of tags to apply to the event text string the body of the event limited to 4000 characters the text supports markdown to use markdown in the event text, start the text block with %%% \n and end the text block with \n %%% title string the event title url string url of the event status string a status example \[ { "status code" 200, "response headers" { "date" "thu, 07 sep 2023 09 21 26 gmt", "content type" "text/html", "transfer encoding" "chunked", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "vary" "accept encoding", "content encoding" "gzip", "x ratelimit limit" "12000", "x ratelimit period" "60", "x ratelimit remaining" "11999", "x ratelimit reset" "34", "x ratelimit name" "event get by id", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json data" { "event" {}, "status" "string" } } ] get host tags return the list of tags that apply to a given host endpoint url api/v1/tags/hosts/{{host name}} method get input argument name type required description host name string required when specified, filters list of tags to those tags with the specified source source string optional source to filter output parameter type description status code number http status code of the response reason string response reason phrase host string your host name tags array a list of tags to apply to the host example \[ { "status code" 200, "response headers" { "date" "tue, 05 sep 2023 13 02 46 gmt", "content type" "application/json", "content length" "12", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json body" { "host" "testhost2", "tags" \[] } } ] get metric metadata gget metadata about a specific metric endpoint url api/v1/metrics/{{metric name}} method get input argument name type required description metric name string required name of the metric for which to get metadata output parameter type description status code number http status code of the response reason string response reason phrase description string metric description short name string a more human readable and abbreviated version of the metric name type string metric type such as gauge or rate unit string primary unit of the metric such as byte or operation per unit string per unit of the metric such as second in bytes per second statsd interval number statsd flush interval of the metric in seconds if applicable integration string name of the integration that sent the metric if applicable example \[ { "status code" 200, "response headers" { "date" "wed, 06 sep 2023 10 44 59 gmt", "content type" "application/json", "transfer encoding" "chunked", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "vary" "accept encoding", "content encoding" "gzip", "x ratelimit limit" "6000", "x ratelimit period" "60", "x ratelimit remaining" "5999", "x ratelimit reset" "1", "x ratelimit name" "v1 get metric metadata", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json body" { "description" "description of the metrics", "short name" "py version", "type" "gauge", "unit" "byte", "per unit" "second", "statsd interval" 675765756, "integration" "agent metrics" } } ] list active metrics get the list of actively reporting metrics from a given time until now this endpoint requires the metrics read authorization scope endpoint url api/v1/metrics method get input argument name type required description from number required seconds since the unix epoch host string optional hostname for filtering the list of metrics returned if set, metrics retrieved are those with the corresponding hostname tag tag filter string optional filter metrics that have been submitted with the given tags supports boolean and wildcard expressions cannot be combined with other filters output parameter type description status code number http status code of the response reason string response reason phrase metrics array list of metric names from string time when the metrics were active, seconds since the unix epoch example \[ { "status code" 200, "response headers" { "date" "tue, 05 sep 2023 13 59 23 gmt", "content type" "application/json", "transfer encoding" "chunked", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "vary" "accept encoding", "content encoding" "gzip", "x ratelimit limit" "100", "x ratelimit period" "60", "x ratelimit remaining" "99", "x ratelimit reset" "37", "x ratelimit name" "metrics list", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json body" { "host" "test", "metrics" \[], "from" "6235723" } } ] list event the event stream can be queried and filtered by time, priority, sources and tags endpoint url api/v1/events method get input argument name type required description start number required posix timestamp end number required posix timestamp priority string optional priority of your events, either low or normal allowed enum values are normal, low sources string optional a comma separated string of sources tags string optional a comma separated list indicating what tags, if any, should be used to filter the list of events unaggregated boolean optional set unaggregated to true to return all events within the specified \[start,end] timeframe otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, it won’t be available in the output aggregated events with is aggregate=true in the response will still be returned unless exclude aggregate is set to true exclude aggregate boolean optional set exclude aggregate to true to only return unaggregated events where is aggregate=false in the response if the exclude aggregate parameter is set to true, then the unaggregated parameter is ignored and will be true by default page number optional by default 1000 results are returned per request set page to the number of the page to return with 0 being the first page the page parameter can only be used when either unaggregated or exclude aggregate is set to true output parameter type description status code number http status code of the response reason string response reason phrase status string a status events array an array of events alert type string if an alert event is enabled, set its type for example, error, warning, info, success, user update, recommendation, and snapshot allowed enum values are error,warning,info,success,user update,recommendation,snapshot date happened number posix timestamp of the event must be sent as an integer (that is no quotes) limited to events no older than 18 hours device name string a device name host string host name to associate with the event any tags associated with the host are also applied to this event id string integer id of the event id str string handling ids as large 64 bit numbers can cause loss of accuracy issues with some programming languages instead, use the string representation of the event id to avoid losing accuracy payload string payload of the event priority string the priority of the event for example, normal or low allowed enum values are normal,low source type name string the type of event being posted option examples include nagios, hudson, jenkins, my apps, chef, puppet, git, bitbucket, etc tags array a list of tags to apply to the event text string the body of the event limited to 4000 characters the text supports markdown to use markdown in the event text, start the text block with %%% \n and end the text block with \n %%% title string the event title url string url of the event example \[ { "status code" 200, "response headers" { "date" "mon, 04 sep 2023 17 40 53 gmt", "content type" "application/json", "content length" "14", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "x ratelimit limit" "600", "x ratelimit period" "60", "x ratelimit remaining" "599", "x ratelimit reset" "7", "x ratelimit name" "event stream api", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json body" { "events" \[] } } ] list tags return a mapping of tags to hosts for your whole infrastructure endpoint url api/v1/tags/hosts method get input argument name type required description source string optional when specified, filters host list to those tags with the specified source output parameter type description status code number http status code of the response reason string response reason phrase tags object a list of tags to apply to the host \<any key> array a list of additional properties for tags example \[ { "status code" 200, "response headers" { "date" "tue, 05 sep 2023 13 02 46 gmt", "content type" "application/json", "content length" "12", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json body" { "tags" {} } } ] search metrics search for metrics from the last 24 hours in datadog endpoint url api/v1/search method get input argument name type required description q string required parameter for search metrics output parameter type description status code number http status code of the response reason string response reason phrase results object search result metrics array list of metrics that match the search query example \[ { "status code" 200, "response headers" { "date" "tue, 05 sep 2023 14 09 14 gmt", "content type" "application/json", "content length" "27", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "x ratelimit limit" "12000", "x ratelimit period" "60", "x ratelimit remaining" "11999", "x ratelimit reset" "46", "x ratelimit name" "ci dog search", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json body" { "results" {} } } ] update host tags this endpoint allows you to update/replace all tags in an integration source with those supplied in the request endpoint url api/v1/tags/hosts/{{host name}} method put input argument name type required description host name string required name of the resource source string optional the source of the tags (for example chef, puppet) host string optional your host name tags array optional a list of tags to apply to the host output parameter type description status code number http status code of the response reason string response reason phrase host string your host name tags array a list of tags to apply to the host example \[ { "status code" 200, "response headers" { "date" "tue, 05 sep 2023 13 02 46 gmt", "content type" "application/json", "content length" "12", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json body" { "host" "test host", "tags" \[] } } ] update metric metadata edit metadata of a specific metric endpoint url api/v1/metrics/{{metric name}} method put input argument name type required description metric name string required name of the metric for which to edit metadata description string optional metric description per unit string optional per unit of the metric such as second in bytes per second short name string optional a more human readable and abbreviated version of the metric name statsd interval number optional statsd flush interval of the metric in seconds if applicable type string optional metric type such as gauge or rate unit string optional primary unit of the metric such as byte or operation output parameter type description status code number http status code of the response reason string response reason phrase description string metric description integration string name of the integration that sent the metric if applicable per unit string per unit of the metric such as second in bytes per second short name string a more human readable and abbreviated version of the metric name statsd interval number statsd flush interval of the metric in seconds if applicable type string metric type such as gauge or rate unit string primary unit of the metric such as byte or operation example \[ { "status code" 200, "response headers" { "date" "wed, 06 sep 2023 17 26 45 gmt", "content type" "application/json", "transfer encoding" "chunked", "connection" "keep alive", "x frame options" "sameorigin", "content security policy" "frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api ", "vary" "accept encoding", "content encoding" "gzip", "x ratelimit limit" "2000", "x ratelimit period" "60", "x ratelimit remaining" "1999", "x ratelimit reset" "15", "x ratelimit name" "update metric metadata", "x content type options" "nosniff", "strict transport security" "max age=31536000; includesubdomains; preload" }, "reason" "ok", "json body" { "description" "string", "integration" "string", "per unit" "second", "short name" "string", "statsd interval" 7668688, "type" "count", "unit" "byte" } } ] response headers header description example connection http response header connection keep alive content encoding http response header content encoding gzip content length the length of the response body in bytes 27 content security policy http response header content security policy frame ancestors 'self'; report uri https //logs browser intake datadoghq com/api/v2/logs?dd api key=pube4f163c23bbf91c16b8f57f56af9fc58\&dd evp origin=content security policy\&ddsource=csp report\&ddtags=site%3adatadoghq com https //logs browser intake datadoghq com/api/v2/logs?dd api key=pube4f163c23bbf91c16b8f57f56af9fc58\&dd evp origin=content security policy\&ddsource=csp report\&ddtags=site%3adatadoghq com content type the media type of the resource application/json date the date and time at which the message was originated tue, 05 sep 2023 14 09 14 gmt strict transport security http response header strict transport security max age=31536000; includesubdomains; preload transfer encoding http response header transfer encoding chunked vary http response header vary accept encoding x content type options http response header x content type options nosniff x frame options http response header x frame options sameorigin x ratelimit limit the number of requests allowed in the current rate limit window 100 x ratelimit name http response header x ratelimit name event get by id x ratelimit period http response header x ratelimit period 60 x ratelimit remaining the number of requests remaining in the current rate limit window 599 x ratelimit reset the time at which the current rate limit window resets 46 notes for more information on datadog datadog api documentation https //docs datadoghq com/api/?lang=bash#api reference complete list of source attribute values https //docs datadoghq com/integrations/faq/list of api source attribute value/