Versions in this module Expand all Collapse all v1 v1.0.0 May 31, 2020 Changes in this version + func DBToFloat64(t interface{}) (float64, bool) + func DBToString(t interface{}) (string, bool) + func GetDataSources() []string + func MakeDescMap(pgVersion semver.Version, serverLabels prometheus.Labels, ...) map[string]MetricMapNamespace + func ParseConstLabels(s string) prometheus.Labels + func ParseFingerprint(url string) (string, error) + func ParseVersion(versionString string) (semver.Version, error) + func PrintExporterMaps(exp *Exporter) + func QuerySettings(ch chan<- prometheus.Metric, server *Server) error + type ColumnMapping struct + func NewColumnMapping(u ColumnUsage, desc string, mapping *map[string]float64, ver semver.Range) *ColumnMapping + func (cm *ColumnMapping) GetSupportedVersions() semver.Range + func (cm *ColumnMapping) SetSupportedVersions(ver semver.Range) + func (cm *ColumnMapping) UnmarshalYAML(unmarshal func(interface{}) error) error + type ColumnUsage int + const COUNTER + const DISCARD + const DURATION + const GAUGE + const LABEL + const MAPPEDMETRIC + func (cu *ColumnUsage) UnmarshalYAML(unmarshal func(interface{}) error) error + type ErrorConnectToServer struct + Msg string + func (e *ErrorConnectToServer) Error() string + type Exporter struct + func NewExporter(dsn []string, opts ...ExporterOpt) *Exporter + func (e *Exporter) CloseAllServers() + func (e *Exporter) Collect(ch chan<- prometheus.Metric) + func (e *Exporter) Describe(ch chan<- *prometheus.Desc) + type ExporterOpt func(*Exporter) + func AutoDiscoverDatabases(b bool) ExporterOpt + func DisableDefaultMetrics(b bool) ExporterOpt + func DisableSettingsMetrics(b bool) ExporterOpt + func ExcludeDatabases(s string) ExporterOpt + func WithConstantLabels(s string) ExporterOpt + func WithUserQueriesPath(p string) ExporterOpt + type MetricMap struct + func (mm *MetricMap) GetDiscard() bool + type MetricMapNamespace struct + func GetNamespace(metricMapNamespaces *map[string]MetricMapNamespace, mapName string) *MetricMapNamespace + func (mmn *MetricMapNamespace) GetColumnMapping(mapName string) *MetricMap + func (mmn *MetricMapNamespace) GetMetricMap(metricMapNamespaces *map[string]MetricMapNamespace, namespace string, ...) *MetricMap + type OverrideQuery struct + type Server struct + func NewServer(dsn string, opts ...ServerOpt) (*Server, error) + func (s *Server) Close() + func (s *Server) Ping() error + func (s *Server) Scrape(ch chan<- prometheus.Metric, disableSettingsMetrics bool) error + func (s *Server) String() string + type ServerOpt func(*Server) + func ServerWithLabels(labels prometheus.Labels) ServerOpt + type Servers struct + func NewServers(opts ...ServerOpt) *Servers + func (s *Servers) Close() + func (s *Servers) GetServer(dsn string) (*Server, error)