activemq

package
v0.0.0-...-16a0e24 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 13 Imported by: 0

README

ActiveMQ Input Plugin

This plugin gather queues, topics & subscribers metrics using ActiveMQ Console API.

Configuration:
# Description
[[inputs.activemq]]
  ## ActiveMQ WebConsole URL
  url = "http://127.0.0.1:8161"

  ## Required ActiveMQ Endpoint
  ##   deprecated in 1.11; use the url option
  # server = "192.168.50.10"
  # port = 8161

  ## Credentials for basic HTTP authentication
  # username = "admin"
  # password = "admin"

  ## Required ActiveMQ webadmin root path
  # webadmin = "admin"

  ## Maximum time to receive response.
  # response_timeout = "5s"

  ## 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

Every effort was made to preserve the names based on the XML response from the ActiveMQ Console API.

  • activemq_queues
    • tags:
      • name
      • source
      • port
    • fields:
      • size
      • consumer_count
      • enqueue_count
      • dequeue_count
  • activemq_topics
    • tags:
      • name
      • source
      • port
    • fields:
      • size
      • consumer_count
      • enqueue_count
      • dequeue_count
  • activemq_subscribers
    • tags:
      • client_id
      • subscription_name
      • connection_id
      • destination_name
      • selector
      • active
      • source
      • port
    • fields:
      • pending_queue_size
      • dispatched_queue_size
      • dispatched_counter
      • enqueue_counter
      • dequeue_counter
Example Output
activemq_queues,name=sandra,host=88284b2fe51b,source=localhost,port=8161 consumer_count=0i,enqueue_count=0i,dequeue_count=0i,size=0i 1492610703000000000
activemq_queues,name=Test,host=88284b2fe51b,source=localhost,port=8161 dequeue_count=0i,size=0i,consumer_count=0i,enqueue_count=0i 1492610703000000000
activemq_topics,name=ActiveMQ.Advisory.MasterBroker\ ,host=88284b2fe51b,source=localhost,port=8161 size=0i,consumer_count=0i,enqueue_count=1i,dequeue_count=0i 1492610703000000000
activemq_topics,host=88284b2fe51b,name=AAA\,source=localhost,port=8161  size=0i,consumer_count=1i,enqueue_count=0i,dequeue_count=0i 1492610703000000000
activemq_topics,name=ActiveMQ.Advisory.Topic\,source=localhost,port=8161 ,host=88284b2fe51b enqueue_count=1i,dequeue_count=0i,size=0i,consumer_count=0i 1492610703000000000
activemq_topics,name=ActiveMQ.Advisory.Queue\,source=localhost,port=8161 ,host=88284b2fe51b size=0i,consumer_count=0i,enqueue_count=2i,dequeue_count=0i 1492610703000000000
activemq_topics,name=AAAA\ ,host=88284b2fe51b,source=localhost,port=8161 consumer_count=0i,enqueue_count=0i,dequeue_count=0i,size=0i 1492610703000000000
activemq_subscribers,connection_id=NOTSET,destination_name=AAA,,source=localhost,port=8161,selector=AA,active=no,host=88284b2fe51b,client_id=AAA,subscription_name=AAA pending_queue_size=0i,dispatched_queue_size=0i,dispatched_counter=0i,enqueue_counter=0i,dequeue_counter=0i 1492610703000000000

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveMQ

type ActiveMQ struct {
	Server          string            `toml:"server"`
	Port            int               `toml:"port"`
	URL             string            `toml:"url"`
	Username        string            `toml:"username"`
	Password        string            `toml:"password"`
	Webadmin        string            `toml:"webadmin"`
	ResponseTimeout internal.Duration `toml:"response_timeout"`
	tls.ClientConfig
	// contains filtered or unexported fields
}

func (*ActiveMQ) Description

func (a *ActiveMQ) Description() string

func (*ActiveMQ) Gather

func (a *ActiveMQ) Gather(acc telegraf.Accumulator) error

func (*ActiveMQ) GatherQueuesMetrics

func (a *ActiveMQ) GatherQueuesMetrics(acc telegraf.Accumulator, queues Queues)

func (*ActiveMQ) GatherSubscribersMetrics

func (a *ActiveMQ) GatherSubscribersMetrics(acc telegraf.Accumulator, subscribers Subscribers)

func (*ActiveMQ) GatherTopicsMetrics

func (a *ActiveMQ) GatherTopicsMetrics(acc telegraf.Accumulator, topics Topics)

func (*ActiveMQ) GetMetrics

func (a *ActiveMQ) GetMetrics(u string) ([]byte, error)

func (*ActiveMQ) Init

func (a *ActiveMQ) Init() error

func (*ActiveMQ) QueuesURL

func (a *ActiveMQ) QueuesURL() string

func (*ActiveMQ) SampleConfig

func (a *ActiveMQ) SampleConfig() string

func (*ActiveMQ) SubscribersURL

func (a *ActiveMQ) SubscribersURL() string

func (*ActiveMQ) TopicsURL

func (a *ActiveMQ) TopicsURL() string

type Queue

type Queue struct {
	XMLName xml.Name `xml:"queue"`
	Name    string   `xml:"name,attr"`
	Stats   Stats    `xml:"stats"`
}

type Queues

type Queues struct {
	XMLName    xml.Name `xml:"queues"`
	QueueItems []Queue  `xml:"queue"`
}

type Stats

type Stats struct {
	XMLName             xml.Name `xml:"stats"`
	Size                int      `xml:"size,attr"`
	ConsumerCount       int      `xml:"consumerCount,attr"`
	EnqueueCount        int      `xml:"enqueueCount,attr"`
	DequeueCount        int      `xml:"dequeueCount,attr"`
	PendingQueueSize    int      `xml:"pendingQueueSize,attr"`
	DispatchedQueueSize int      `xml:"dispatchedQueueSize,attr"`
	DispatchedCounter   int      `xml:"dispatchedCounter,attr"`
	EnqueueCounter      int      `xml:"enqueueCounter,attr"`
	DequeueCounter      int      `xml:"dequeueCounter,attr"`
}

type Subscriber

type Subscriber struct {
	XMLName          xml.Name `xml:"subscriber"`
	ClientId         string   `xml:"clientId,attr"`
	SubscriptionName string   `xml:"subscriptionName,attr"`
	ConnectionId     string   `xml:"connectionId,attr"`
	DestinationName  string   `xml:"destinationName,attr"`
	Selector         string   `xml:"selector,attr"`
	Active           string   `xml:"active,attr"`
	Stats            Stats    `xml:"stats"`
}

type Subscribers

type Subscribers struct {
	XMLName         xml.Name     `xml:"subscribers"`
	SubscriberItems []Subscriber `xml:"subscriber"`
}

type Topic

type Topic struct {
	XMLName xml.Name `xml:"topic"`
	Name    string   `xml:"name,attr"`
	Stats   Stats    `xml:"stats"`
}

type Topics

type Topics struct {
	XMLName    xml.Name `xml:"topics"`
	TopicItems []Topic  `xml:"topic"`
}

Jump to

Keyboard shortcuts

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