1. Monitor

Configure Datadog

StreamNative Platform integrates with Datadog, which you can use to collect metrics for the following components and send the metrics to Datadog.

  • ZooKeeper
  • BookKeeper
  • Pulsar broker
  • Pulsar proxy
  • Vault
  • Prometheus

By default, Datadog collection annotation is disabled on StreamNative Platform. To enable it, you can set monitoring.datadog to true in the values.yaml YAML file. StreamNative Platform allows you to configure Datadog for the components that it deploys. You can enable or disable Datadog collection annotation for components in the values.yaml YAML file.

monitoring:
  datadog: true # --- [1]
datadog:
  namespace: {} # --- [2]
  component: datadog
  components:
    zookeeper: # --- [3]
      enabled: true # --- [4]
      metrics: # --- [5]
        ['"_*"']
  • [1] datadog: enable or disable Datadog collection annotation on StreamNative Platform. By default, Datadog collection annotation is disabled.
  • [2] namespace: specify the Datadog <METRICS_NAMESPACE_PREFIX_FOR_DATADOG> configuration. You can set the namespace to be prefixed to every metric when viewed in Datadog. By default, it is set to the namespace where the sn-platform chart is installed.
  • [3] <component>: specify the component that you want Datadog to collect metrics for. Currently, you can use Datadog to collect metrics for the ZooKeeper, BookKeeper, Pulsar broker, Pulsar proxy, Vault, and Prometheus.
  • [4] enabled: enable or disable Datadog collection annotation for the specific component. If enabled, you can use Datadog to collect metrics for the specific component.
  • [5] metrics: specify the metrics to be collected. By default, all metrics ("\"_*\"") are collected. For a list of supported metrics, see Pulsar metrics and Vault metrics.

Enable Datadog collection annotation

This section describes how to enable Datadog collection annotation on StreamNative Platform to collect metrics.

Prerequisites

  • Install Datadog Agent. For details, see Getting Started with the Agent.

  • Configure the Datadog Agent with an authentication token.

    Note

    This prerequisite only applies to enabling Datadog collection annotation for the Pulsar proxy.

    1. Get the token that is used to access your Pulsar proxy.

      kubectl get secret <release_name>-token-admin -o=jsonpath='{.data.TOKEN}' -n <k8s_namespace> | base64 --decode; echo
      
    2. Configure the PROXY_TOKEN as an environment variable on your Datadog Agent.

      agents:
        containers:
          agent:
            env:
              - name: DD_PROXY_TOKEN
                value: <PROXY_TOKEN>
      

Steps

This section describes how to enable Datadog collection annotation on StreamNative Platform.

This section describes how to enable Datadog collection annotation on StreamNative Platform to collect metrics for Pulsar components.

  1. Enable Datadog collection annotation.

    This example shows how to enable Datadog collection annotation to collect metrics for the ZooKeeper cluster.

    monitoring:
      datadog: true
    datadog:
      namespace: {}
      component: datadog
      components:
        zookeeper:
          enabled: true
          metrics: ['"_*"']
    
  2. Apply the new configuration.

    helm upgrade -f /path/to/your/values.yaml <release_name> streamnative/sn-platform -n <k8s_namespace>
    
Previous
Configure Alertmanager