Documentation

NSQ Input Plugin

This plugin gathers metrics from NSQ realtime distributed messaging platform instances using the NSQD API.

Introduced in: Telegraf v1.16.0 Tags: server OS support: all

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Configuration

# Read NSQ topic and channel statistics.
[[inputs.nsq]]
  ## An array of NSQD HTTP API endpoints
  endpoints  = ["http://localhost:4151"]

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false

Metrics

  • nsq_server:
    • tags:
      • server_host
      • server_version
    • fields:
      • server_count
      • topic_count
  • nsq_topic:
    • tags:
      • server_host
      • server_version
      • topic
    • fields:
      • backend_depth
      • channel_count
      • depth
      • message_count
  • nsq_channel:
    • tags:
      • server_host
      • server_version
      • topic
      • channel
    • fields:
      • backend_depth
      • client_count
      • depth
      • deferred_count
      • inflight_count
      • message_count
      • requeue_count
      • timeout_count
  • nsq_client:
    • tags:
      • channel
      • client_address
      • client_hostname
      • client_id
      • client_name
      • client_user_agent
      • client_deflate
      • client_snappy
      • client_tls
      • client_version
      • server_host
      • server_version
      • topic
    • fields:
      • finish_count
      • inflight_count
      • message_count
      • ready_count
      • requeue_count

Example Output

nsq_server,server_host=127.0.0.1:35871,server_version=0.3.6 server_count=1i,topic_count=2i 1742836824386224245
nsq_topic,server_host=127.0.0.1:35871,server_version=0.3.6,topic=t1 backend_depth=13i,channel_count=1i,depth=12i,message_count=14i 1742836824386235365
nsq_channel,channel=c1,server_host=127.0.0.1:35871,server_version=0.3.6,topic=t1 backend_depth=1i,client_count=1i,deferred_count=3i,depth=0i,inflight_count=2i,message_count=4i,requeue_count=5i,timeout_count=6i 1742836824386241985
nsq_client,channel=c1,client_address=172.17.0.11:35560,client_deflate=false,client_hostname=373a715cd990,client_id=373a715cd990,client_name=373a715cd990,client_snappy=false,client_tls=false,client_user_agent=nsq_to_nsq/0.3.6\ go-nsq/1.0.5,client_version=V2,server_host=127.0.0.1:35871,server_version=0.3.6,topic=t1 finish_count=9i,inflight_count=7i,message_count=8i,ready_count=200i,requeue_count=10i 1742836824386252905
nsq_topic,server_host=127.0.0.1:35871,server_version=0.3.6,topic=t2 backend_depth=29i,channel_count=1i,depth=28i,message_count=30i 1742836824386263806
nsq_channel,channel=c2,server_host=127.0.0.1:35871,server_version=0.3.6,topic=t2 backend_depth=16i,client_count=1i,deferred_count=18i,depth=15i,inflight_count=17i,message_count=19i,requeue_count=20i,timeout_count=21i 1742836824386270026
nsq_client,channel=c2,client_address=172.17.0.8:48145,client_deflate=true,client_hostname=377569bd462b,client_id=377569bd462b,client_name=377569bd462b,client_snappy=true,client_tls=true,client_user_agent=go-nsq/1.0.5,client_version=V2,server_host=127.0.0.1:35871,server_version=0.3.6,topic=t2 finish_count=25i,inflight_count=23i,message_count=24i,ready_count=22i,requeue_count=26i 1742836824386277926

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

New in InfluxDB 3.4

Key enhancements in InfluxDB 3.4 and the InfluxDB 3 Explorer 1.2.

See the Blog Post

InfluxDB 3.4 is now available for both Core and Enterprise, which introduces offline token generation for use in automated deployments and configurable license type selection that lets you bypass the interactive license prompt. InfluxDB 3 Explorer 1.2 is also available, which includes InfluxDB cache management and other new features.

For more information, check out: