monitoring

package
v0.0.0-...-d1caec1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase converts all string values to snake case.

Types

type LicenseSize

type LicenseSize struct {
	AuditLicenseSize string `db:"GET_COMPLIANCE_STATUS"`
}

LicenceSize shows the restrictions of the Vertica licence.

func NewLicenseSize

func NewLicenseSize(db *sqlx.DB) []LicenseSize

NewLicenceSize returns a list of licences (only a single row)

func (LicenseSize) ToMetric

func (licenseSize LicenseSize) ToMetric() map[string]float32

ToMetric converts LicenceSize to a Map.

type NodeState

type NodeState struct {
	NodeID    string `db:"node_id"`
	NodeName  string `db:"node_name"`
	NodeState int    `db:"node_state"`
}

NodeState contains information about each node in a Vertica cluster.

func NewNodeState

func NewNodeState(db *sqlx.DB) []NodeState

NewNodeState returns the status for each node in the Vertica cluster.

func (NodeState) ToMetric

func (ns NodeState) ToMetric() map[string]float32

ToMetric converts NodeState to a Map.

type PoolRejection

type PoolRejection struct {
	NodeName       string `db:"node_name"`
	PoolName       string `db:"pool_name"`
	RejectionCount int    `db:"rejection_count"`
}

PoolRejection shows the amount of resource pool rejections per node.

func NewPoolRejections

func NewPoolRejections(db *sqlx.DB) []PoolRejection

NewPoolRejections returns a list of resource pool rejections from Vertica.

func (PoolRejection) ToMetric

func (pr PoolRejection) ToMetric() map[string]float32

ToMetric converts PoolRejection to a Map.

type PoolUsage

type PoolUsage struct {
	NodeName                string `db:"node_name"`
	PoolName                string `db:"pool_name"`
	MemoryInUseKB           int    `db:"memory_inuse_kb"`
	GeneralMemoryBorrowedKB int    `db:"general_memory_borrowed_kb"`
	RunningQueryCount       int    `db:"running_query_count"`
	MaxMemorySizeKB         int    `db:"max_memory_size_kb"`
}

PoolUsage shows gneral resource pool usage stats.

func NewPoolUsage

func NewPoolUsage(db *sqlx.DB) []PoolUsage

NewPoolUsage returns a list of pool usage stats.

func (PoolUsage) ToMetric

func (usage PoolUsage) ToMetric() map[string]float32

ToMetric converts PoolUsage to a Map.

type PrometheusMetric

type PrometheusMetric interface {
	ToMetric() map[string]float32
}

PrometheusMetric maps a struct to a Prometheus valid map.

func NewPrometheusMetrics

func NewPrometheusMetrics(db sqlx.DB) []PrometheusMetric

type QueryRequest

type QueryRequest struct {
	UserName          string `db:"user_name"`
	RequestDurationMS int    `db:"request_duration_ms"`
	MemoryAcquiredMB  int    `db:"memory_acquired_mb"`
}

QueryRequest lists query performance metrics on the username level.

func NewQueryRequests

func NewQueryRequests(db *sqlx.DB) []QueryRequest

NewQueryRequests returns query performance for all users.

func (QueryRequest) ToMetric

func (qr QueryRequest) ToMetric() map[string]float32

ToMetric converts QueryRequest to a Map.

type SchemaSize

type SchemaSize struct {
	SchemaName   string `db:"schema_name"`
	SchemaSizeGB string `db:"schema_size_gb"`
}

PoolUsage shows gneral resource pool usage stats.

func NewSchemaSize

func NewSchemaSize(db *sqlx.DB) []SchemaSize

NewPoolUsage returns a list of pool usage stats.

func (SchemaSize) ToMetric

func (usage SchemaSize) ToMetric() map[string]float32

ToMetric converts PoolUsage to a Map.

type VerticaSystem

type VerticaSystem struct {
	CurrentEpoch           int `db:"current_epoch"`
	AhmEpoch               int `db:"ahm_epoch"`
	LastGoodEpoch          int `db:"last_good_epoch"`
	RefreshEpoch           int `db:"refresh_epoch"`
	DesignedFaultTolerance int `db:"designed_fault_tolerance"`
	NodeCount              int `db:"node_count"`
	NodeDownCount          int `db:"node_down_count"`
	CurrentFaultTolerance  int `db:"current_fault_tolerance"`
	CatalogRevisionNumber  int `db:"catalog_revision_number"`
	WosUsedBytes           int `db:"wos_used_bytes"`
	WosRowCount            int `db:"wos_row_count"`
	RosUsedBytes           int `db:"ros_used_bytes"`
	RosRowCount            int `db:"ros_row_count"`
	TotalUsedBytes         int `db:"total_used_bytes"`
	TotalRowCount          int `db:"total_row_count"`
}

VerticaSystem shows important system values such as the epoch and fault tolerance levels.

func NewVerticaSystem

func NewVerticaSystem(db *sqlx.DB) VerticaSystem

NewVerticaSystem returns a new instance of VerticaSystem

func (VerticaSystem) ToMetric

func (sys VerticaSystem) ToMetric() map[string]float32

ToMetric converts VerticaSystem to a Map.

Jump to

Keyboard shortcuts

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