Create Custom Metrics telemetry instances

Create a telemetry instance

Create a YAML file (e.g., instance.yml) to define the telemetry instance. This file includes the configuration parameters, the list of metrics to generate, and their corresponding generation functions. Here is an example:

provider: custom metrics
config:
  samples: 10
metrics:
  - metric: cpu_used
    datasourceMetric: jvm;rand[100000000,500000000]
  - metric: mem_used
    datasourceMetric: jvm;rand[100000000,500000000]

To create the telemetry instance for the system test-system, use the Akamas CLI:

akamas create telemetry-instance instance.yml test-system

Configuration options

The only available configuration option is samples: default value is 10 and is the number of samples that will be generated for each listed metric

Metrics Section

This section defines all metrics to be generated, along with the generation function and its parameters. The format for a metric is:

  • METRIC_NAME: Name of the metric as defined in the component.

  • COMPONENT_NAME: Name of the component associated with the metric.

  • FUNCTION: Function used to generate the values. See "Available Functions" for details.

  • PARAM1, PARAM2: Parameters specific to the function.

Available functions

Rand

Generates random values for the metric within a specified range (PARAM1, PARAM2).

This will generate random numbers for jvm.cpu_used between 100000000 and 500000000. It's important to take into account the correct units used. In this example it's nanocores and that's why those big number were used. If the range is not specified (e.g., rand[]), a default range of [0,1] will be used.

Parameter

This function retrieves the value of the specified parameter and multiplies its value buy a random noise factor given in the function. Example:

This calculates jvm.mem_used by applying a random noise of ±25% to the current value of jvm.jvm_newSize. If the noise factor is not specified (e.g., parameter[component.param]), a default noise factor of 0.0 will be used.

Formula

Allows the use of complex formulas for metric generation, such as those used in study goals. The formula will use parameter values from the current experiment.

This will retrieve the current experiment parameter values and replace the values in the formula, then it will assign the resulting value to metric jvm.mem_util. Provide a valid formula or an error will be displayed in the provider instance logs

Fixed

With this function the value will be fixed and used as specified. It's not necessary to set the function name here.

This will assign to metric jvm.mem_util the fixed value 128000

Last updated

Was this helpful?