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
-
Enable the
mntr4 letter word command. -
Deploy the Splunk Distribution of the OpenTelemetry Collector.
Configure the receiver
Edit the OpenTelemetry Collector configuration to add and configure the zookeeper receiver:
-
Add
zookeeperto thereceiverssection of your OpenTelemetry Collector configuration file. For details onzookeeperparameters, see the Zookeeper receiver README.Tip: You are responsible for keeping yourzookeeperconfiguration 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 formhost: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
-
Configure advanced settings.
-
Add
zookeeperto the collectormetricspipeline, which is within theservicesection of the collector configuration file:service: pipelines: metrics: receivers: - zookeeper - 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
-
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).