postgresql

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnMapping

type ColumnMapping struct {
	// contains filtered or unexported fields
}

ColumnMapping is the user-friendly representation of a prometheus descriptor map

type ColumnUsage

type ColumnUsage int

ColumnUsage should be one of several enum values which describe how a queried row is to be converted to a Prometheus metric.

const (
	DISCARD      ColumnUsage = iota // Ignore this column
	LABEL        ColumnUsage = iota // Use this column as a label
	COUNTER      ColumnUsage = iota // Use this column as a counter
	GAUGE        ColumnUsage = iota // Use this column as a gauge
	MAPPEDMETRIC ColumnUsage = iota // Use this column with the supplied mapping of text values
	DURATION     ColumnUsage = iota // This column should be interpreted as a text duration (and converted to milliseconds)
	HISTOGRAM    ColumnUsage = iota // Use this column as a histogram
)

nolint: golint

type OverrideQuery

type OverrideQuery struct {
	// contains filtered or unexported fields
}

type Postgresql

type Postgresql struct {
	Dsn string

	Version   semver.Version
	Namespace []string

	ExcludeDatabases         []string
	GatherPgSetting          bool
	GatherPgStatReplication  bool
	GatherPgReplicationSlots bool
	GatherPgStatArchiver     bool
	// contains filtered or unexported fields
}

func (*Postgresql) Description

func (p *Postgresql) Description() string

func (*Postgresql) Gather

func (p *Postgresql) Gather(acc telegraf.Accumulator) error

func (*Postgresql) IgnoredColumns

func (p *Postgresql) IgnoredColumns() map[string]bool

func (*Postgresql) SampleConfig

func (p *Postgresql) SampleConfig() string

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(dsn string) (*Server, error)

NewServer establishes a new connection using DSN.

func (*Server) Close

func (s *Server) Close() error

Close disconnects from Postgres.

func (*Server) Ping

func (s *Server) Ping() error

Ping checks connection availability and possibly invalidates the connection if it fails.

Jump to

Keyboard shortcuts

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