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:metricDerivation

Description

Note: This configuration is deprecated and will be replaced by a CNCF Serverless Workflow configuration.

Configuration for deriving metrics based on log, event and trace data.

Syntax

{
  "namespace": "<object>",
  "kind": "<string>",
  "name": "<string>",
  "displayName": "<string>",
  "description": "<string>",
  "trigger": "<object>",
  "output": "<object>",
  "mapping": "<object>"
}

Attributes

Attribute Description
namespace Required. The name of the domain ( fmm:namespace object) that this entity belongs to.
kind Required. A valid fmm type that this object represents. Set this to metricDerivation.
name Required. 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 Required. A string representing the display name of this entity type in the user interface.
description Description of the configuration.
trigger Required. An object with attributes kind, scopeFilter, and type. For a description of each attribute, see the syntax block.
output Required. An object with attributes kind and type. For a description of each attribute, see the syntax block.
mapping Required. An object with attributes entity, timestamp, value, and attributes. For a description of each attribute, see the syntax block.

Example

{
  "kind": "metricDerivation",
  "namespace": {
    "name": "common",
    "version": 1
  },
  "name": "count_kubernetes_events",
  "displayName": "Count kubernetes events",
  "description" : "This configuration is for a metric that count kubernetes events records",
  "trigger": {
    "kind": "event",
    "type": "k8sevent",
    "scopeFilter": "trigger.attributes.severity.value != null"
  },
  "output": {
    "kind": "metric",
    "type": "count_kubernetes_events"
  },
  "mapping": {
    "entity": "trigger.entityMetadata",
    "timestamp" : "trigger.timestampMillis * 100000",
    "value": null,
    "attributes": {
      "severity": "trigger.attributes.severity.value",
      "reason":  "trigger.attributes.reason.value"
    }
  }
}