Filter OTEL configuration metrics

Configure the OTEL collector to filter Snaplex node metrics.

You can filter Snaplex node metrics so that the collector only reports on a subset. Refer to Node metric reference for a list of all node metrics.

  1. Open the otel/config.yaml file.
  2. In the processors element, add the following:
    processors:
      filter:
        metrics:
          include:
            match_type: regexp
            metric_names: <plexnode.name>
    For example, to include CPU, memory, and disk metrics:
    processors:
      filter:
        metrics:
          include:
            match_type: regexp
            metric_names:
              - plexnode_cpu.*
              - plexnode.mem.*
              - plexnode.disk.*                  
  3. Add filter to the service > metrics > processors element:
    service:
      pipelines:
        metrics:
          receivers: [otlp]
          processors: [batch,attributes,filter] # added filter
          exporters: [otlphttp, logging]
  4. Copy the config.yaml file to all nodes.
  5. On each node:
    1. Run docker ps to get the OTEL container ID.
    2. Restart the OTEL service: docker restart <container-id>

The OTEL collector will only report on the specified metrics.