Versions in this module Expand all Collapse all v3 v3.1.0 Feb 13, 2025 v3.0.0 Dec 17, 2024 Changes in this version + const CSVLogDefaultGlobSuffix + const CSVLogDefaultRegEx + var PgSeverities = [...]string + var PgSeveritiesLocale = map[string]map[string]string + func GetDefaultBuiltInMetrics() []string + func ParseLogs(ctx context.Context, conn db.PgxIface, mdb *sources.MonitoredDatabase, ...) + type CmdOpts struct + CreateHelpers bool + DirectOSStats bool + EmergencyPauseTriggerfile string + InstanceLevelCacheMaxSeconds int64 + Metrics string + type ExtensionInfo struct + ExtMinVersion string + ExtName string + type ExtensionOverrides struct + ExpectedExtensionVersions []ExtensionInfo + TargetMetric string + type Measurement map[string]any + type MeasurementEnvelope struct + CustomTags map[string]string + DBName string + Data Measurements + MetricDef Metric + MetricName string + RealDbname string + SourceType string + SystemIdentifier string + type Measurements []map[string]any + type Metric struct + Description string + Gauges []string + InitSQL string + IsInstanceLevel bool + NodeStatus string + SQLs SQLs + StorageName string + func (m Metric) GetSQL(version int) string + func (m Metric) PrimaryOnly() bool + func (m Metric) StandbyOnly() bool + type MetricAttrs struct + DisableTimes []string + DisabledDays string + ExtensionVersionOverrides []ExtensionOverrides + IsPrivate bool + StatementTimeoutSeconds int64 + type MetricDefs map[string]Metric + type Metrics struct + MetricDefs MetricDefs + PresetDefs PresetDefs + func GetDefaultMetrics() (metrics *Metrics) + type Migrator interface + Migrate func() error + NeedsMigration func() (bool, error) + type Preset struct + Description string + Metrics map[string]float64 + type PresetDefs map[string]Preset + type Reader interface + GetMetrics func() (*Metrics, error) + type ReaderWriter interface + func NewDefaultMetricReader(context.Context) (ReaderWriter, error) + func NewPostgresMetricReaderWriter(ctx context.Context, connstr string) (ReaderWriter, error) + func NewPostgresMetricReaderWriterConn(ctx context.Context, conn db.PgxPoolIface) (ReaderWriter, error) + func NewYAMLMetricReaderWriter(ctx context.Context, path string) (ReaderWriter, error) + type SQLs map[int]string + type Writer interface + DeleteMetric func(metricName string) error + DeletePreset func(presetName string) error + UpdateMetric func(metricName string, metric Metric) error + UpdatePreset func(presetName string, preset Preset) error + WriteMetrics func(metricDefs *Metrics) error