Documentation
¶
Overview ¶
Package model is a pgSCV model
Index ¶
Constants ¶
View Source
const ( // ServiceTypeSystem defines label string for system service. ServiceTypeSystem = "system" // ServiceTypePostgresql defines label string for Postgres services. ServiceTypePostgresql = "postgres" // ServiceTypePgbouncer defines label string for Pgbouncer services. ServiceTypePgbouncer = "pgbouncer" // ServiceTypePatroni defines label string for Patroni services. ServiceTypePatroni = "patroni" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectorSettings ¶
type CollectorSettings struct {
// Filters defines label-based filters applied to metrics.
Filters filter.Filters `yaml:"filters"`
// Subsystems defines subsystem with user-defined metrics.
Subsystems Subsystems `yaml:"subsystems"`
}
CollectorSettings unions all settings related to a single collector.
type CollectorsSettings ¶
type CollectorsSettings map[string]CollectorSettings
CollectorsSettings unions all collectors settings in one place.
type MetricsSubsystem ¶
type MetricsSubsystem struct {
// Databases defines which databases should be visited for collecting metrics.
Databases string `yaml:"databases"`
// DatabasesRE defines regexp object based on Databases.
DatabasesRE *regexp.Regexp
// Query defines a SQL statement used for getting label/values for metrics.
Query string `yaml:"query"`
// Metrics defines a list of labels and metrics should be extracted from Query result.
Metrics Metrics `yaml:"metrics"`
}
MetricsSubsystem describes a single subsystem.
type PGResult ¶
type PGResult struct {
Nrows int
Ncols int
Colnames []pgproto3.FieldDescription
Rows [][]sql.NullString
}
PGResult is the iterable store that contains query result (data and metadata) returned from Postgres
type Subsystems ¶
type Subsystems map[string]MetricsSubsystem
Subsystems unions all subsystems in one place.
type UserMetric ¶
type UserMetric struct {
ShortName string `yaml:"name"`
Usage string `yaml:"usage"`
Labels []string `yaml:"labels,omitempty"`
Value string `yaml:"value"`
LabeledValues map[string][]string `yaml:"labeled_values,omitempty"`
Description string `yaml:"description"`
}
UserMetric defines a single user-defined metric and its properties.
Click to show internal directories.
Click to hide internal directories.