Datadog
57 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 notes for more information on datadog https //docs datadoghq com/api/?lang=bash#api reference https //docs datadoghq com/integrations/faq/list of api source attribute value/ 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 optional 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 optional the event title input example {"aggregation key" "string","alert type" "string","date happened" 123,"device name" "example name","host" "string","priority" "string","related event id" 123,"source type name" "example name","tags" \["string"],"text" "string","title" "string"} 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 event id number integer id of the event event alert type string if an alert event is enabled, set its type for example, error, warning, info, success, user update, recommendation, and snapshot event device name string a device name event host string host name to associate with the event any tags associated with the host are also applied to this event event payload string payload of the event event source type name string the type of event being posted option examples include nagios, hudson, jenkins, my apps, chef, puppet, git, bitbucket, etc 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 event title string the event title 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 %%% event 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 event handle object output field event handle event priority string the priority of the event for example, normal or low allowed enum values are normal,low event related event id number unique identifier event tags array a list of tags to apply to the event event url string url of the event output example {"status" "active","event" {"id" 123,"alert type" "string","device name" "example name","host" "string","payload" "string","source type name" "example name","id str" "string","title" "string","text" "string","date happened" 123,"handle" {},"priority" "string","related event id" 123,"tags" \["string"],"url" "https //example com/api/resource"}} 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 path parameters host name string required this endpoint allows you to add new tags to a host, optionally specifying where the tags came from parameters 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 input example {"path parameters" {"host name" "example name"},"parameters" {"source" "string"},"host" "string","tags" \["string"]} 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 output example {"host" "string","tags" \["string"]} 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 path parameters host name string required this endpoint allows you to remove all user assigned tags for a single host parameters source string optional the source of the tags (for example chef, puppet) input example {"parameters" {"source" "jenkins"},"path parameters" {"host name" "test"}} output parameter type description status code number http status code of the response reason string response reason phrase output 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 path parameters event id string required the id of the event input example {"path parameters" {"event id" "00000000 0000 0000 1234 000000000000"}} output parameter type description status code number http status code of the response reason string response reason phrase json data object response data json data event object object representing an event json data 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 json data event 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 json data event device name string a device name json data event host string host name to associate with the event any tags associated with the host are also applied to this event json data event id string integer id of the event json data 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 json data event payload string payload of the event json data event priority string the priority of the event for example, normal or low allowed enum values are normal,low json data event source type name string the type of event being posted option examples include nagios, hudson, jenkins, my apps, chef, puppet, git, bitbucket, etc json data event tags array a list of tags to apply to the event json data 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 %%% json data event title string the event title json data event url string url of the event json data status string a status output 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 i 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 path parameters host name string required when specified, filters list of tags to those tags with the specified source parameters source string optional source to filter input example {"parameters" {"source" "jenkins"},"path parameters" {"host name" "test"}} 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 output 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" \["role\ database","team\ infra","re get metric metadata gget metadata about a specific metric endpoint url api/v1/metrics/{{metric name}} method get input argument name type required description path parameters metric name string required name of the metric for which to get metadata input example {"path parameters" {"metric name" "datadog agent python version"}} 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 output 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 met 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 parameters from number required seconds since the unix epoch parameters host string optional hostname for filtering the list of metrics returned if set, metrics retrieved are those with the corresponding hostname tag parameters 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 input example {"parameters" {"from" 6235723,"host" "test","tag filter" "tags"}} 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 output 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 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 parameters start number required posix timestamp parameters end number required posix timestamp parameters priority string optional priority of your events, either low or normal allowed enum values are normal, low parameters sources string optional a comma separated string of sources parameters tags string optional a comma separated list indicating what tags, if any, should be used to filter the list of events parameters 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 parameters 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 parameters 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 input example {"parameters" {"start" 123,"end" 123,"priority" "string","sources" "string","tags" "string","unaggregated"\ true,"exclude aggregate"\ true,"page" 123}} 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 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 events 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 events device name string a device name events host string host name to associate with the event any tags associated with the host are also applied to this event events id string integer id of the event events 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 events payload string payload of the event events priority string the priority of the event for example, normal or low allowed enum values are normal,low events source type name string the type of event being posted option examples include nagios, hudson, jenkins, my apps, chef, puppet, git, bitbucket, etc events tags array a list of tags to apply to the event events 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 %%% events title string the event title events url string url of the event output 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 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 parameters source string optional when specified, filters host list to those tags with the specified source input example {"parameters" {"source" "source host"}} 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 tags \<any key> array a list of additional properties for tags output 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" {"\<any key>" \[]}}} 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 parameters q string required parameters for the search metrics action input example {"parameters" {"q" "metrics\ datadog agent python version"}} output parameter type description status code number http status code of the response reason string response reason phrase results object search result results metrics array list of metrics that match the search query output 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 transpor 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 path parameters host name string required parameters for the update host tags action parameters 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 input example {"parameters" {"source" "jenkins"},"json body" {"host" "test host","tags" \["environment\ production"]},"path parameters" {"host name" "test"}} 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 output 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" \["environment\ production"]}} update metric metadata edit metadata of a specific metric endpoint url api/v1/metrics/{{metric name}} method put input argument name type required description path parameters 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 input example {"json body" {"description" "python version","per unit" "second","short name" "py version","statsd interval" 65777565675,"type" "gauge","unit" "byte"},"path parameters" {"metric name" "datadog agent python version"}} 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 output 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 me 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 14 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 content type the media type of the resource text/html date the date and time at which the message was originated thu, 07 sep 2023 09 21 26 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 6000 x ratelimit name http response header x ratelimit name v1 get metric metadata x ratelimit period http response header x ratelimit period 60 x ratelimit remaining the number of requests remaining in the current rate limit window 11999 x ratelimit reset the time at which the current rate limit window resets 15