postgres

package
v0.34.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	DisableSettingsMetrics: false,
	AutoDiscovery: AutoDiscovery{
		Enabled: false,
	},
	DisableDefaultMetrics:   false,
	CustomQueriesConfigPath: "",
}

DefaultArguments holds the default arguments for the prometheus.exporter.postgres component.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	// DataSourceNames to use to connect to Postgres. This is marked optional because it
	// may also be supplied by the POSTGRES_EXPORTER_DATA_SOURCE_NAME env var,
	// though it is not recommended to do so.
	DataSourceNames []rivertypes.Secret `river:"data_source_names,attr,optional"`

	// Attributes
	DisableSettingsMetrics  bool   `river:"disable_settings_metrics,attr,optional"`
	DisableDefaultMetrics   bool   `river:"disable_default_metrics,attr,optional"`
	CustomQueriesConfigPath string `river:"custom_queries_config_path,attr,optional"`

	// Blocks
	AutoDiscovery AutoDiscovery `river:"autodiscovery,block,optional"`
}

Arguments configures the prometheus.exporter.postgres component

func (*Arguments) Convert

func (a *Arguments) Convert() *postgres_exporter.Config

func (*Arguments) UnmarshalRiver

func (a *Arguments) UnmarshalRiver(f func(interface{}) error) error

UnmarshalRiver implements River unmarshalling for Arguments.

type AutoDiscovery

type AutoDiscovery struct {
	Enabled           bool     `river:"enabled,attr,optional"`
	DatabaseAllowlist []string `river:"database_allowlist,attr,optional"`
	DatabaseDenylist  []string `river:"database_denylist,attr,optional"`
}

Autodiscovery controls discovery of databases outside any specified in DataSourceNames.

Jump to

Keyboard shortcuts

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