This documentation and the Cisco Observability Platform functionalities it describes are subject to change. Data saved on the platform may disappear and APIs may change without notice.
fmm:metricMapping
Description
Note: This configuration is deprecated and will be replaced by a CNCF Serverless Workflow configuration.
To define the mapping rules between an OTLP metric and any fmm:metric objects you declare within your solution, create a MELT workflow of type fmm:metricMapping. Declaring fmm:metricMapping is optional -- in other words, ingestion works without it. It's only required if you want to rename a metric.
For more information about how to map OTLP metrics to Cisco Observability Platform metrics, see Metrics Model.
Syntax
{
"namespace": "<object>",
"kind": "metricMapping",
"name": "<metricMapping-name>",
"displayName": "<metricMapping-name-for-UI>",
"scopeFilter": "<description>",
"nameMappings": {
"<otlp-metric-name>": "<platform-metric-name>",
"<otlp-metric-name>": "<platform-metric-name>",
"<otlp-metric-name>": "<platform-metric-name>"
}
}
Description
| Attribute | Description |
|---|---|
namespace |
The name of the domain ( fmm:namespace object) that this entity belongs to. |
kind |
A valid fmm type that this object represents. Set this to metricMapping. |
name |
A string representing the unique name of this entity type within the context of the namespace. Must be unique within a solution. Can contain only alphanumeric characters, underscores, or hyphens. |
displayName |
The name of this configuration as it will appear in the user interface. |
description |
Description of the configuration. |
scopeFilter |
Required. A filter expression filtering the OTLP packets which are eligible for this transformation. The filter expression can use predefined variables and functions. Predefined variables: • source (Source of the data)• entity.type (Entity type)• entity.namespace (Entity namespace)Predefined functions: • boolean containsAll(resourceAttributes, String[] names)• boolean matchAny(resourceAttributes, String[] names) |
nameMappings |
A map of "<otlp-metric-name>": "<platform-metric-name>" where each entry represents an individual mapping between the OTLP metric name and the Cisco Observability Platform metric name. |
Example
{
"name": "name_mapping_configs_for_pods",
"displayName": "Name Mapping configs for pod",
"namespace": {
"name": "k8s",
"version": 1
},
"kind": "metricMapping",
"scopeFilter": "entity.namespace.equals('k8s') && entity.type.equals('pod')",
"nameMappings": {
"cpu.requests": "k8s.pod.cpu.requests",
"cpu.limits": "k8s.pod.cpu.limits",
"memory.limits": "k8s.pod.memory.limits",
"memory.requests": "k8s.pod.memory.requests",
"pods.pending": "k8s.pods.pending",
"pods.running": "k8s.pods.running",
"pods.failed": "k8s.pods.failed",
"pods.succeeded": "k8s.pods.succeeded",
"pods.unknown": "k8s.pods.unknown",
"pod.restarts": "k8s.pod.restarts"
}
}