﻿---
title: ZooKeeper connection metricset
description: connection Metricset fetches the data returned by the cons admin keyword. It exposes the following metrics: zookeeper.connection.interest_ops: Interest...
url: https://www.elastic.co/elastic/docs-builder/docs/3016/reference/beats/metricbeat/metricbeat-metricset-zookeeper-connection
products:
  - Beats
  - Metricbeat
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# ZooKeeper connection metricset
`connection` Metricset fetches the data returned by the `cons` admin keyword. It exposes the following metrics:
- `zookeeper.connection.interest_ops`: Interest ops
- `zookeeper.connection.queued`: Queued connections
- `zookeeper.connection.received`: Received connections
- `zookeeper.connection.sent`: Connections sent


## Fields

For a description of each field in the metricset, see the [exported fields](https://www.elastic.co/elastic/docs-builder/docs/3016/reference/beats/metricbeat/exported-fields-zookeeper) section.
Here is an example document generated by this metricset:
```json
{
    "@timestamp": "2017-10-12T08:05:34.853Z",
    "client": {
        "ip": "192.168.176.1",
        "port": 53618
    },
    "event": {
        "dataset": "zookeeper.connection",
        "duration": 115000,
        "module": "zookeeper"
    },
    "metricset": {
        "name": "connection",
        "period": 10000
    },
    "service": {
        "address": "192.168.176.2:2181",
        "node": {
            "name": "0"
        },
        "type": "zookeeper"
    },
    "zookeeper": {
        "connection": {
            "interest_ops": 0,
            "queued": 0,
            "received": 1,
            "sent": 0
        }
    }
}
```