postgresql

package
v0.0.0-...-54d14c8 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Counters = map[string]string{
	"xact_commit":   "xact.commits",
	"xact_rollback": "xact.rollbacks",
	"blks_read":     "performance.disk_read",
	"blks_hit":      "performance.buffer_hit",
	"tup_returned":  "rows.returned",
	"tup_fetched":   "rows.fetched",
	"tup_inserted":  "rows.inserted",
	"tup_updated":   "rows.updated",
	"tup_deleted":   "rows.deleted",
}

Counters - XXX

View Source
var DatabaseStatsSQL = `SELECT %s FROM pg_stat_database WHERE datname IN ('%s')`

DatabaseStatsSQL - XXX

View Source
var Gauges = map[string]string{
	"numbackends": "connections",
}

Gauges - XXX

View Source
var IndexCacheHitRateSQL = `` /* 1108-byte string literal not displayed */

https://gist.github.com/mattsoldo/3853455

View Source
var MissingIndexesSQL = `` /* 389-byte string literal not displayed */

MissingIndexesSQL - XXX

View Source
var SlowQueriesSQL = `` /* 359-byte string literal not displayed */

SlowQueriesSQL - XXX

View Source
var TableSizeSQL = `` /* 419-byte string literal not displayed */

TableSizeSQL - XXX

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string
	DB   string
}

Config - XXX

type IndexHitRateData

type IndexHitRateData struct {
	Headers []string      `json:"headers"`
	Data    []interface{} `json:"data"`
}

IndexHitRateData - XXX

type PerformanceStruct

type PerformanceStruct struct {
	TableSizeData    `json:"tables_size"`
	IndexHitRateData `json:"index_hit_rate"`
	SlowQueriesData  `json:"slow_queries"`
	Gauges           map[string]interface{} `json:"gauges"`
	Counters         map[string]interface{} `json:"counters"`
}

PerformanceStruct - XXX

func (PerformanceStruct) String

func (p PerformanceStruct) String() string

type PostgreSQL

type PostgreSQL struct {
	Config Config
}

PostgreSQL - XXX

func (*PostgreSQL) Collect

func (p *PostgreSQL) Collect() (interface{}, error)

Collect - XXX

func (*PostgreSQL) Description

func (p *PostgreSQL) Description() string

Description - XXX

func (*PostgreSQL) SampleConfig

func (p *PostgreSQL) SampleConfig() string

SampleConfig - XXX

func (*PostgreSQL) SetConfigDefaults

func (p *PostgreSQL) SetConfigDefaults() error

SetConfigDefaults - XXX

func (*PostgreSQL) Start

func (p *PostgreSQL) Start() error

Start - XXX

func (*PostgreSQL) Stop

func (p *PostgreSQL) Stop()

Stop - XXX

type SlowQueriesData

type SlowQueriesData struct {
	Headers []string      `json:"headers"`
	Data    []interface{} `json:"data"`
}

SlowQueriesData - XXX

type TableSizeData

type TableSizeData struct {
	Headers []string      `json:"headers"`
	Data    []interface{} `json:"data"`
}

TableSizeData - XXX

Jump to

Keyboard shortcuts

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