Documentation
¶
Index ¶
- func GetInnoDbStatus(ctx context.Context, db *sql.DB) error
- func GetMutexStatus(ctx context.Context, db *sql.DB) error
- func GetProcesslist(ctx context.Context, db *sql.DB) error
- func GetTransactions(ctx context.Context, db *sql.DB) error
- func GetVariables(ctx context.Context, db *sql.DB) error
- type InnodbStatus
- type MutexStatus
- type Processlist
- type Transactions
- type Variables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInnoDbStatus ¶
Scrape collects data from database connection and sends it over channel as prometheus metric.
func GetMutexStatus ¶
Scrape collects data from database connection and sends it over channel as prometheus metric.
func GetProcesslist ¶
Scrape collects data from database connection and sends it over channel as prometheus metric.
func GetTransactions ¶
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"`
}
Click to show internal directories.
Click to hide internal directories.