Skip to content

Events2Metrics

Manage Coralogix Events2Metrics directly from your AI agent. The Model Context Protocol (MCP) server provides a unified tool to create, retrieve, update, and delete Events2Metrics resources, and to generate infrastructure-as-code definitions from resource configurations.

Tool

Use manage_events2metrics for all Events2Metrics operations.
Action valueDescription
createCreate a new Events2Metrics resource.
getRetrieve a specific Events2Metrics resource by ID.
listList Events2Metrics resources with an optional case-insensitive name filter.
updateUpdate an existing resource. The agent retrieves the current configuration first, then applies your changes.
deleteDelete an Events2Metrics resource by ID.
generate_openapiGenerate the OpenAPI JSON payload for use with the Coralogix REST API.
generate_kubernetesGenerate a Kubernetes Operator YAML manifest for the Coralogix Operator.
generate_terraformGenerate Terraform configuration for the Coralogix Terraform Provider.

Supported shape

The tool supports 1 query source per resource: logs or spans. It supports metric labels, metric fields, permutation limits, query filters, and the min, max, count, average, sum, samples, and histogram aggregations.

Example prompts

Create a logs metric

Create a Coralogix Events2Metrics resource named logs-status-count.
Convert logs matching Lucene query status:* with severity Error into a count
metric. Use source field status, target base metric name status_count,
metric label Status from field status, and permutations limit 1000.

Create a spans metric

Create a Coralogix Events2Metrics resource named spans-duration-samples.
Convert spans matching operationName:* into a samples metric over source field
duration. Use sample type Max, target base metric name duration_samples,
metric label Service from field service_name, service filter contains api,
and action filter contains GET.

Export an existing resource

Generate OpenAPI JSON, Kubernetes YAML, and Terraform configuration for the
Events2Metrics resource named logs-status-count.

Important behaviors

  • Use 1 query type. A resource must use either logsQuery or spansQuery, not both.
  • Custom aggregation target metric names are not supported. Use the generated target metric naming.
  • Logs query aliases are not exposed. The tool rejects fetched resources with unsupported aliases for the shared infrastructure-as-code path.
  • Update requires retrieval first. Retrieve the current resource, modify it, then update with the complete definition.