curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2 \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Service catalog latency",
"spansQuery": {
"actionFilters": [
"myAction"
],
"applicationnameFilters": [
"myApp"
],
"lucene": "applicationName:myApp",
"serviceFilters": [
"myService"
],
"subsystemnameFilters": [
"mySubsystem"
]
},
"dataSource": "my_namespace/my_dataset",
"description": "avg and max the latency of catalog service",
"logsQuery": {
"alias": "new_query",
"applicationnameFilters": [
"app_name"
],
"lucene": "log_obj.numeric_field: [50 TO 100]",
"severityFilters": [],
"subsystemnameFilters": [
"sub_name"
]
},
"metricFields": [
{
"aggregations": [
{
"none": {},
"enabled": true,
"histogram": {
"buckets": [
2
]
},
"samples": {},
"targetMetricName": "alias_field_name_agg_func"
}
],
"sourceField": "log_obj.numeric_field",
"targetBaseMetricName": "alias_field_name"
}
],
"metricLabels": [
{
"sourceField": "log_obj.string_value",
"targetLabel": "alias_label_name"
}
],
"permutationsLimit": 30000
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2"
payload = {
"name": "Service catalog latency",
"spansQuery": {
"actionFilters": ["myAction"],
"applicationnameFilters": ["myApp"],
"lucene": "applicationName:myApp",
"serviceFilters": ["myService"],
"subsystemnameFilters": ["mySubsystem"]
},
"dataSource": "my_namespace/my_dataset",
"description": "avg and max the latency of catalog service",
"logsQuery": {
"alias": "new_query",
"applicationnameFilters": ["app_name"],
"lucene": "log_obj.numeric_field: [50 TO 100]",
"severityFilters": [],
"subsystemnameFilters": ["sub_name"]
},
"metricFields": [
{
"aggregations": [
{
"none": {},
"enabled": True,
"histogram": { "buckets": [2] },
"samples": {},
"targetMetricName": "alias_field_name_agg_func"
}
],
"sourceField": "log_obj.numeric_field",
"targetBaseMetricName": "alias_field_name"
}
],
"metricLabels": [
{
"sourceField": "log_obj.string_value",
"targetLabel": "alias_label_name"
}
],
"permutationsLimit": 30000
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Service catalog latency',
spansQuery: {
actionFilters: ['myAction'],
applicationnameFilters: ['myApp'],
lucene: 'applicationName:myApp',
serviceFilters: ['myService'],
subsystemnameFilters: ['mySubsystem']
},
dataSource: 'my_namespace/my_dataset',
description: 'avg and max the latency of catalog service',
logsQuery: {
alias: 'new_query',
applicationnameFilters: ['app_name'],
lucene: 'log_obj.numeric_field: [50 TO 100]',
severityFilters: [],
subsystemnameFilters: ['sub_name']
},
metricFields: [
{
aggregations: [
{
none: {},
enabled: true,
histogram: {buckets: [2]},
samples: {},
targetMetricName: 'alias_field_name_agg_func'
}
],
sourceField: 'log_obj.numeric_field',
targetBaseMetricName: 'alias_field_name'
}
],
metricLabels: [{sourceField: 'log_obj.string_value', targetLabel: 'alias_label_name'}],
permutationsLimit: 30000
})
};
fetch('https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Service catalog latency',
'spansQuery' => [
'actionFilters' => [
'myAction'
],
'applicationnameFilters' => [
'myApp'
],
'lucene' => 'applicationName:myApp',
'serviceFilters' => [
'myService'
],
'subsystemnameFilters' => [
'mySubsystem'
]
],
'dataSource' => 'my_namespace/my_dataset',
'description' => 'avg and max the latency of catalog service',
'logsQuery' => [
'alias' => 'new_query',
'applicationnameFilters' => [
'app_name'
],
'lucene' => 'log_obj.numeric_field: [50 TO 100]',
'severityFilters' => [
],
'subsystemnameFilters' => [
'sub_name'
]
],
'metricFields' => [
[
'aggregations' => [
[
'none' => [
],
'enabled' => true,
'histogram' => [
'buckets' => [
2
]
],
'samples' => [
],
'targetMetricName' => 'alias_field_name_agg_func'
]
],
'sourceField' => 'log_obj.numeric_field',
'targetBaseMetricName' => 'alias_field_name'
]
],
'metricLabels' => [
[
'sourceField' => 'log_obj.string_value',
'targetLabel' => 'alias_label_name'
]
],
'permutationsLimit' => 30000
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2"
payload := strings.NewReader("{\n \"name\": \"Service catalog latency\",\n \"spansQuery\": {\n \"actionFilters\": [\n \"myAction\"\n ],\n \"applicationnameFilters\": [\n \"myApp\"\n ],\n \"lucene\": \"applicationName:myApp\",\n \"serviceFilters\": [\n \"myService\"\n ],\n \"subsystemnameFilters\": [\n \"mySubsystem\"\n ]\n },\n \"dataSource\": \"my_namespace/my_dataset\",\n \"description\": \"avg and max the latency of catalog service\",\n \"logsQuery\": {\n \"alias\": \"new_query\",\n \"applicationnameFilters\": [\n \"app_name\"\n ],\n \"lucene\": \"log_obj.numeric_field: [50 TO 100]\",\n \"severityFilters\": [],\n \"subsystemnameFilters\": [\n \"sub_name\"\n ]\n },\n \"metricFields\": [\n {\n \"aggregations\": [\n {\n \"none\": {},\n \"enabled\": true,\n \"histogram\": {\n \"buckets\": [\n 2\n ]\n },\n \"samples\": {},\n \"targetMetricName\": \"alias_field_name_agg_func\"\n }\n ],\n \"sourceField\": \"log_obj.numeric_field\",\n \"targetBaseMetricName\": \"alias_field_name\"\n }\n ],\n \"metricLabels\": [\n {\n \"sourceField\": \"log_obj.string_value\",\n \"targetLabel\": \"alias_label_name\"\n }\n ],\n \"permutationsLimit\": 30000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Service catalog latency\",\n \"spansQuery\": {\n \"actionFilters\": [\n \"myAction\"\n ],\n \"applicationnameFilters\": [\n \"myApp\"\n ],\n \"lucene\": \"applicationName:myApp\",\n \"serviceFilters\": [\n \"myService\"\n ],\n \"subsystemnameFilters\": [\n \"mySubsystem\"\n ]\n },\n \"dataSource\": \"my_namespace/my_dataset\",\n \"description\": \"avg and max the latency of catalog service\",\n \"logsQuery\": {\n \"alias\": \"new_query\",\n \"applicationnameFilters\": [\n \"app_name\"\n ],\n \"lucene\": \"log_obj.numeric_field: [50 TO 100]\",\n \"severityFilters\": [],\n \"subsystemnameFilters\": [\n \"sub_name\"\n ]\n },\n \"metricFields\": [\n {\n \"aggregations\": [\n {\n \"none\": {},\n \"enabled\": true,\n \"histogram\": {\n \"buckets\": [\n 2\n ]\n },\n \"samples\": {},\n \"targetMetricName\": \"alias_field_name_agg_func\"\n }\n ],\n \"sourceField\": \"log_obj.numeric_field\",\n \"targetBaseMetricName\": \"alias_field_name\"\n }\n ],\n \"metricLabels\": [\n {\n \"sourceField\": \"log_obj.string_value\",\n \"targetLabel\": \"alias_label_name\"\n }\n ],\n \"permutationsLimit\": 30000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Service catalog latency\",\n \"spansQuery\": {\n \"actionFilters\": [\n \"myAction\"\n ],\n \"applicationnameFilters\": [\n \"myApp\"\n ],\n \"lucene\": \"applicationName:myApp\",\n \"serviceFilters\": [\n \"myService\"\n ],\n \"subsystemnameFilters\": [\n \"mySubsystem\"\n ]\n },\n \"dataSource\": \"my_namespace/my_dataset\",\n \"description\": \"avg and max the latency of catalog service\",\n \"logsQuery\": {\n \"alias\": \"new_query\",\n \"applicationnameFilters\": [\n \"app_name\"\n ],\n \"lucene\": \"log_obj.numeric_field: [50 TO 100]\",\n \"severityFilters\": [],\n \"subsystemnameFilters\": [\n \"sub_name\"\n ]\n },\n \"metricFields\": [\n {\n \"aggregations\": [\n {\n \"none\": {},\n \"enabled\": true,\n \"histogram\": {\n \"buckets\": [\n 2\n ]\n },\n \"samples\": {},\n \"targetMetricName\": \"alias_field_name_agg_func\"\n }\n ],\n \"sourceField\": \"log_obj.numeric_field\",\n \"targetBaseMetricName\": \"alias_field_name\"\n }\n ],\n \"metricLabels\": [\n {\n \"sourceField\": \"log_obj.string_value\",\n \"targetLabel\": \"alias_label_name\"\n }\n ],\n \"permutationsLimit\": 30000\n}"
response = http.request(request)
puts response.read_body{
"e2m": {
"name": "Service_catalog_latency",
"spansQuery": {
"actionFilters": [
"myAction"
],
"applicationnameFilters": [
"myApp"
],
"lucene": "applicationName:myApp",
"serviceFilters": [
"myService"
],
"subsystemnameFilters": [
"mySubsystem"
]
},
"createTime": "2022-06-30T12:30:00.000Z",
"dataSource": "my_namespace/my_dataset",
"description": "avg and max the latency of catalog service",
"id": "d6a3658e-78d2-47d0-9b81-b2c551f01b09",
"isInternal": true,
"logsQuery": {
"alias": "new_query",
"applicationnameFilters": [
"app_name"
],
"lucene": "log_obj.numeric_field: [50 TO 100]",
"severityFilters": [],
"subsystemnameFilters": [
"sub_name"
]
},
"metricFields": [
{
"aggregations": [
{
"none": {},
"enabled": true,
"histogram": {
"buckets": [
2
]
},
"samples": {},
"targetMetricName": "alias_field_name_agg_func"
}
],
"sourceField": "log_obj.numeric_field",
"targetBaseMetricName": "alias_field_name"
}
],
"metricLabels": [
{
"sourceField": "log_obj.string_value",
"targetLabel": "alias_label_name"
}
],
"permutations": {
"hasExceededLimit": true,
"limit": 30000
},
"updateTime": "2022-06-30T12:30:00.000Z"
}
}Create a new E2M
Creates a new events-to-metrics rule.
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2 \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Service catalog latency",
"spansQuery": {
"actionFilters": [
"myAction"
],
"applicationnameFilters": [
"myApp"
],
"lucene": "applicationName:myApp",
"serviceFilters": [
"myService"
],
"subsystemnameFilters": [
"mySubsystem"
]
},
"dataSource": "my_namespace/my_dataset",
"description": "avg and max the latency of catalog service",
"logsQuery": {
"alias": "new_query",
"applicationnameFilters": [
"app_name"
],
"lucene": "log_obj.numeric_field: [50 TO 100]",
"severityFilters": [],
"subsystemnameFilters": [
"sub_name"
]
},
"metricFields": [
{
"aggregations": [
{
"none": {},
"enabled": true,
"histogram": {
"buckets": [
2
]
},
"samples": {},
"targetMetricName": "alias_field_name_agg_func"
}
],
"sourceField": "log_obj.numeric_field",
"targetBaseMetricName": "alias_field_name"
}
],
"metricLabels": [
{
"sourceField": "log_obj.string_value",
"targetLabel": "alias_label_name"
}
],
"permutationsLimit": 30000
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2"
payload = {
"name": "Service catalog latency",
"spansQuery": {
"actionFilters": ["myAction"],
"applicationnameFilters": ["myApp"],
"lucene": "applicationName:myApp",
"serviceFilters": ["myService"],
"subsystemnameFilters": ["mySubsystem"]
},
"dataSource": "my_namespace/my_dataset",
"description": "avg and max the latency of catalog service",
"logsQuery": {
"alias": "new_query",
"applicationnameFilters": ["app_name"],
"lucene": "log_obj.numeric_field: [50 TO 100]",
"severityFilters": [],
"subsystemnameFilters": ["sub_name"]
},
"metricFields": [
{
"aggregations": [
{
"none": {},
"enabled": True,
"histogram": { "buckets": [2] },
"samples": {},
"targetMetricName": "alias_field_name_agg_func"
}
],
"sourceField": "log_obj.numeric_field",
"targetBaseMetricName": "alias_field_name"
}
],
"metricLabels": [
{
"sourceField": "log_obj.string_value",
"targetLabel": "alias_label_name"
}
],
"permutationsLimit": 30000
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Service catalog latency',
spansQuery: {
actionFilters: ['myAction'],
applicationnameFilters: ['myApp'],
lucene: 'applicationName:myApp',
serviceFilters: ['myService'],
subsystemnameFilters: ['mySubsystem']
},
dataSource: 'my_namespace/my_dataset',
description: 'avg and max the latency of catalog service',
logsQuery: {
alias: 'new_query',
applicationnameFilters: ['app_name'],
lucene: 'log_obj.numeric_field: [50 TO 100]',
severityFilters: [],
subsystemnameFilters: ['sub_name']
},
metricFields: [
{
aggregations: [
{
none: {},
enabled: true,
histogram: {buckets: [2]},
samples: {},
targetMetricName: 'alias_field_name_agg_func'
}
],
sourceField: 'log_obj.numeric_field',
targetBaseMetricName: 'alias_field_name'
}
],
metricLabels: [{sourceField: 'log_obj.string_value', targetLabel: 'alias_label_name'}],
permutationsLimit: 30000
})
};
fetch('https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Service catalog latency',
'spansQuery' => [
'actionFilters' => [
'myAction'
],
'applicationnameFilters' => [
'myApp'
],
'lucene' => 'applicationName:myApp',
'serviceFilters' => [
'myService'
],
'subsystemnameFilters' => [
'mySubsystem'
]
],
'dataSource' => 'my_namespace/my_dataset',
'description' => 'avg and max the latency of catalog service',
'logsQuery' => [
'alias' => 'new_query',
'applicationnameFilters' => [
'app_name'
],
'lucene' => 'log_obj.numeric_field: [50 TO 100]',
'severityFilters' => [
],
'subsystemnameFilters' => [
'sub_name'
]
],
'metricFields' => [
[
'aggregations' => [
[
'none' => [
],
'enabled' => true,
'histogram' => [
'buckets' => [
2
]
],
'samples' => [
],
'targetMetricName' => 'alias_field_name_agg_func'
]
],
'sourceField' => 'log_obj.numeric_field',
'targetBaseMetricName' => 'alias_field_name'
]
],
'metricLabels' => [
[
'sourceField' => 'log_obj.string_value',
'targetLabel' => 'alias_label_name'
]
],
'permutationsLimit' => 30000
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2"
payload := strings.NewReader("{\n \"name\": \"Service catalog latency\",\n \"spansQuery\": {\n \"actionFilters\": [\n \"myAction\"\n ],\n \"applicationnameFilters\": [\n \"myApp\"\n ],\n \"lucene\": \"applicationName:myApp\",\n \"serviceFilters\": [\n \"myService\"\n ],\n \"subsystemnameFilters\": [\n \"mySubsystem\"\n ]\n },\n \"dataSource\": \"my_namespace/my_dataset\",\n \"description\": \"avg and max the latency of catalog service\",\n \"logsQuery\": {\n \"alias\": \"new_query\",\n \"applicationnameFilters\": [\n \"app_name\"\n ],\n \"lucene\": \"log_obj.numeric_field: [50 TO 100]\",\n \"severityFilters\": [],\n \"subsystemnameFilters\": [\n \"sub_name\"\n ]\n },\n \"metricFields\": [\n {\n \"aggregations\": [\n {\n \"none\": {},\n \"enabled\": true,\n \"histogram\": {\n \"buckets\": [\n 2\n ]\n },\n \"samples\": {},\n \"targetMetricName\": \"alias_field_name_agg_func\"\n }\n ],\n \"sourceField\": \"log_obj.numeric_field\",\n \"targetBaseMetricName\": \"alias_field_name\"\n }\n ],\n \"metricLabels\": [\n {\n \"sourceField\": \"log_obj.string_value\",\n \"targetLabel\": \"alias_label_name\"\n }\n ],\n \"permutationsLimit\": 30000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Service catalog latency\",\n \"spansQuery\": {\n \"actionFilters\": [\n \"myAction\"\n ],\n \"applicationnameFilters\": [\n \"myApp\"\n ],\n \"lucene\": \"applicationName:myApp\",\n \"serviceFilters\": [\n \"myService\"\n ],\n \"subsystemnameFilters\": [\n \"mySubsystem\"\n ]\n },\n \"dataSource\": \"my_namespace/my_dataset\",\n \"description\": \"avg and max the latency of catalog service\",\n \"logsQuery\": {\n \"alias\": \"new_query\",\n \"applicationnameFilters\": [\n \"app_name\"\n ],\n \"lucene\": \"log_obj.numeric_field: [50 TO 100]\",\n \"severityFilters\": [],\n \"subsystemnameFilters\": [\n \"sub_name\"\n ]\n },\n \"metricFields\": [\n {\n \"aggregations\": [\n {\n \"none\": {},\n \"enabled\": true,\n \"histogram\": {\n \"buckets\": [\n 2\n ]\n },\n \"samples\": {},\n \"targetMetricName\": \"alias_field_name_agg_func\"\n }\n ],\n \"sourceField\": \"log_obj.numeric_field\",\n \"targetBaseMetricName\": \"alias_field_name\"\n }\n ],\n \"metricLabels\": [\n {\n \"sourceField\": \"log_obj.string_value\",\n \"targetLabel\": \"alias_label_name\"\n }\n ],\n \"permutationsLimit\": 30000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Service catalog latency\",\n \"spansQuery\": {\n \"actionFilters\": [\n \"myAction\"\n ],\n \"applicationnameFilters\": [\n \"myApp\"\n ],\n \"lucene\": \"applicationName:myApp\",\n \"serviceFilters\": [\n \"myService\"\n ],\n \"subsystemnameFilters\": [\n \"mySubsystem\"\n ]\n },\n \"dataSource\": \"my_namespace/my_dataset\",\n \"description\": \"avg and max the latency of catalog service\",\n \"logsQuery\": {\n \"alias\": \"new_query\",\n \"applicationnameFilters\": [\n \"app_name\"\n ],\n \"lucene\": \"log_obj.numeric_field: [50 TO 100]\",\n \"severityFilters\": [],\n \"subsystemnameFilters\": [\n \"sub_name\"\n ]\n },\n \"metricFields\": [\n {\n \"aggregations\": [\n {\n \"none\": {},\n \"enabled\": true,\n \"histogram\": {\n \"buckets\": [\n 2\n ]\n },\n \"samples\": {},\n \"targetMetricName\": \"alias_field_name_agg_func\"\n }\n ],\n \"sourceField\": \"log_obj.numeric_field\",\n \"targetBaseMetricName\": \"alias_field_name\"\n }\n ],\n \"metricLabels\": [\n {\n \"sourceField\": \"log_obj.string_value\",\n \"targetLabel\": \"alias_label_name\"\n }\n ],\n \"permutationsLimit\": 30000\n}"
response = http.request(request)
puts response.read_body{
"e2m": {
"name": "Service_catalog_latency",
"spansQuery": {
"actionFilters": [
"myAction"
],
"applicationnameFilters": [
"myApp"
],
"lucene": "applicationName:myApp",
"serviceFilters": [
"myService"
],
"subsystemnameFilters": [
"mySubsystem"
]
},
"createTime": "2022-06-30T12:30:00.000Z",
"dataSource": "my_namespace/my_dataset",
"description": "avg and max the latency of catalog service",
"id": "d6a3658e-78d2-47d0-9b81-b2c551f01b09",
"isInternal": true,
"logsQuery": {
"alias": "new_query",
"applicationnameFilters": [
"app_name"
],
"lucene": "log_obj.numeric_field: [50 TO 100]",
"severityFilters": [],
"subsystemnameFilters": [
"sub_name"
]
},
"metricFields": [
{
"aggregations": [
{
"none": {},
"enabled": true,
"histogram": {
"buckets": [
2
]
},
"samples": {},
"targetMetricName": "alias_field_name_agg_func"
}
],
"sourceField": "log_obj.numeric_field",
"targetBaseMetricName": "alias_field_name"
}
],
"metricLabels": [
{
"sourceField": "log_obj.string_value",
"targetLabel": "alias_label_name"
}
],
"permutations": {
"hasExceededLimit": true,
"limit": 30000
},
"updateTime": "2022-06-30T12:30:00.000Z"
}
}Authorizations
API key authentication
Body
- E2M Create Params
- E2M Create Params
- E2M Create Params
This data structure is used to create a new event to metric definition
Human-readable name for the new E2M.
1 - 255^[\s\S]*$"Service catalog latency"
This data structure represents a query for spans.
Show child attributes
Show child attributes
Optional data source in namespace/dataset_name format. If not set, defaults to the standard logs/spans stream.
1 - 300^[\s\S]*$"my_namespace/my_dataset"
Human-readable description for the new E2M.
2000^[\s\S]*$"avg and max the latency of catalog service"
This data structure represents a query for logs.
Show child attributes
Show child attributes
Metric fields to create and aggregate from the events.
10Show child attributes
Show child attributes
Metric labels to attach to the generated metrics.
10Show child attributes
Show child attributes
Maximum number of unique metric permutations allowed for this E2M.
1 <= x <= 1000000030000
E2 m type.
E2M_TYPE_UNSPECIFIED, E2M_TYPE_LOGS2METRICS, E2M_TYPE_SPANS2METRICS Response
Create e2m response.
This data structure represents an Event to Metrics (E2M) object.
- E2M
- E2M
- E2M
Show child attributes
Show child attributes
Was this page helpful?