pgprem

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCollectors

func DefaultCollectors(pgAdapter *DefaultPostgreSQLAdapter) []agent.MetricCollector

func GetDiskType

func GetDiskType(pgDriver *pgxpool.Pool) (string, error)

func HardwareInfoOnPremise

func HardwareInfoOnPremise() func(ctx context.Context, state *agent.MetricsState) error

Types

type DefaultPostgreSQLAdapter

type DefaultPostgreSQLAdapter struct {
	agent.CommonAgent

	GuardrailConfig guardrails.Config
	PGVersion       string
	// contains filtered or unexported fields
}

func CreateDefaultPostgreSQLAdapter

func CreateDefaultPostgreSQLAdapter() (*DefaultPostgreSQLAdapter, error)

func (*DefaultPostgreSQLAdapter) ApplyConfig

func (adapter *DefaultPostgreSQLAdapter) ApplyConfig(proposedConfig *agent.ProposedConfigResponse) error

func (*DefaultPostgreSQLAdapter) GetActiveConfig

func (adapter *DefaultPostgreSQLAdapter) GetActiveConfig() (agent.ConfigArraySchema, error)

func (*DefaultPostgreSQLAdapter) GetSystemInfo

func (adapter *DefaultPostgreSQLAdapter) GetSystemInfo() ([]metrics.FlatValue, error)

func (*DefaultPostgreSQLAdapter) Guardrails

func (adapter *DefaultPostgreSQLAdapter) Guardrails() *guardrails.Signal

Guardrails for default PostgreSQL adapter performs the following: 1. Checks if the total memory is set. If not fetches it from the system and sets it in cache. 2. Fetches current memory usage 3. If memory usage is greater than 90% of total memory, triggers a critical guardrail

Jump to

Keyboard shortcuts

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