rethinkdb

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 14 Imported by: 181

README

RethinkDB Input Plugin

Collect metrics from RethinkDB.

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 metrics from one or many RethinkDB servers
[[inputs.rethinkdb]]
  ## An array of URI to gather stats about. Specify an ip or hostname
  ## with optional port add password. ie,
  ##   rethinkdb://user:auth_key@10.10.3.30:28105,
  ##   rethinkdb://10.10.3.33:18832,
  ##   10.0.0.1:10000, etc.
  servers = ["127.0.0.1:28015"]

  ## If you use actual rethinkdb of > 2.3.0 with username/password authorization,
  ## protocol have to be named "rethinkdb2" - it will use 1_0 H.
  # servers = ["rethinkdb2://username:password@127.0.0.1:28015"]

  ## If you use older versions of rethinkdb (<2.2) with auth_key, protocol
  ## have to be named "rethinkdb".
  # servers = ["rethinkdb://username:auth_key@127.0.0.1:28015"]

Metrics

  • rethinkdb

    • tags:
      • type
      • ns
      • rethinkdb_host
      • rethinkdb_hostname
    • fields:
      • cache_bytes_in_use (integer, bytes)
      • disk_read_bytes_per_sec (integer, reads)
      • disk_read_bytes_total (integer, bytes)
      • disk_written_bytes_per_sec (integer, bytes)
      • disk_written_bytes_total (integer, bytes)
      • disk_usage_data_bytes (integer, bytes)
      • disk_usage_garbage_bytes (integer, bytes)
      • disk_usage_metadata_bytes (integer, bytes)
      • disk_usage_preallocated_bytes (integer, bytes)
  • rethinkdb_engine

    • tags:
      • type
      • ns
      • rethinkdb_host
      • rethinkdb_hostname
    • fields:
      • active_clients (integer, clients)
      • clients (integer, clients)
      • queries_per_sec (integer, queries)
      • total_queries (integer, queries)
      • read_docs_per_sec (integer, reads)
      • total_reads (integer, reads)
      • written_docs_per_sec (integer, writes)
      • total_writes (integer, writes)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClusterTracking = []string{
	"active_clients",
	"clients",
	"queries_per_sec",
	"read_docs_per_sec",
	"written_docs_per_sec",
}
View Source
var MemberTracking = []string{
	"active_clients",
	"clients",
	"queries_per_sec",
	"total_queries",
	"read_docs_per_sec",
	"total_reads",
	"written_docs_per_sec",
	"total_writes",
}
View Source
var TableTracking = []string{
	"read_docs_per_sec",
	"total_reads",
	"written_docs_per_sec",
	"total_writes",
}

Functions

This section is empty.

Types

type Address

type Address struct {
	Host string `gorethink:"host"`
	Port int    `gorethink:"port"`
}

type Cache

type Cache struct {
	BytesInUse int64 `gorethink:"in_use_bytes"`
}

type Disk

type Disk struct {
	ReadBytesPerSec  int64      `gorethink:"read_bytes_per_sec"`
	ReadBytesTotal   int64      `gorethink:"read_bytes_total"`
	WriteBytesPerSec int64      `gorethik:"written_bytes_per_sec"`
	WriteBytesTotal  int64      `gorethink:"written_bytes_total"`
	SpaceUsage       SpaceUsage `gorethink:"space_usage"`
}

type Engine

type Engine struct {
	ClientConns   int64 `gorethink:"client_connections,omitempty"`
	ClientActive  int64 `gorethink:"clients_active,omitempty"`
	QueriesPerSec int64 `gorethink:"queries_per_sec,omitempty"`
	TotalQueries  int64 `gorethink:"queries_total,omitempty"`
	ReadsPerSec   int64 `gorethink:"read_docs_per_sec,omitempty"`
	TotalReads    int64 `gorethink:"read_docs_total,omitempty"`
	WritesPerSec  int64 `gorethink:"written_docs_per_sec,omitempty"`
	TotalWrites   int64 `gorethink:"written_docs_total,omitempty"`
}

func (*Engine) AddEngineStats

func (e *Engine) AddEngineStats(
	keys []string,
	acc telegraf.Accumulator,
	tags map[string]string,
)

type RethinkDB

type RethinkDB struct {
	Servers []string
}

func (*RethinkDB) Gather

func (r *RethinkDB) Gather(acc telegraf.Accumulator) error

Reads stats from all configured servers accumulates stats. Returns one of the errors encountered while gather stats (if any).

func (*RethinkDB) SampleConfig

func (*RethinkDB) SampleConfig() string

type Server

type Server struct {
	URL *url.URL
	// contains filtered or unexported fields
}

type SpaceUsage

type SpaceUsage struct {
	Data     int64 `gorethink:"data_bytes"`
	Garbage  int64 `gorethink:"garbage_bytes"`
	Metadata int64 `gorethink:"metadata_bytes"`
	Prealloc int64 `gorethink:"preallocated_bytes"`
}

type Storage

type Storage struct {
	Cache Cache `gorethink:"cache"`
	Disk  Disk  `gorethink:"disk"`
}

func (*Storage) AddStats

func (s *Storage) AddStats(acc telegraf.Accumulator, tags map[string]string)

Jump to

Keyboard shortcuts

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