Skip to main content

Create a new E2M

POSThttps://api.coralogix.com/mgmt/openapi/5/events2metrics/events2metrics/v2

Creates a new events-to-metrics rule.

Authorizations

Authorizationstringheaderrequired
API key authentication

Request

Body

application/json
    oneOf
    object
    dataSource#string

    Optional data source in namespace/dataset_name format. If not set, defaults to the standard logs/spans stream.

    Example: my_namespace/my_dataset
    description#string

    Human-readable description for the new E2M.

    Example: avg and max the latency of catalog service

    Metric fields to create and aggregate from the events.

    Metric labels to attach to the generated metrics.

    name#stringrequired

    Human-readable name for the new E2M.

    Example: Service catalog latency
    permutationsLimit#int32

    Maximum number of unique metric permutations allowed for this E2M.

    Example: 30000
    type#E2MType

    E2 m type.

    Possible values: [E2M_TYPE_UNSPECIFIED, E2M_TYPE_LOGS2METRICS, E2M_TYPE_SPANS2METRICS]

Response

application/json

Create e2m response.

    e2m#objectoneOf
    object
    e2m.createTime#string

    RFC3339 timestamp of when this E2M was created.

    Example: 2022-06-30T12:30:00.000Z
    e2m.dataSource#string

    Optional data source in namespace/dataset_name format. If not set, defaults to the standard logs/spans stream.

    Example: my_namespace/my_dataset
    e2m.description#string

    Human-readable description of this E2M.

    Example: avg and max the latency of catalog service
    e2m.id#string

    Unique identifier for this E2M. Required on update requests.

    Possible values: >= 36 characters and <= 36 characters, Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

    Example: d6a3658e-78d2-47d0-9b81-b2c551f01b09
    e2m.isInternal#boolean

    Indicates whether this E2M is for internal use only.

    Metric fields to extract and aggregate from the events.

    Possible values: <= 10

    Metric labels to attach to the generated metrics.

    e2m.name#stringrequired

    Human-readable name for this E2M.

    Example: Service_catalog_latency
    e2m.type#E2MTyperequired

    E2 m type.

    Possible values: [E2M_TYPE_UNSPECIFIED, E2M_TYPE_LOGS2METRICS, E2M_TYPE_SPANS2METRICS]

    e2m.updateTime#string

    RFC3339 timestamp of when this E2M was last updated.

    Example: 2022-06-30T12:30:00.000Z