diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 96bcf5becc27..3093b31a0a0e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -96597,7 +96597,9 @@ components: x-enum-varnames: - PROCESS ProcessScalarQuery: - description: A query for host-level process metrics such as CPU and memory usage. + description: |- + Per-process metrics from Live Processes. Queries without `aggregator` fail. To scope to one process, + set `tag_filters` to its `identifying_tags` from `GET /api/v2/processes`. properties: aggregator: $ref: "#/components/schemas/MetricsAggregator" @@ -96609,11 +96611,15 @@ components: description: Whether CPU metrics should be normalized by core count. type: boolean limit: - description: Maximum number of results to return. + description: |- + Maximum number of processes or groups to return. Large values can fail with an `Unprocessable + Content` error. If so, retry with a smaller limit. format: int64 type: integer metric: - description: The process metric to query. + description: |- + The process metric to query, such as `process.stat.cpu.total_pct`, `process.stat.memory.rss`, or + `process.stat.memory.vms`. example: process.stat.cpu.total_pct type: string name: @@ -96623,7 +96629,9 @@ components: sort: $ref: "#/components/schemas/QuerySortOrder" tag_filters: - description: Tag filters to narrow down processes. + description: |- + Tags to narrow down processes. To scope to one process, use its `identifying_tags` from + `GET /api/v2/processes`, for example `host:web-01` and `pid:1234`. items: description: A tag filter value. example: "env:prod" @@ -96735,7 +96743,9 @@ components: x-enum-varnames: - PROCESS ProcessTimeseriesQuery: - description: A query for host-level process metrics such as CPU and memory usage. + description: |- + Per-process metrics from Live Processes over time, such as CPU and memory usage. To scope to one + process, set `tag_filters` to its `identifying_tags` from `GET /api/v2/processes`. properties: cross_org_uuids: $ref: "#/components/schemas/CrossOrgUuids" @@ -96745,11 +96755,15 @@ components: description: Whether CPU metrics should be normalized by core count. type: boolean limit: - description: Maximum number of results to return. + description: |- + Maximum number of processes or groups to return. Large values can fail with an `Unprocessable + Content` error. If so, retry with a smaller limit. format: int64 type: integer metric: - description: The process metric to query. + description: |- + The process metric to query, such as `process.stat.cpu.total_pct`, `process.stat.memory.rss`, or + `process.stat.memory.vms`. example: process.stat.cpu.total_pct type: string name: @@ -96759,7 +96773,9 @@ components: sort: $ref: "#/components/schemas/QuerySortOrder" tag_filters: - description: Tag filters to narrow down processes. + description: |- + Tags to narrow down processes. To scope to one process, use its `identifying_tags` from + `GET /api/v2/processes`, for example `host:web-01` and `pid:1234`. items: description: A tag filter value. example: "env:prod" @@ -210901,16 +210917,28 @@ paths: - dashboards_write /api/v2/processes: get: - description: Get all processes for your organization. + description: |- + Get processes collected by Live Processes for your organization. One request covers a window of + at most 1 hour that starts within the past 36 hours. To cover a longer period, make one request + per hour. Older data is not available from this endpoint. + + When a process includes `identifying_tags`, pass them as `tag_filters` in a `process` data source + query to `/api/v2/query/scalar` or `/api/v2/query/timeseries` to get CPU or memory metrics for that + one process. If absent, don't substitute an empty filter, which would query all processes. operationId: ListProcesses parameters: - - description: String to search processes by. + - description: |- + Free-text search over process fields such as the executable and user. When it contains several + words, a process must match all of them. Use `tags` for exact values such as host. in: query name: search required: false schema: type: string - - description: Comma-separated list of tags to filter processes by. + - description: |- + Comma-separated `key:value` tags. A process must match every tag. Wildcards, negation + (`-key:value`), spaces, and `IN (...)` are not supported. To cover several hosts, make one + request per host. example: account:prod,user:admin in: query name: tags @@ -210918,9 +210946,9 @@ paths: schema: type: string - description: |- - Unix timestamp (number of seconds since epoch) of the start of the query window. - If not provided, the start of the query window will be 15 minutes before the `to` timestamp. If neither - `from` nor `to` are provided, the query window will be `[now - 15m, now]`. + Start of the query window, in Unix seconds. Must be within the past 36 hours and at most 1 hour + before `to`. If not provided, the start of the query window is 15 minutes before the `to` timestamp. + If neither `from` nor `to` is provided, the query window is `[now - 15m, now]`. in: query name: from required: false @@ -210928,9 +210956,9 @@ paths: format: int64 type: integer - description: |- - Unix timestamp (number of seconds since epoch) of the end of the query window. - If not provided, the end of the query window will be 15 minutes after the `from` timestamp. If neither - `from` nor `to` are provided, the query window will be `[now - 15m, now]`. + End of the query window, in Unix seconds. Must be at most 1 hour after `from`. If not provided, the + end of the query window is 15 minutes after the `from` timestamp. If neither `from` nor `to` is + provided, the query window is `[now - 15m, now]`. in: query name: to required: false diff --git a/packages/datadog-api-client-v2/apis/ProcessesApi.ts b/packages/datadog-api-client-v2/apis/ProcessesApi.ts index 50fdcab627e6..248e53567a1b 100644 --- a/packages/datadog-api-client-v2/apis/ProcessesApi.ts +++ b/packages/datadog-api-client-v2/apis/ProcessesApi.ts @@ -165,26 +165,29 @@ export class ProcessesApiResponseProcessor { export interface ProcessesApiListProcessesRequest { /** - * String to search processes by. + * Free-text search over process fields such as the executable and user. When it contains several + * words, a process must match all of them. Use `tags` for exact values such as host. * @type string */ search?: string; /** - * Comma-separated list of tags to filter processes by. + * Comma-separated `key:value` tags. A process must match every tag. Wildcards, negation + * (`-key:value`), spaces, and `IN (...)` are not supported. To cover several hosts, make one + * request per host. * @type string */ tags?: string; /** - * Unix timestamp (number of seconds since epoch) of the start of the query window. - * If not provided, the start of the query window will be 15 minutes before the `to` timestamp. If neither - * `from` nor `to` are provided, the query window will be `[now - 15m, now]`. + * Start of the query window, in Unix seconds. Must be within the past 36 hours and at most 1 hour + * before `to`. If not provided, the start of the query window is 15 minutes before the `to` timestamp. + * If neither `from` nor `to` is provided, the query window is `[now - 15m, now]`. * @type number */ from?: number; /** - * Unix timestamp (number of seconds since epoch) of the end of the query window. - * If not provided, the end of the query window will be 15 minutes after the `from` timestamp. If neither - * `from` nor `to` are provided, the query window will be `[now - 15m, now]`. + * End of the query window, in Unix seconds. Must be at most 1 hour after `from`. If not provided, the + * end of the query window is 15 minutes after the `from` timestamp. If neither `from` nor `to` is + * provided, the query window is `[now - 15m, now]`. * @type number */ to?: number; @@ -219,7 +222,13 @@ export class ProcessesApi { } /** - * Get all processes for your organization. + * Get processes collected by Live Processes for your organization. One request covers a window of + * at most 1 hour that starts within the past 36 hours. To cover a longer period, make one request + * per hour. Older data is not available from this endpoint. + * + * When a process includes `identifying_tags`, pass them as `tag_filters` in a `process` data source + * query to `/api/v2/query/scalar` or `/api/v2/query/timeseries` to get CPU or memory metrics for that + * one process. If absent, don't substitute an empty filter, which would query all processes. * @param param The request object */ public listProcesses( diff --git a/packages/datadog-api-client-v2/models/ProcessScalarQuery.ts b/packages/datadog-api-client-v2/models/ProcessScalarQuery.ts index 6bbc7ecb4c86..0af128216d67 100644 --- a/packages/datadog-api-client-v2/models/ProcessScalarQuery.ts +++ b/packages/datadog-api-client-v2/models/ProcessScalarQuery.ts @@ -10,7 +10,8 @@ import { QuerySortOrder } from "./QuerySortOrder"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * A query for host-level process metrics such as CPU and memory usage. + * Per-process metrics from Live Processes. Queries without `aggregator` fail. To scope to one process, + * set `tag_filters` to its `identifying_tags` from `GET /api/v2/processes`. */ export class ProcessScalarQuery { /** @@ -30,11 +31,13 @@ export class ProcessScalarQuery { */ "isNormalizedCpu"?: boolean; /** - * Maximum number of results to return. + * Maximum number of processes or groups to return. Large values can fail with an `Unprocessable + * Content` error. If so, retry with a smaller limit. */ "limit"?: number; /** - * The process metric to query. + * The process metric to query, such as `process.stat.cpu.total_pct`, `process.stat.memory.rss`, or + * `process.stat.memory.vms`. */ "metric": string; /** @@ -46,7 +49,8 @@ export class ProcessScalarQuery { */ "sort"?: QuerySortOrder; /** - * Tag filters to narrow down processes. + * Tags to narrow down processes. To scope to one process, use its `identifying_tags` from + * `GET /api/v2/processes`, for example `host:web-01` and `pid:1234`. */ "tagFilters"?: Array; /** diff --git a/packages/datadog-api-client-v2/models/ProcessTimeseriesQuery.ts b/packages/datadog-api-client-v2/models/ProcessTimeseriesQuery.ts index 29406f3bfcf5..ec364fbf663c 100644 --- a/packages/datadog-api-client-v2/models/ProcessTimeseriesQuery.ts +++ b/packages/datadog-api-client-v2/models/ProcessTimeseriesQuery.ts @@ -9,7 +9,8 @@ import { QuerySortOrder } from "./QuerySortOrder"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * A query for host-level process metrics such as CPU and memory usage. + * Per-process metrics from Live Processes over time, such as CPU and memory usage. To scope to one + * process, set `tag_filters` to its `identifying_tags` from `GET /api/v2/processes`. */ export class ProcessTimeseriesQuery { /** @@ -25,11 +26,13 @@ export class ProcessTimeseriesQuery { */ "isNormalizedCpu"?: boolean; /** - * Maximum number of results to return. + * Maximum number of processes or groups to return. Large values can fail with an `Unprocessable + * Content` error. If so, retry with a smaller limit. */ "limit"?: number; /** - * The process metric to query. + * The process metric to query, such as `process.stat.cpu.total_pct`, `process.stat.memory.rss`, or + * `process.stat.memory.vms`. */ "metric": string; /** @@ -41,7 +44,8 @@ export class ProcessTimeseriesQuery { */ "sort"?: QuerySortOrder; /** - * Tag filters to narrow down processes. + * Tags to narrow down processes. To scope to one process, use its `identifying_tags` from + * `GET /api/v2/processes`, for example `host:web-01` and `pid:1234`. */ "tagFilters"?: Array; /**