collectors

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveConnections

func ActiveConnections(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

func ArtificiallyFailingQueries

func ArtificiallyFailingQueries(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

func AuroraHardwareInfo

func AuroraHardwareInfo(auroraAdapter adapters.AuroraRDSAdapter) func(ctx context.Context, state *agent.MetricsState) error

AuroraHardwareInfo collects hardware metrics from Aurora RDS instance using the Performance Insights API or the CloudWatch API

func Autovacuum

func Autovacuum(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

func BufferCacheHitRatio

func BufferCacheHitRatio(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

BufferCacheHitRatio returns the buffer cache hit ratio. The current implementation gets only the hit ratio for the current database, we intentionally avoid aggregating the hit ratio for all databases, as this may add much noise from unused DBs.

func DatabaseSize

func DatabaseSize(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

DatabaseSize returns the size of all the databases combined in bytes

func DockerHardwareInfo

func DockerHardwareInfo(dockerAdapter adapters.DockerAdapter) func(ctx context.Context, state *agent.MetricsState) error

DockerHardwareInfo collects hardware metrics from a Docker container using the Docker API

func GetFreeableMemoryFromCW

func GetFreeableMemoryFromCW(aurora adapters.AuroraRDSAdapter) (uint64, error)

GetFreeableMemoryFromCW retrieves freeable memory (bytes) using CloudWatch

func GetMemoryUsageFromPI

func GetMemoryUsageFromPI(aurora adapters.AuroraRDSAdapter) (uint64, error)

GetMemoryUsageFromPI retrieves memory usage (bytes) using Performance Insights

func HardwareInfoOnPremise

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

func MaxConnections

func MaxConnections(pgAdapter adeptersinterfaces.PostgreSQLAdapter) (int, error)

func PGStatStatements added in v0.2.0

func PGStatStatements(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

func PGVersion

func PGVersion(pgAdapter adeptersinterfaces.PostgreSQLAdapter) (string, error)

PGVersion returns the version of the PostgreSQL instance Example: 16.4

func TransactionsPerSecond

func TransactionsPerSecond(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

func Uptime

func Uptime(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

func WaitEvents

func WaitEvents(pgAdapter adeptersinterfaces.PostgreSQLAdapter) func(ctx context.Context, state *agent.MetricsState) error

Types

type DatapointConstraint

type DatapointConstraint interface {
	types.Datapoint | pitypes.DataPoint
}

DatapointConstraint is a type constraint that allows either types.Datapoint or pi.DataPoint

Jump to

Keyboard shortcuts

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