collector

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInnoDbStatus

func GetInnoDbStatus(ctx context.Context, db *sql.DB) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

func GetMutexStatus

func GetMutexStatus(ctx context.Context, db *sql.DB) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

func GetProcesslist

func GetProcesslist(ctx context.Context, db *sql.DB) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

func GetTransactions

func GetTransactions(ctx context.Context, db *sql.DB) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

func GetVariables

func GetVariables(ctx context.Context, db *sql.DB) error

Scrape collects data from database connection and sends it over channel as prometheus metric.

Types

type InnodbStatus

type InnodbStatus struct {
	CollectorType string         `json:"COLLECTOR_TYPE"`
	Type          sql.NullString `json:"TYPE"`
	Name          sql.NullString `json:"NAME"`
	Status        sql.NullString `json:"STATUS"`
}

type MutexStatus

type MutexStatus struct {
	CollectorType string         `json:"COLLECTOR_TYPE"`
	Type          sql.NullString `json:"TYPE"`
	Name          sql.NullString `json:"NAME"`
	Status        sql.NullString `json:"STATUS"`
}

type Processlist

type Processlist struct {
	CollectorType string         `json:"COLLECTOR_TYPE"`
	ID            sql.NullInt64  `json:"ID"`
	User          sql.NullString `json:"USER"`
	Db            sql.NullString `json:"DB"`
	Command       sql.NullString `json:"COMMAND"`
	Time          sql.NullInt64  `json:"TIME"`
	State         sql.NullString `json:"STATE"`
	Info          sql.NullString `json:"INFO"`
}

type Transactions

type Transactions struct {
	CollectorType           string         `json:"COLLECTOR_TYPE"`
	TrxID                   sql.NullInt64  `json:"TRX_ID"`
	TrxState                sql.NullString `json:"TRX_STATE"`
	TrxStarted              sql.NullString `json:"TRX_STARTED"`
	TrxRequestedLockID      sql.NullString `json:"TRX_REQUESTED_LOCK_ID"`
	TrxWaitStarted          sql.NullString `json:"TRX_WAIT_STARTED"`
	TrxWeight               sql.NullInt64  `json:"TRX_WEIGHT"`
	TrxMysqlThreadID        sql.NullInt64  `json:"TRX_MYSQL_THREAD_ID"`
	TrxQuery                sql.NullString `json:"TRX_QUERY"`
	TrxOperationState       sql.NullString `json:"TRX_OPERATION_STATE"`
	TrxTablesInUse          sql.NullInt64  `json:"TRX_TABLES_IN_USE"`
	TrxTablesLocked         sql.NullInt64  `json:"TRX_TABLES_LOCKED"`
	TrxLockStructs          sql.NullInt64  `json:"TRX_LOCK_STRUCTS"`
	TrxLockMemoryBytes      sql.NullInt64  `json:"TRX_LOCK_MEMORY_BYTES"`
	TrxRowsLocked           sql.NullInt64  `json:"TRX_ROWS_LOCKED"`
	TrxRowsModified         sql.NullInt64  `json:"TRX_ROWS_MODIFIED"`
	TrxConcurrencyTickets   sql.NullInt64  `json:"TRX_CONCURRENCY_TICKETS"`
	TrxIsolationLevel       sql.NullString `json:"TRX_ISOLATION_LEVEL"`
	TrxUniqueChecks         sql.NullInt64  `json:"TRX_UNIQUE_CHECKS"`
	TrxForeignKeyChecks     sql.NullInt64  `json:"TRX_FOREIGN_KEY_CHECKS"`
	TrxLastForeignKeyError  sql.NullString `json:"TRX_LAST_FOREIGN_KEY_ERROR"`
	TrxAdaptiveHashLatched  sql.NullInt64  `json:"TRX_ADAPTIVE_HASH_LATCHED"`
	TrxAdaptiveHashTimeout  sql.NullInt64  `json:"TRX_ADAPTIVE_HASH_TIMEOUT"`
	TrxIsReadOnly           sql.NullInt64  `json:"TRX_IS_READ_ONLY"`
	TrxAutoCommitNonLocking sql.NullInt64  `json:"TRX_AUTO_COMMIT_NON_LOCKING"`
}

type Variables

type Variables struct {
	CollectorType string         `json:"COLLECTOR_TYPE"`
	VariableName  sql.NullString `json:"VARIABLE_NAME"`
	Value         sql.NullString `json:"VALUE"`
}

Jump to

Keyboard shortcuts

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