collector

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package collector contains all statistic collectors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	Collect(datasource *Datasource) *dto.Stat
	Conf() Config
}

All collectors must satisfy collector.Collector interface

type Config

type Config struct {
	Cron    string `hcl:"cron"`
	Enabled bool   `hcl:"enabled"`
}

Config represents base configuration of each collector

type Cpu

type Cpu Config

Cpu collects statistics about CPU usage

func (*Cpu) Collect

func (c *Cpu) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*Cpu) Conf

func (c *Cpu) Conf() Config

Conf return the configuration of the collector

type Datasource

type Datasource struct {
	DsDto            *dto.Datasource
	PgStats          *pgstats.PgStats
	ConnectionString *string
}

Datasource contains information from where the collector should gather statistics

type Disk

type Disk Config

Disk collects statistics about disk usage and disk I/O

func (*Disk) Collect

func (d *Disk) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*Disk) Conf

func (d *Disk) Conf() Config

Conf return the configuration of the collector

type Load

type Load Config

Load collects statistics about CPU load (linux only)

func (*Load) Collect

func (l *Load) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*Load) Conf

func (l *Load) Conf() Config

Conf return the configuration of the collector

type Net

type Net Config

Net collects statistics about network I/O

func (*Net) Collect

func (n *Net) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*Net) Conf

func (n *Net) Conf() Config

Conf return the configuration of the collector

type PgLocks

type PgLocks Config

PgLocks collects statistics about locks

func (*PgLocks) Collect

func (p *PgLocks) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*PgLocks) Conf

func (p *PgLocks) Conf() Config

Conf return the configuration of the collector

type PgStatActivity

type PgStatActivity Config

PgStatActivity collects statistics about current server process activity

func (*PgStatActivity) Collect

func (p *PgStatActivity) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*PgStatActivity) Conf

func (p *PgStatActivity) Conf() Config

Conf return the configuration of the collector

type PgStatArchiver

type PgStatArchiver Config

PgStatArchiver collects statistics about WAL archiver process's activity

func (*PgStatArchiver) Collect

func (p *PgStatArchiver) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*PgStatArchiver) Conf

func (p *PgStatArchiver) Conf() Config

Conf return the configuration of the collector

type PgStatStatements

type PgStatStatements Config

PgStatStatements collects execution statistics of all SQL statements executed by a server

func (*PgStatStatements) Collect

func (p *PgStatStatements) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*PgStatStatements) Conf

func (p *PgStatStatements) Conf() Config

Conf return the configuration of the collector

type PgStatUserIndexes

type PgStatUserIndexes Config

PgStatUserIndexes collects statistics about user-defined indexes

func (*PgStatUserIndexes) Collect

func (p *PgStatUserIndexes) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*PgStatUserIndexes) Conf

func (p *PgStatUserIndexes) Conf() Config

Conf return the configuration of the collector

type PgStatUserTables

type PgStatUserTables Config

PgStatUserTables collects statistics about user-defined tables

func (*PgStatUserTables) Collect

func (p *PgStatUserTables) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*PgStatUserTables) Conf

func (p *PgStatUserTables) Conf() Config

Conf return the configuration of the collector

type SwapMem

type SwapMem Config

SwapMem collects statistics about swap memory usage

func (*SwapMem) Collect

func (m *SwapMem) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*SwapMem) Conf

func (m *SwapMem) Conf() Config

Conf return the configuration of the collector

type VirtMem

type VirtMem Config

VirtMem collects statistics about virtual memory usage

func (*VirtMem) Collect

func (m *VirtMem) Collect(datasource *Datasource) *dto.Stat

Collect collects statistics from given datasource

func (*VirtMem) Conf

func (m *VirtMem) Conf() Config

Conf return the configuration of the collector

Jump to

Keyboard shortcuts

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