postgres

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSCloudProviderInfo added in v1.12.0

type AWSCloudProviderInfo struct {
	ARN string `alloy:"arn,attr"`
}

type Arguments

type Arguments struct {
	DataSourceName    alloytypes.Secret   `alloy:"data_source_name,attr"`
	ForwardTo         []loki.LogsReceiver `alloy:"forward_to,attr"`
	Targets           []discovery.Target  `alloy:"targets,attr,optional"`
	EnableCollectors  []string            `alloy:"enable_collectors,attr,optional"`
	DisableCollectors []string            `alloy:"disable_collectors,attr,optional"`
	ExcludeDatabases  []string            `alloy:"exclude_databases,attr,optional"`
	ExcludeUsers      []string            `alloy:"exclude_users,attr,optional"`

	CloudProvider          *CloudProvider               `alloy:"cloud_provider,block,optional"`
	QuerySampleArguments   QuerySampleArguments         `alloy:"query_samples,block,optional"`
	QueryDetailsArguments  QueryDetailsArguments        `alloy:"query_details,block,optional"`
	SchemaDetailsArguments SchemaDetailsArguments       `alloy:"schema_details,block,optional"`
	ExplainPlansArguments  ExplainPlansArguments        `alloy:"explain_plans,block,optional"`
	HealthCheckArguments   HealthCheckArguments         `alloy:"health_check,block,optional"`
	PrometheusExporter     *PrometheusExporterArguments `alloy:"prometheus_exporter,block,optional"`
}

func (*Arguments) SetToDefault

func (a *Arguments) SetToDefault()

func (*Arguments) Validate

func (a *Arguments) Validate() error

type AzureCloudProviderInfo added in v1.13.0

type AzureCloudProviderInfo struct {
	SubscriptionID string `alloy:"subscription_id,attr"`
	ResourceGroup  string `alloy:"resource_group,attr"`
	ServerName     string `alloy:"server_name,attr,optional"`
}

type CloudProvider added in v1.12.0

type CloudProvider struct {
	AWS   *AWSCloudProviderInfo   `alloy:"aws,block,optional"`
	Azure *AzureCloudProviderInfo `alloy:"azure,block,optional"`
	GCP   *GCPCloudProviderInfo   `alloy:"gcp,block,optional"`
}

type Collector

type Collector interface {
	Name() string
	Start(context.Context) error
	Stopped() bool
	Stop()
}

type Component

type Component struct {
	// contains filtered or unexported fields
}

func New

func New(opts component.Options, args Arguments) (*Component, error)

func (*Component) CurrentHealth

func (c *Component) CurrentHealth() component.Health

func (*Component) Handler

func (c *Component) Handler() http.Handler

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

func (*Component) Update

func (c *Component) Update(args component.Arguments) error

type ExplainPlansArguments added in v1.13.0

type ExplainPlansArguments struct {
	CollectInterval time.Duration `alloy:"collect_interval,attr,optional"`
	PerCollectRatio float64       `alloy:"per_collect_ratio,attr,optional"`
}

type Exports

type Exports struct {
	Targets      []discovery.Target `alloy:"targets,attr"`
	LogsReceiver loki.LogsReceiver  `alloy:"logs_receiver,attr,optional"`
}

type GCPCloudProviderInfo added in v1.16.0

type GCPCloudProviderInfo struct {
	ConnectionName string `alloy:"connection_name,attr"`
}

type HealthCheckArguments added in v1.13.0

type HealthCheckArguments struct {
	CollectInterval time.Duration `alloy:"collect_interval,attr,optional"`
}

type PrometheusExporterArguments added in v1.15.0

type PrometheusExporterArguments exporter_postgres.Arguments

PrometheusExporterArguments configures the embedded postgres_exporter scrapers. When this block is present, postgres_exporter metrics are served alongside the component's own metrics at the same /metrics endpoint.

It is a distinct type (not an embedded struct) because the Alloy syntax system does not support anonymous/embedded fields. Note: data_source_names is ignored; the component's data_source_name is always used.

func (*PrometheusExporterArguments) SetToDefault added in v1.15.0

func (a *PrometheusExporterArguments) SetToDefault()

func (*PrometheusExporterArguments) Validate added in v1.15.0

func (a *PrometheusExporterArguments) Validate() error

type QueryDetailsArguments added in v1.15.0

type QueryDetailsArguments struct {
	CollectInterval time.Duration `alloy:"collect_interval,attr,optional"`
	StatementsLimit int           `alloy:"statements_limit,attr,optional"`
}

type QuerySampleArguments added in v1.11.0

type QuerySampleArguments struct {
	CollectInterval       time.Duration `alloy:"collect_interval,attr,optional"`
	DisableQueryRedaction bool          `alloy:"disable_query_redaction,attr,optional"`
	ExcludeCurrentUser    bool          `alloy:"exclude_current_user,attr,optional"`
}

type SchemaDetailsArguments added in v1.12.0

type SchemaDetailsArguments struct {
	CollectInterval time.Duration `alloy:"collect_interval,attr,optional"`
	CacheEnabled    bool          `alloy:"cache_enabled,attr,optional"`
	CacheSize       int           `alloy:"cache_size,attr,optional"`
	CacheTTL        time.Duration `alloy:"cache_ttl,attr,optional"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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