Coralogix Events2Metrics enables you to generate metrics from your spans and logs to optimize storage without sacrificing important data.
Define a query and Coralogix will execute it every minute and store different data aggregations in a long-term index. Metrics start to gather from the point in time in which they were defined. The available query time range for your Events2Metrics indices is 90 days. Activating Events2Metrics allows you to create up to 30 metrics with a 12-month retention period.
STEP 1. In your navigation pane, click Data Flow > Events2Metrics. Click NEW METRIC.
STEP 2. Input Details.
Name. The name chosen will appear in the field representing this metric in the long-term index.
Description. Describe your metric.
STEP 3. Select your Event Source. Choose either Logs or Spans.
STEP 4. Define your Query.
Use a written text query or a Lucene type of query.
STEP 5. Define Scope.
Filter by Applications, Subsystems, and Service. For Actions, filter particular HTTP requests and their associated services.
Filter by Applications, Subsystems, and Severities.
STEP 6. Define Metric Fields (optional).
Define up to 10 fields for which the metrics will be collected.
For each metric, you can choose an aggregation function that will aggregate the stream of the data and calculate Max/Min/Count/Avg/Sum/Histogram/Samples in 1 minute granularity.
A Histogram bucket is a range of values within a histogram. When you create a histogram, you specify the ranges of the values that will be used to group the data. Each bucket in the histogram represents the number of observations that fall within the range of values for that bucket. More granular buckets provide more accurate percentiles during querying, but will increase the number of time series and storage.
When selecting Histogram aggregation, you will need to provide the buckets that represent the distribution of the data.
An example Histogram bucket from a CPU metric looks as follows: 0, 10, 30, 45, 50, 60, 70, 85, 90, 100 – numbers separated by commas.
When selecting Samples, you will also need to select either Min or Max aggregation. Coralogix collects 4 samples per minute, with each sample representing a quarter of a minute. When we receive data from the same quarter, we take the minimum or the maximum (depending on the selection) from the old and new data.
STEP 7. Define Labels.
Create up to six labels. Contact us via our in-app chat or by sending us an email to [email protected] should you need more.
STEP 8. Define Advanced Settings. Choose the amount of permutation for this metric. Each account is allowed up to 10,000,000 permutations.
Event2Metrics label permutations – the unique combination of each of the labels values – is a finite number defined by the user per Metric (at the bottom of the metric definition). By default, it is set to 30,000 permutations. Each account is allowed up to 10,000,000 permutations.
At the top of your defined Metrics list, you will see how many available permutations you have left for your disposal.
An Events2Metrics definition is limited to a fixed amount of unique permutations for labels. We count the amount of unique permutations for the labels defined in the Events2Metrics definition.
If you have reached your permutation limit, you will see a warning triangle icon next to the Events2Metrics item. If no adjustment is made to the permutation settings of the Events2Metrics definition, the metric document will contain an aggregated span count under a CoralogixOtherValues bucket.
With every Events2Metrics created in Coralogix, a default metric is created. This metric counts the total logs or spans that matches the query and the scope that was provided in the Events2Metrics setup. The metric name will be <Events2Metrics Name>_cx_docs_total , and it can be queried via Grafana, as with any other metric. This default metric can be grouped by the labels that were defined in the Labels section.
A Count metric is enabled for tracking the number of spans or logs that match the Events2Metrics filters.
In Grafana, explore the number of spans or logs meeting the Events2Metrics conditions using Query, Applications, Subsystems, and Severities.
You may also utilize PromQL while creating a Metric Alert and query the default metric.
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].