Skip to content

Latest commit

 

History

History
148 lines (133 loc) · 4.54 KB

signalfx-smart-agent-migration.md

File metadata and controls

148 lines (133 loc) · 4.54 KB

Migrating from the SignalFx Smart Agent

The Splunk Distribution of OpenTelemetry Collector is the next-generation agent and gateway for Splunk Observability products. As such, it is the replacement for the SignalFx Smart Agent. This distribution provides helpful components to assist current Smart Agent users in their transition to OpenTelemetry Collector and ensure no functionality loss. The Smart Agent Receiver, its associated extension, and other Collector components provide a means of integrating all Smart Agent metric monitors into your Collector pipelines.

The SignalFx Smart Agent's metric monitors allow real-time insights into how your target services and applications are performing. These metric gathering utilities have an equivalent counterpart in the OpenTelemetry Collector, the metric receiver. The Smart Agent Receiver is a wrapper utility that allows the embedding of Smart Agent monitors within your Collector pipelines.

Based on the relocation of your desired monitor configurations in your Collector deployment, the Smart Agent Receiver works in much the same way your Smart Agent deployment does.

Given an example Smart Agent monitor configuration:

signalFxAccessToken: {"#from": "env:SIGNALFX_ACCESS_TOKEN"}
ingestUrl: https://ingest.us1.signalfx.com
apiUrl: https://api.us1.signalfx.com

bundleDir: /opt/my-smart-agent-bundle

observers:
  - type: k8s-api

collectd:
  readThreads: 10
  writeQueueLimitHigh: 1000000
  writeQueueLimitLow: 600000

monitors:
  - type: signalfx-forwarder
    listenAddress: 0.0.0.0:9080
  - type: collectd/activemq
    discoveryRule: container_image =~ "activemq" && private_port == 1099
    extraDimensions:
      my_dimension: my_dimension_value
  - type: collectd/apache
    discoveryRule: container_image =~ "apache" && private_port == 80
  - type: postgresql
    discoveryRule: container_image =~ "postgresql" && private_port == 7199
    extraDimensions:
      my_other_dimension: my_other_dimension_value

Below is an equivalent, recommended Collector configuration. Notice that the signalfx-forwarder monitor's associated smartagent/signalfx-forwarder receiver instance is part of a traces pipeline using the sapm exporter. The additional metric monitors utilize the Receiver Creator:

extensions:
  k8s_observer:
    auth_type: serviceAccount
    node: ${K8S_NODE_NAME}
  smartagent:
    bundleDir: /opt/my-smart-agent-bundle
    collectd:
      readThreads: 10
      writeQueueLimitHigh: 1000000
      writeQueueLimitLow: 600000

receivers:
  smartagent/signalfx-forwarder:
    type: signalfx-forwarder
    listenAddress: 0.0.0.0:9080
  receiver_creator:
    receivers:
      smartagent/activemq:
        rule: type == "port" && pod.name matches "activemq" && port == 1099
        config:
          type: collectd/activemq
          extraDimensions:
            my_dimension: my_dimension_value
      smartagent/apache:
        rule: type == "port" && pod.name matches "apache" && port == 80
        config:
          type: collectd/apache
      smartagent/postgresql:
        rule: type == "port" && pod.name matches "postgresql" && port == 7199
        config:
          type: postgresql
          extraDimensions:
            my_other_dimension: my_other_dimension_value
    watch_observers:
      - k8s_observer

processors:
  resourcedetection:
    detectors:
      - system
      - env
  k8s_tagger:
    extract:
      metadata:
        - namespace
        - node
        - podName
        - podUID
    filter:
      node_from_env_var: K8S_NODE_NAME
  resource/add_cluster_name:
    attributes:
      - action: upsert
        key: k8s.cluster.name
        value: my_desired_cluster_name

exporters:
  signalfx:
    access_token: "${SIGNALFX_ACCESS_TOKEN}"
    realm: us1
  sapm:
    access_token: "${SIGNALFX_ACCESS_TOKEN}"
    endpoint: https://ingest.us1.signalfx.com/v2/trace

service:
  extensions:
    - k8s_observer
    - smartagent
  pipelines:
    metrics:
      receivers:
        - receivor_creator
      processors:
        - resourcedetection
      exporters:
        - signalfx
    traces:
      receivers:
        - smartagent/signalfx-forwarder
      processors:
        - resourcedetection
      exporters:
        - sapm