cluster_status

package
v0.0.0-...-be347a3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(base mb.BaseMetricSet) (mb.MetricSet, error)

New creates a new instance of the cluster_status MetricSet.

Types

type HealthRequest

type HealthRequest struct {
	Status string `json:"status"`
	Output Output `json:"output"`
}

HealthRequest represents the response to a health request

type MetricSet

type MetricSet struct {
	mb.BaseMetricSet
	*helper.HTTP
}

MetricSet type defines all fields of the MetricSet

func (*MetricSet) Fetch

func (m *MetricSet) Fetch(reporter mb.ReporterV2) error

Fetch methods implements the data gathering and data conversion to the right format. It publishes the event which is then forwarded to the output. In case of an error set the Error field of mb.Event or simply call report.Error().

type Osdmap

type Osdmap struct {
	Epoch      int64 `json:"epoch"`
	Full       bool  `json:"full"`
	Nearfull   bool  `json:"nearfull"`
	OsdNum     int64 `json:"num_osds"`
	UpOsds     int64 `json:"num_up_osds"`
	InOsds     int64 `json:"num_in_osds"`
	RemapedPgs int64 `json:"num_remapped_pgs"`
}

Osdmap represents data from an OSD

type Osdmap_

type Osdmap_ struct {
	Osdmap Osdmap `json:"osdmap"`
}

Osdmap_ is a placeholder for the json parser

type Output

type Output struct {
	Pgmap  Pgmap   `json:"pgmap"`
	Osdmap Osdmap_ `json:"osdmap"`
}

Output is the response body

type PgState

type PgState struct {
	Count     int64  `json:"count"`
	StateName string `json:"state_name"`
}

PgState represents placement group state

type Pgmap

type Pgmap struct {
	AvailByte int64 `json:"bytes_avail"`
	TotalByte int64 `json:"bytes_total"`
	UsedByte  int64 `json:"bytes_used"`
	DataByte  int64 `json:"data_bytes"`

	DegradedObjs  int64   `json:"degraded_objects"`
	DegradedRatio float64 `json:"degraded_ratio"`
	DegradedTotal int64   `json:"degraded_total"`

	MisplacedObjs  int64   `json:"misplaced_objects"`
	MisplacedRatio float64 `json:"misplaced_ratio"`
	MisplacedTotal int64   `json:"misplaced_total"`

	ReadByteSec  int64 `json:"read_bytes_sec"`
	ReadOpSec    int64 `json:"read_op_per_sec"`
	WriteByteSec int64 `json:"write_bytes_sec"`
	WriteOpSec   int64 `json:"write_op_per_sec"`
	Version      int64 `json:"version"`

	PgNum    int64     `json:"num_pgs"`
	PgStates []PgState `json:"pgs_by_state"`
}

Pgmap represents data from a placement group

Jump to

Keyboard shortcuts

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