postgres

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 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 []alloytypes.Secret `alloy:"data_source_names,attr,optional"`

	// Attributes
	DisableSettingsMetrics  bool     `alloy:"disable_settings_metrics,attr,optional"`
	DisableDefaultMetrics   bool     `alloy:"disable_default_metrics,attr,optional"`
	CustomQueriesConfigPath string   `alloy:"custom_queries_config_path,attr,optional"`
	EnabledCollectors       []string `alloy:"enabled_collectors,attr,optional"`

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

Arguments configures the prometheus.exporter.postgres component

func (*Arguments) SetToDefault

func (a *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*Arguments) Validate

func (a *Arguments) Validate() error

type AutoDiscovery

type AutoDiscovery struct {
	Enabled           bool     `alloy:"enabled,attr,optional"`
	DatabaseAllowlist []string `alloy:"database_allowlist,attr,optional"`
	DatabaseDenylist  []string `alloy:"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