Zookeeper receiver

The Zookeeper receiver collects metrics from a Zookeeper instance, using the mntr command. The mntr 4 letter word command needs to be enabled for the receiver to be able to collect metrics.

Prerequisites

Configure the receiver

Edit the OpenTelemetry Collector configuration to add and configure the zookeeper receiver:

  1. Add zookeeper to the receivers section of your OpenTelemetry Collector configuration file. For details on zookeeper parameters, see the Zookeeper receiver README.

    Tip: You are responsible for keeping your zookeeper configuration compatible with any updates to this receiver. Updates are typically announced on its README page, so the best practice is to monitor this page for updates you might need to make to your configuration.
    Tip: The example below shows a password as clear text, but you can store your password securely through your choice of secret management software and simply reference it through an environment variable or an external file.
    Sample configuration
    • endpoint: (default = localhost:2181) Endpoint to connect to collect metrics. Takes the form host:port. See the security best practices to understand how to set the endpoint in different environments.
    • timeout: (default = 10s) Timeout within which requests should be completed.
    • initial_delay (default = 1s): defines how long this receiver waits before starting.
    receivers:
      zookeeper:
        endpoint: "localhost:2181"
        collection_interval: 20s
        initial_delay: 1s
  2. Configure advanced settings.

  3. Add zookeeper to the collector metrics pipeline, which is within the service section of the collector configuration file:

    service:
      pipelines:
        metrics:
          receivers:
            - zookeeper
  4. To apply your configuration changes, restart the collector.

Settings

None.

Metrics

The following metrics, resource attributes, and attributes, are available.

included

https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/zookeeper.yaml

Activate or deactivate specific metrics

You can activate or deactivate specific metrics by setting the enabled field in the metrics section for each metric. For example:

receivers:
  samplereceiver:
    metrics:
      metric-one:
        enabled: true
      metric-two:
        enabled: false

The following is an example of host metrics receiver configuration with activated metrics:

receivers:
  hostmetrics:
    scrapers:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true
Note: Deactivated metrics aren’t sent to Splunk Observability Cloud.
Billing
  • If you’re in a MTS-based subscription, all metrics count towards metrics usage.

  • If you’re in a host-based plan, metrics listed as active (Active: Yes) on this document are considered default and are included free of charge.

Learn more at Infrastructure Monitoring subscription usage (Host and metric plans).

Troubleshooting

See Troubleshoot the Splunk OpenTelemetry Collector.