View as Markdown
Datadog icon

Datadog ACTION

Search Hosts

Search monitored infrastructure hosts. Filter by tag (env:production), name (host:web-01), or partial match. Sort by cpu, iowait, load, status, or apps. Host names from results can scope queries in Get Metric Data (e.g. avg:system.cpu.user{host:web-01}), filter logs in Search Logs (host:web-01), or filter metrics in Search Metrics. Max 1000 results. See the docs
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Datadog account once, then configure and run Search Hosts from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "datadog-search-hosts",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    datadog: { authProvisionId: "apn_xxxxxxx" },
    region: "Region",
    filter: "Filter",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Search Hosts inputs
Property Type Description
region Region string
The regional site for a Datadog customer
Required
filter Filter string
Filter hosts by name, alias, or tag. E.g. env:production or host:web-01.
Optional
sortField Sort Field string
Field to sort hosts by.
Optional
sortDir Sort Direction string
Direction of sort.
Optional
count Count integer
Number of hosts to return. Max 1000.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
datadog-search-hosts
Version
1.0.2
App
Datadog
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes