nsq_consumer

package
v0.0.0-...-c6d3e3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2017 License: MIT Imports: 5 Imported by: 0

README

NSQ Consumer Input Plugin

The NSQ consumer plugin polls a specified NSQD topic and adds messages to InfluxDB. This plugin allows a message to be in any of the supported data_format types.

Configuration

# Read metrics from NSQD topic(s)
[[inputs.nsq_consumer]]
  ## An array of NSQD HTTP API endpoints
  server = "localhost:4150"
  topic = "telegraf"
  channel = "consumer"
  max_in_flight = 100

  ## Data format to consume.
  ## Each data format has it's own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  data_format = "influx"

Testing

The nsq_consumer_test mocks out the interaction with NSQD. It requires no outside dependencies.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NSQConsumer

type NSQConsumer struct {
	Server      string
	Topic       string
	Channel     string
	MaxInFlight int
	// contains filtered or unexported fields
}

NSQConsumer represents the configuration of the plugin

func (*NSQConsumer) Description

func (n *NSQConsumer) Description() string

Description prints description string

func (*NSQConsumer) Gather

func (n *NSQConsumer) Gather(acc telegraf.Accumulator) error

Gather is a noop

func (*NSQConsumer) SampleConfig

func (n *NSQConsumer) SampleConfig() string

SampleConfig returns config values for generating a sample configuration file

func (*NSQConsumer) SetParser

func (n *NSQConsumer) SetParser(parser parsers.Parser)

SetParser takes the data_format from the config and finds the right parser for that format

func (*NSQConsumer) Start

func (n *NSQConsumer) Start(acc telegraf.Accumulator) error

Start pulls data from nsq

func (*NSQConsumer) Stop

func (n *NSQConsumer) Stop()

Stop processing messages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL