Datadog

Learn how to use Datadog with Composio

Overview

SLUG: DATADOG

Description

Datadog offers monitoring, observability, and security for cloud-scale applications, unifying metrics, logs, and traces to help teams detect issues and optimize performance

Authentication Details

region
stringRequired
generic_api_key
stringRequired
generic_id
stringRequired

Connecting to Datadog

Create an auth config

Use the dashboard to create an auth config for the Datadog toolkit. This allows you to connect multiple Datadog accounts to Composio for agents to use.

1

Select App

Navigate to the Datadog toolkit page and click “Setup Integration”.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Integration”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4datadog_auth_config_id = "ac_YOUR_DATADOG_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": user_api_key}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Datadog for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, datadog_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Datadog toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["DATADOG"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Create Dashboard

Description

Create a dashboard in datadog. dashboards provide customizable visualizations for monitoring your infrastructure, applications, and business metrics in a unified view.

Action Parameters

description
string
is_read_only
boolean
layout_type
stringDefaults to ordered
notify_list
array
tags
array
template_variables
array
title
stringRequired
widgets
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create downtime

Description

Creates a new downtime in datadog to suppress alerts during maintenance windows or planned outages. useful for preventing false alarms during deployments or maintenance.

Action Parameters

end
integer
message
string
monitor_id
integer
monitor_tags
array
recurrence
object
scope
arrayRequired
start
integer
timezone
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create monitor

Description

Creates a new datadog monitor to track metrics, logs, or other data sources with configurable alerting thresholds and notifications.

Action Parameters

message
string
name
stringRequired
options
object
priority
integer
query
stringRequired
tags
array
type
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create SLO

Description

Create a service level objective (slo) in datadog. slos help you define and track reliability targets for your services, enabling data-driven decisions about service quality and reliability investments.

Action Parameters

description
string
groups
array
monitor_ids
array
name
stringRequired
query
object
tags
array
thresholds
arrayRequired
type
stringRequired

Action Response

data
object
error
string
errors
array
slo_id
string
success
booleanRequired
successful
booleanRequired

Tool Name: Create Synthetic API Test

Description

Create a synthetic api test in datadog. creates a new synthetic api test that continuously monitors api endpoints from multiple locations worldwide. useful for proactive monitoring of api uptime, performance, and functionality.

Action Parameters

config
objectRequired
message
string
name
stringRequired
options
objectRequired
status
stringDefaults to live
subtype
stringDefaults to http
tags
array
type
stringDefaults to api

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Webhook

Description

Create a webhook in datadog. webhooks enable you to receive notifications from datadog monitors and alerts to external services and applications.

Action Parameters

custom_headers
string
encode_as
stringDefaults to json
name
stringRequired
payload
string
url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Dashboard

Description

Delete a dashboard in datadog. permanently removes a dashboard from your organization. this action cannot be undone. use with caution.

Action Parameters

dashboard_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Dashboard

Description

Get a specific dashboard from datadog. retrieves detailed information about a dashboard including its widgets, layout, template variables, and metadata.

Action Parameters

dashboard_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Service Dependencies

Description

Get service dependency mapping from datadog apm. this action retrieves the dependency graph for a specific service, showing both upstream services (that call this service) and downstream services (that this service calls). it's essential for: - understanding the blast radius of service failures - identifying critical dependencies during incidents - analyzing service communication patterns - planning architectural changes - monitoring service health in context the dependency information includes call rates, error rates, and latency metrics to help assess the health of service relationships.

Action Parameters

end_time
integer
env
string
service
stringRequired
start_time
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Synthetics Locations

Description

Tool to retrieve all available public and private locations for synthetic tests in datadog. use when you need a list of location identifiers for creating or managing synthetic tests.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get host tags

Description

Retrieves all tags associated with a specific host in datadog. useful for understanding host metadata and organizing infrastructure.

Action Parameters

host_name
stringRequired
source
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Trace by ID

Description

Get detailed information about a specific trace by its id. this action retrieves comprehensive details about a distributed trace, including all spans, timing information, errors, and metadata. it's essential for: - deep diving into specific request flows during incidents - understanding the complete journey of a problematic request - analyzing performance bottlenecks in detail - correlating errors across services - debugging complex distributed system issues the trace id is typically obtained from logs, error reports, or trace search results.

Action Parameters

trace_id
stringRequired

Action Response

data
object
error
string
meta
object
successful
booleanRequired

Tool Name: List All Tags

Description

List all tags from datadog. tags help organize and filter your infrastructure and applications. this action shows all tags in use across your organization.

Action Parameters

source
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List API Keys

Description

List api keys in datadog. retrieves all api keys in the organization for security auditing, access management, and key rotation planning. helps maintain security posture by tracking key usage and ownership.

Action Parameters

filter_created_at_end
string
filter_created_at_start
string
filter_modified_at_end
string
filter_modified_at_start
string
page_number
integer
page_size
integer
sort
string

Action Response

data
array
error
string
meta
object
successful
booleanRequired
total_count
integerRequired

Tool Name: List APM Services

Description

List apm services from datadog. application performance monitoring (apm) provides deep visibility into your applications, helping you track performance, errors, and dependencies.

Action Parameters

end
integer
env
string
limit
integerDefaults to 50
service
string
start
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List AWS Integration

Description

List aws integrations in datadog. retrieves all configured aws account integrations, showing which aws accounts are monitored by datadog and their configuration settings. useful for cloud infrastructure management and ensuring comprehensive monitoring coverage.

Action Parameters

account_id
string
role_name
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Incidents

Description

List incidents from datadog. incident management helps you track, manage, and resolve incidents efficiently with comprehensive timeline and impact tracking.

Action Parameters

filter_query
string
include
string
page_offset
integer
page_size
integerDefaults to 25
sort
stringDefaults to -created

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Log Indexes

Description

Tool to retrieve a list of all log indexes configured in datadog. use when you need to get the names and configurations of log indexes.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List monitors

Description

Get all monitor details. this endpoint allows you to retrieve information about all monitors configured in your organization. you can filter by group states, name, tags, and use pagination to manage large result sets.

Action Parameters

group_states
array
id_offset
integer
monitor_tags
array
name
string
page
integer
page_size
integer
tags
array
with_downtimes
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Roles

Description

List roles from datadog organization. roles define sets of permissions that control what users can do within your datadog organization.

Action Parameters

filter_name
string
page_number
integer
page_size
integerDefaults to 10
sort
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List SLOs

Description

List service level objectives (slos) from datadog. service level objectives help you track the reliability and performance of your services by setting measurable targets for key metrics.

Action Parameters

limit
integerDefaults to 25
offset
integer
query
string
tags
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Synthetics Tests

Description

List synthetics tests from datadog. synthetics monitoring allows you to proactively monitor your applications and apis by simulating user interactions and api calls from various locations.

Action Parameters

limit
integerDefaults to 50
locations
string
offset
integer
tags
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Users

Description

List users from datadog organization. user management allows you to see team members, their roles, and access levels within your datadog organization.

Action Parameters

filter_status
string
page_number
integer
page_size
integerDefaults to 50
sort
string
sort_dir
stringDefaults to asc

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Webhooks

Description

List webhooks from datadog. webhooks allow you to send notifications to external services when monitors trigger, enabling integration with your workflows.

Action Parameters

limit
integerDefaults to 50

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Mute Monitor

Description

Mute a monitor in datadog. temporarily silences alerts from a monitor, which is useful during maintenance windows, deployments, or when investigating known issues to prevent alert fatigue.

Action Parameters

end
integer
monitor_id
integerRequired
override
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Query metrics

Description

Queries datadog metrics and returns time series data. useful for retrieving historical metric data, creating custom dashboards, or building reports.

Action Parameters

from_timestamp
integerRequired
query
stringRequired
to_timestamp
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Search logs

Description

Searches datadog logs with advanced filtering capabilities. important notes: - sort parameter is not supported by the datadog logs api and will cause errors - time parameters must be in milliseconds (13-digit unix timestamps) - limit parameter is passed as string to the api - log content is nested under 'content' field in api response useful for troubleshooting, monitoring application behavior, and analyzing log patterns.

Action Parameters

index
string
limit
integer
query
stringRequired
start_at
string
time_from
integerRequired
time_to
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Search Spans Analytics

Description

Search and analyze span data with aggregations in datadog. this action uses the datadog spans analytics api to perform advanced queries and aggregations on trace span data. it's essential for: - analyzing error rates and latency patterns - understanding service dependencies and bottlenecks - root cause analysis during incidents - performance monitoring and optimization the api supports complex queries with grouping, filtering, and various aggregation functions similar to log analytics.

Action Parameters

compute
array
filter
objectRequired
group_by
array
options
object
page
object

Action Response

buckets
array
data
object
error
string
meta
object
successful
booleanRequired
total_count
integer

Tool Name: Search Traces

Description

Search for traces in datadog apm. this action allows you to search for distributed traces across your services. it's essential for: - finding specific request flows during incident investigation - analyzing performance bottlenecks across services - understanding error propagation through your system - correlating user requests with backend operations traces provide the complete picture of a request as it travels through your distributed system, making them crucial for root cause analysis.

Action Parameters

filter
objectRequired
options
object
page
object
sort
object

Action Response

data
array
error
string
links
object
meta
object
successful
booleanRequired
total_count
integer

Tool Name: Submit metrics

Description

Submits custom metrics to datadog. useful for sending application-specific metrics, business kpis, or custom performance indicators.

Action Parameters

series
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Unmute Monitor

Description

Unmute a monitor in datadog. re-enables alerts from a previously muted monitor, returning it to normal monitoring and alerting behavior. use this after maintenance windows or issue resolution to resume monitoring.

Action Parameters

all_scopes
boolean
monitor_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Dashboard

Description

Update a dashboard in datadog. updates an existing dashboard with new configuration, widgets, or layout while preserving its identity and creation metadata.

Action Parameters

dashboard_id
stringRequired
description
string
is_read_only
boolean
layout_type
string
notify_list
array
tags
array
template_variables
array
title
string
widgets
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create event

Description

Creates a new event in datadog. events are useful for tracking deployments, outages, configuration changes, and other important occurrences.

Action Parameters

aggregation_key
string
alert_type
string
date_happened
integer
device_name
string
host
string
priority
string
source_type_name
string
tags
array
text
stringRequired
title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete monitor

Description

Deletes a datadog monitor permanently. use with caution as this action cannot be undone.

Action Parameters

force
boolean
monitor_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get monitor

Description

Retrieves detailed information about a specific datadog monitor, including its current state, configuration, and any active downtimes.

Action Parameters

group_states
array
monitor_id
integerRequired
with_downtimes
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get usage summary

Description

Retrieves usage summary information from datadog including api calls, hosts, containers, and other billable usage metrics. useful for cost monitoring and usage analysis.

Action Parameters

end_month
string
include_org_details
boolean
start_month
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List dashboards

Description

Lists all datadog dashboards with basic information. useful for dashboard management and getting an overview of available dashboards.

Action Parameters

filter_deleted
boolean
filter_shared
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List events

Description

Lists events from datadog within a specified time range. events track important occurrences like deployments, outages, and configuration changes.

Action Parameters

end
integerRequired
exclude_aggregate
boolean
page
integer
priority
string
sources
string
start
integerRequired
tags
array
unaggregated
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List hosts

Description

Lists all hosts in your datadog infrastructure with detailed information including metrics, tags, and status. useful for infrastructure monitoring and management.

Action Parameters

count
integer
filter
string
from_timestamp
integer
include_hosts_metadata
boolean
include_muted_hosts_data
boolean
sort_dir
string
sort_field
string
start
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List service checks

Description

Lists service checks from datadog. service checks are status checks that track the health of your services and infrastructure components.

Action Parameters

check
string
end
integer
start
integer
status
string
tags
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update host tags

Description

Updates tags for a specific host in datadog. this replaces all existing tags from the specified source with the new tags provided.

Action Parameters

host_name
stringRequired
source
string
tags
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update monitor

Description

Updates an existing datadog monitor with new configuration, thresholds, or notification settings. only specified fields will be updated.

Action Parameters

message
string
monitor_id
integerRequired
name
string
options
object
priority
integer
query
string
tags
array
type
string

Action Response

data
objectRequired
error
string
successful
booleanRequired