Create a log-based metric
POST {{baseUrl}}/api/v2/logs/config/metrics
Create a metric based on your ingested logs in your organization. Returns the log-based metric object from the request body when the request is successful.
Request Body
{"data"=>{"id"=>"<string>", "type"=>"logs_metrics", "attributes"=>{"compute"=>{"aggregation_type"=>"count", "include_percentiles"=>"<boolean>", "path"=>"<string>"}, "filter"=>{"query"=>"*"}, "group_by"=>[{"path"=>"<string>", "tag_name"=>"<string>"}, {"path"=>"<string>", "tag_name"=>"<string>"}]}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":{"attributes":{"compute":{"aggregation_type":"count","include_percentiles":"\u003cboolean\u003e","path":"\u003cstring\u003e"},"filter":{"query":"\u003cstring\u003e"},"group_by":[{"path":"\u003cstring\u003e","tag_name":"\u003cstring\u003e"},{"path":"\u003cstring\u003e","tag_name":"\u003cstring\u003e"}]},"id":"\u003cstring\u003e","type":"logs_metrics"}}