curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/latest/events2metrics/events2metrics/v2/batch \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"create": {
"e2m": {
"name": "Service catalog latency",
"description": "avg and max the latency of catalog service",
"metricFields": [
{
"aggregations": [
{
"aggType": "AGG_TYPE_UNSPECIFIED",
"enabled": true,
"histogram": {
"buckets": [
2
]
},
"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,
"spansQuery": {
"actionFilters": [
"myAction"
],
"applicationnameFilters": [
"myApp"
],
"lucene": "applicationName:myApp",
"serviceFilters": [
"myService"
],
"subsystemnameFilters": [
"mySubsystem"
]
},
"type": "E2M_TYPE_UNSPECIFIED"
}
}
}
]
}
'{
"matchingResponses": [
{
"created": {
"e2m": {
"name": "Service_catalog_latency",
"type": "E2M_TYPE_UNSPECIFIED",
"createTime": "2022-06-30T12:30:00Z'",
"description": "avg and max the latency of catalog service",
"id": "d6a3658e-78d2-47d0-9b81-b2c551f01b09",
"isInternal": true,
"metricFields": [
{
"aggregations": [
{
"aggType": "AGG_TYPE_UNSPECIFIED",
"enabled": true,
"histogram": {
"buckets": [
2
]
},
"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
},
"spansQuery": {
"actionFilters": [
"myAction"
],
"applicationnameFilters": [
"myApp"
],
"lucene": "applicationName:myApp",
"serviceFilters": [
"myService"
],
"subsystemnameFilters": [
"mySubsystem"
]
},
"updateTime": "2022-06-30T12:30:00Z'"
}
}
}
]
}No description available
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/latest/events2metrics/events2metrics/v2/batch \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"create": {
"e2m": {
"name": "Service catalog latency",
"description": "avg and max the latency of catalog service",
"metricFields": [
{
"aggregations": [
{
"aggType": "AGG_TYPE_UNSPECIFIED",
"enabled": true,
"histogram": {
"buckets": [
2
]
},
"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,
"spansQuery": {
"actionFilters": [
"myAction"
],
"applicationnameFilters": [
"myApp"
],
"lucene": "applicationName:myApp",
"serviceFilters": [
"myService"
],
"subsystemnameFilters": [
"mySubsystem"
]
},
"type": "E2M_TYPE_UNSPECIFIED"
}
}
}
]
}
'{
"matchingResponses": [
{
"created": {
"e2m": {
"name": "Service_catalog_latency",
"type": "E2M_TYPE_UNSPECIFIED",
"createTime": "2022-06-30T12:30:00Z'",
"description": "avg and max the latency of catalog service",
"id": "d6a3658e-78d2-47d0-9b81-b2c551f01b09",
"isInternal": true,
"metricFields": [
{
"aggregations": [
{
"aggType": "AGG_TYPE_UNSPECIFIED",
"enabled": true,
"histogram": {
"buckets": [
2
]
},
"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
},
"spansQuery": {
"actionFilters": [
"myAction"
],
"applicationnameFilters": [
"myApp"
],
"lucene": "applicationName:myApp",
"serviceFilters": [
"myService"
],
"subsystemnameFilters": [
"mySubsystem"
]
},
"updateTime": "2022-06-30T12:30:00Z'"
}
}
}
]
}API key authentication
Show child attributes
This is used to create a new event to metric definition
Show child attributes
This data structure is used to create a new event to metric definition
Show child attributes
"Service catalog latency"
"avg and max the latency of catalog service"
Show child attributes
This data structure represents an aggregation
Show child attributes
AGG_TYPE_UNSPECIFIED, AGG_TYPE_MIN, AGG_TYPE_MAX, AGG_TYPE_COUNT, AGG_TYPE_AVG, AGG_TYPE_SUM, AGG_TYPE_HISTOGRAM, AGG_TYPE_SAMPLES "alias_field_name_agg_func"
"log_obj.numeric_field"
"alias_field_name"
30000
This data structure represents a query for spans.
Show child attributes
"applicationName:myApp"
E2M_TYPE_UNSPECIFIED, E2M_TYPE_LOGS2METRICS, E2M_TYPE_SPANS2METRICS Show child attributes
Show child attributes
This data structure represents an Event to Metrics (E2M) object.
Show child attributes
"Service_catalog_latency"
E2M_TYPE_UNSPECIFIED, E2M_TYPE_LOGS2METRICS, E2M_TYPE_SPANS2METRICS "2022-06-30T12:30:00Z'"
"avg and max the latency of catalog service"
36"d6a3658e-78d2-47d0-9b81-b2c551f01b09"
Show child attributes
This data structure represents an aggregation
Show child attributes
AGG_TYPE_UNSPECIFIED, AGG_TYPE_MIN, AGG_TYPE_MAX, AGG_TYPE_COUNT, AGG_TYPE_AVG, AGG_TYPE_SUM, AGG_TYPE_HISTOGRAM, AGG_TYPE_SAMPLES "alias_field_name_agg_func"
"log_obj.numeric_field"
"alias_field_name"
This data structure represents a query for spans.
Show child attributes
"applicationName:myApp"
"2022-06-30T12:30:00Z'"
Was this page helpful?