Documentation
¶
Index ¶
- func DefaultCollectors(pgAdapter *DefaultPostgreSQLAdapter) []agent.MetricCollector
- func GetDiskType(pgDriver *pgxpool.Pool) (string, error)
- func HardwareInfoOnPremise() func(ctx context.Context, state *agent.MetricsState) error
- type DefaultPostgreSQLAdapter
- func (adapter *DefaultPostgreSQLAdapter) ApplyConfig(proposedConfig *agent.ProposedConfigResponse) error
- func (adapter *DefaultPostgreSQLAdapter) GetActiveConfig() (agent.ConfigArraySchema, error)
- func (adapter *DefaultPostgreSQLAdapter) GetSystemInfo() ([]metrics.FlatValue, error)
- func (adapter *DefaultPostgreSQLAdapter) Guardrails() *guardrails.Signal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCollectors ¶
func DefaultCollectors(pgAdapter *DefaultPostgreSQLAdapter) []agent.MetricCollector
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
Click to show internal directories.
Click to hide internal directories.