Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBMetrics ¶
type DBMetrics struct { Tables map[string]*TableMetrics SizeBytes *metrics.Gauge }
DBMetrics - includes metrics for dbs and a mapping to tables in the db
type ModeMetrics ¶
ModeMetrics - metrics on lock modes
type PostgresStat ¶
type PostgresStat struct { Metrics *PostgresStatMetrics DBs map[string]*DBMetrics Modes map[string]*ModeMetrics PGDATA string // contains filtered or unexported fields }
PostgresStat stores info on the db
func New ¶
func New(m *metrics.MetricContext, user, config string) (*PostgresStat, error)
Opens connection to postgres database and starts collector for metrics
func (*PostgresStat) CallByMethodName ¶
func (s *PostgresStat) CallByMethodName(name string) error
CallByMethodName searches for a method implemented by s with name. Runs all methods that match names.
type PostgresStatMetrics ¶
type PostgresStatMetrics struct { Uptime *metrics.Counter Version *metrics.Gauge TPS *metrics.Counter BlockReadsDisk *metrics.Counter BlockReadsCache *metrics.Counter CacheHitPct *metrics.Gauge CommitRatio *metrics.Gauge WalKeepSegments *metrics.Gauge SessionMax *metrics.Gauge SessionCurrentTotal *metrics.Gauge SessionBusyPct *metrics.Gauge ConnMaxPct *metrics.Gauge OldestTrxS *metrics.Gauge OldestQueryS *metrics.Gauge ActiveLongRunQueries *metrics.Gauge LockWaiters *metrics.Gauge CpuPct *metrics.Gauge MemPct *metrics.Gauge VSZ *metrics.Gauge RSS *metrics.Gauge UnsecureUsers *metrics.Gauge Writable *metrics.Gauge //0 if not writable, 1 if writable BackupsRunning *metrics.Gauge BinlogFiles *metrics.Gauge DBSizeBinlogs *metrics.Gauge SecondsBehindMaster *metrics.Gauge SlavesConnectedToMe *metrics.Gauge VacuumsAutoRunning *metrics.Gauge VacuumsManualRunning *metrics.Gauge SlaveBytesBehindMe *metrics.Gauge }
PostgresStatMetrics
func PostgresStatMetricsNew ¶
func PostgresStatMetricsNew(m *metrics.MetricContext) *PostgresStatMetrics
Initializes PostgresStatMetrics
type TableMetrics ¶
TableMetrics - metrics for each table
Click to show internal directories.
Click to hide internal directories.