---
title: NATS stats metricset
description: This is the stats metricset of the module nats collecting generic stats. This is a default metricset. If the host module is unconfigured, this metricset...
url: https://www.elastic.co/docs/reference/beats/metricbeat/metricbeat-metricset-nats-stats
products:
  - Beats
  - Metricbeat
applies_to:
  - Elastic Stack: Generally available
---

# NATS stats metricset
This is the stats metricset of the module nats collecting generic stats.
This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.

## Fields

For a description of each field in the metricset, see the [exported fields](https://www.elastic.co/docs/reference/beats/metricbeat/exported-fields-nats) section.
Here is an example document generated by this metricset:
```json
{
    "@timestamp": "2017-10-12T08:05:34.853Z",
    "event": {
        "dataset": "nats.stats",
        "duration": 115000,
        "module": "nats"
    },
    "metricset": {
        "name": "stats",
        "period": 10000
    },
    "nats": {
        "server": {
            "id": "NBND4PX5S47JXJZYEWSDE2KYOTEK2SM6MBMSQQ5ZUA5URNULLFFMTFJH",
            "time": "2025-03-16T14:06:10.813266299Z"
        },
        "stats": {
            "cores": 32,
            "cpu": 0,
            "http": {
                "req_stats": {
                    "uri": {
                        "connz": 16,
                        "routez": 4,
                        "varz": 16
                    }
                }
            },
            "in": {
                "bytes": 13081663,
                "messages": 105079
            },
            "mem": {
                "bytes": 27746304
            },
            "out": {
                "bytes": 128351798,
                "messages": 1006876
            },
            "remotes": 1,
            "server_name": "test1",
            "slow_consumers": 0,
            "total_connections": 28,
            "uptime": 1676,
            "version": "2.2.6"
        }
    },
    "service": {
        "address": "localhost:60202",
        "type": "nats"
    }
}
```