From de03ee3caa4da667f8d3e19200872a1f7ed024a0 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Fri, 26 Jan 2018 17:15:02 -0800 Subject: [PATCH] Update nats readme --- plugins/inputs/nats/README.md | 40 ++++++++++++++++++++++++++++++----- plugins/inputs/nats/nats.go | 2 +- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/plugins/inputs/nats/README.md b/plugins/inputs/nats/README.md index 3cd9ee7ac..362ee17b2 100644 --- a/plugins/inputs/nats/README.md +++ b/plugins/inputs/nats/README.md @@ -1,12 +1,42 @@ -# NATS Monitoring Input Plugin +# NATS Input Plugin -The [NATS](http://www.nats.io/about/) monitoring plugin reads from -specified NATS instance and submits metrics to InfluxDB. +The [NATS](http://www.nats.io/about/) monitoring plugin gathers metrics from +the NATS [monitoring http server](https://www.nats.io/documentation/server/gnatsd-monitoring/). -## Configuration +### Configuration ```toml [[inputs.nats]] - ## The address of the monitoring end-point of the NATS server + ## The address of the monitoring endpoint of the NATS server server = "http://localhost:8222" + + ## Maximum time to receive response + # response_timeout = "5s" +``` + +### Metrics: + +- nats + - tags + - server + - fields: + - uptime (integer, nanoseconds) + - mem (integer, bytes) + - subscriptions (integer, count) + - out_bytes (integer, bytes) + - connections (integer, count) + - in_msgs (integer, bytes) + - total_connections (integer, count) + - cores (integer, count) + - cpu (integer, count) + - slow_consumers (integer, count) + - routes (integer, count) + - remotes (integer, count) + - out_msgs (integer, count) + - in_bytes (integer, bytes) + +### Example Output: + +``` +nats,server=http://localhost:8222 uptime=117158348682i,mem=6647808i,subscriptions=0i,out_bytes=0i,connections=0i,in_msgs=0i,total_connections=0i,cores=2i,cpu=0,slow_consumers=0i,routes=0i,remotes=0i,out_msgs=0i,in_bytes=0i 1517015107000000000 ``` diff --git a/plugins/inputs/nats/nats.go b/plugins/inputs/nats/nats.go index 5099bd9fd..34a72b739 100644 --- a/plugins/inputs/nats/nats.go +++ b/plugins/inputs/nats/nats.go @@ -25,7 +25,7 @@ type Nats struct { var sampleConfig = ` ## The address of the monitoring endpoint of the NATS server - server = "http://localhost:1337" + server = "http://localhost:8222" ## Maximum time to receive response # response_timeout = "5s"