{ "name": "CreateLogBasedMetric", "fully_qualified_name": "DatadogApi.CreateLogBasedMetric@0.1.0", "description": "Create a metric from your ingested logs.\n\nUse this tool to create a metric based on the logs ingested in your Datadog organization. It returns the log-based metric object when the request is successful.", "toolkit": { "name": "ArcadeDatadogApi", "description": null, "version": "0.1.0" }, "input": { "parameters": [ { "name": "log_based_metric_definition", "required": true, "description": "Definition and properties of the log-based metric to be created, including compute rules, filters, and grouping rules.", "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "data": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "attributes": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "compute": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "aggregation_type": { "val_type": "string", "inner_val_type": null, "enum": [ "count", "distribution" ], "properties": null, "inner_properties": null, "description": "The type of aggregation to use." }, "include_percentiles": { "val_type": "boolean", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "Toggle to include or exclude percentile aggregations for distribution metrics.\nOnly present when the `aggregation_type` is `distribution`." }, "path": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The path to the value the log-based metric will aggregate on (only used if the aggregation type is a \"distribution\")." } }, "inner_properties": null, "description": "The compute rule to compute the log-based metric." }, "filter": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "query": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The search query - following the log search syntax." } }, "inner_properties": null, "description": "The log-based metric filter. Logs matching this filter will be aggregated in this metric." }, "group_by": { "val_type": "array", "inner_val_type": "json", "enum": null, "properties": null, "inner_properties": { "path": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The path to the value the log-based metric will be aggregated over." }, "tag_name": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "Eventual name of the tag that gets created. By default, the path attribute is used as the tag name." } }, "description": "The rules for the group by." } }, "inner_properties": null, "description": "The object describing the Datadog log-based metric to create." }, "id": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the log-based metric." }, "type": { "val_type": "string", "inner_val_type": null, "enum": [ "logs_metrics" ], "properties": null, "inner_properties": null, "description": "The type of the resource. The value should always be logs_metrics." } }, "inner_properties": null, "description": "The new log-based metric properties." } }, "inner_properties": null, "description": "The definition of the new log-based metric." }, "inferrable": true, "http_endpoint_parameter_name": "requestBody" } ] }, "output": { "description": "Response from the API endpoint 'CreateLogsMetric'.", "available_modes": [ "value", "error", "null" ], "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": null } }, "requirements": { "authorization": null, "secrets": [ { "key": "DATADOG_API_KEY" }, { "key": "DATADOG_APPLICATION_KEY" }, { "key": "DATADOG_BASE_URL" } ], "metadata": null }, "deprecation_message": null, "metadata": { "object_type": "api_wrapper_tool", "version": "1.1.0", "description": "Tools that enable LLMs to interact directly with the Datadog API." }, "http_endpoint": { "metadata": { "object_type": "http_endpoint", "version": "1.2.0", "description": "" }, "url": "https://{datadog_base_url}/api/v2/logs/config/metrics", "http_method": "POST", "headers": {}, "parameters": [ { "name": "requestBody", "tool_parameter_name": "log_based_metric_definition", "description": "The definition of the new log-based metric.", "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "data": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "attributes": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "compute": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "aggregation_type": { "val_type": "string", "inner_val_type": null, "enum": [ "count", "distribution" ], "properties": null, "inner_properties": null, "description": "The type of aggregation to use." }, "include_percentiles": { "val_type": "boolean", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "Toggle to include or exclude percentile aggregations for distribution metrics.\nOnly present when the `aggregation_type` is `distribution`." }, "path": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The path to the value the log-based metric will aggregate on (only used if the aggregation type is a \"distribution\")." } }, "inner_properties": null, "description": "The compute rule to compute the log-based metric." }, "filter": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "query": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The search query - following the log search syntax." } }, "inner_properties": null, "description": "The log-based metric filter. Logs matching this filter will be aggregated in this metric." }, "group_by": { "val_type": "array", "inner_val_type": "json", "enum": null, "properties": null, "inner_properties": { "path": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The path to the value the log-based metric will be aggregated over." }, "tag_name": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "Eventual name of the tag that gets created. By default, the path attribute is used as the tag name." } }, "description": "The rules for the group by." } }, "inner_properties": null, "description": "The object describing the Datadog log-based metric to create." }, "id": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the log-based metric." }, "type": { "val_type": "string", "inner_val_type": null, "enum": [ "logs_metrics" ], "properties": null, "inner_properties": null, "description": "The type of the resource. The value should always be logs_metrics." } }, "inner_properties": null, "description": "The new log-based metric properties." } }, "inner_properties": null, "description": "The definition of the new log-based metric." }, "accepted_as": "body", "required": true, "deprecated": false, "default": null, "documentation_urls": [] } ], "documentation_urls": [], "secrets": [ { "arcade_key": "DATADOG_API_KEY", "parameter_name": "DD-API-KEY", "accepted_as": "header", "formatted_value": null, "description": "", "is_auth_token": false }, { "arcade_key": "DATADOG_APPLICATION_KEY", "parameter_name": "DD-APPLICATION-KEY", "accepted_as": "header", "formatted_value": null, "description": "", "is_auth_token": false }, { "arcade_key": "DATADOG_BASE_URL", "parameter_name": "datadog_base_url", "accepted_as": "path", "formatted_value": null, "description": "", "is_auth_token": false } ], "request_body_spec": "{\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"description\": \"The new log-based metric body.\",\n \"properties\": {\n \"data\": {\n \"description\": \"The new log-based metric properties.\",\n \"properties\": {\n \"attributes\": {\n \"description\": \"The object describing the Datadog log-based metric to create.\",\n \"properties\": {\n \"compute\": {\n \"description\": \"The compute rule to compute the log-based metric.\",\n \"properties\": {\n \"aggregation_type\": {\n \"description\": \"The type of aggregation to use.\",\n \"enum\": [\n \"count\",\n \"distribution\"\n ],\n \"example\": \"distribution\",\n \"type\": \"string\",\n \"x-enum-varnames\": [\n \"COUNT\",\n \"DISTRIBUTION\"\n ]\n },\n \"include_percentiles\": {\n \"description\": \"Toggle to include or exclude percentile aggregations for distribution metrics.\\nOnly present when the `aggregation_type` is `distribution`.\",\n \"example\": true,\n \"type\": \"boolean\"\n },\n \"path\": {\n \"description\": \"The path to the value the log-based metric will aggregate on (only used if the aggregation type is a \\\"distribution\\\").\",\n \"example\": \"@duration\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"aggregation_type\"\n ],\n \"type\": \"object\"\n },\n \"filter\": {\n \"description\": \"The log-based metric filter. Logs matching this filter will be aggregated in this metric.\",\n \"properties\": {\n \"query\": {\n \"default\": \"*\",\n \"description\": \"The search query - following the log search syntax.\",\n \"example\": \"service:web* AND @http.status_code:[200 TO 299]\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"group_by\": {\n \"description\": \"The rules for the group by.\",\n \"items\": {\n \"description\": \"A group by rule.\",\n \"properties\": {\n \"path\": {\n \"description\": \"The path to the value the log-based metric will be aggregated over.\",\n \"example\": \"@http.status_code\",\n \"type\": \"string\"\n },\n \"tag_name\": {\n \"description\": \"Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.\",\n \"example\": \"status_code\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"path\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"compute\"\n ],\n \"type\": \"object\"\n },\n \"id\": {\n \"description\": \"The name of the log-based metric.\",\n \"example\": \"logs.page.load.count\",\n \"type\": \"string\"\n },\n \"type\": {\n \"default\": \"logs_metrics\",\n \"description\": \"The type of the resource. The value should always be logs_metrics.\",\n \"enum\": [\n \"logs_metrics\"\n ],\n \"example\": \"logs_metrics\",\n \"type\": \"string\",\n \"x-enum-varnames\": [\n \"LOGS_METRICS\"\n ]\n }\n },\n \"required\": [\n \"id\",\n \"type\",\n \"attributes\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [\n \"data\"\n ],\n \"type\": \"object\"\n }\n }\n },\n \"description\": \"The definition of the new log-based metric.\",\n \"required\": true\n}", "use_request_body_schema_mode": true, "validate_request_body_schema": true } }