statusglobal

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package statusglobal provides the status.global metric domain collector.

Index

Constants

View Source
const (
	DOMAIN = "status.global"

	OPT_ALL = "all"
)

Begin the collector with a const block. First define DOMAIN. Then define any OPT_* const. Then define other const as needed.

Variables

This section is empty.

Functions

This section is empty.

Types

type Global

type Global struct {
	// contains filtered or unexported fields
}

Global collects metrics for the status.global domain. The source is SHOW GLOBAL STATUS.

func NewGlobal

func NewGlobal(db *sql.DB) *Global

NewGlobal makes a new Global collector.

func (*Global) Collect

func (c *Global) Collect(ctx context.Context, levelName string) ([]blip.MetricValue, error)

Collect collects metrics at the given level.

func (*Global) Domain

func (c *Global) Domain() string

Domain returns the Blip metric domain name (DOMAIN const).

func (*Global) Help

func (c *Global) Help() blip.CollectorHelp

Help returns the output for blip --print-domains.

func (*Global) Prepare

func (c *Global) Prepare(ctx context.Context, plan blip.Plan) (func(), error)

Prepare prepares the collector for the given plan.

Jump to

Keyboard shortcuts

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