monitor_health

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: 7 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)

Types

type Health

type Health struct {
	HealthServices []HealthServices `json:"health_services"`
}

type HealthRequest

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

type HealthServices

type HealthServices struct {
	Mons []Mon `json:"mons"`
}

type MetricSet

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

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 Mon

type Mon struct {
	LastUpdated  Tick       `json:"last_updated"`
	Name         string     `json:"name"`
	AvailPercent int64      `json:"avail_percent"`
	KbTotal      int64      `json:"kb_total"`
	KbAvail      int64      `json:"kb_avail"`
	Health       string     `json:"health"`
	KbUsed       int64      `json:"kb_used"`
	StoreStats   StoreStats `json:"store_stats"`
}

type Output

type Output struct {
	OverallStatus string    `json:"overall_status"`
	Timechecks    Timecheck `json:"timechecks"`
	Health        Health    `json:"health"`
}

type StoreStats

type StoreStats struct {
	BytesTotal  int64  `json:"bytes_total"`
	BytesLog    int64  `json:"bytes_log"`
	LastUpdated string `json:"last_updated"`
	BytesMisc   int64  `json:"bytes_misc"`
	BytesSSt    int64  `json:"bytes_sst"`
}

type Tick

type Tick struct {
	time.Time
}

func (*Tick) MarshalJSON

func (t *Tick) MarshalJSON() ([]byte, error)

func (*Tick) UnmarshalJSON

func (t *Tick) UnmarshalJSON(b []byte) (err error)

type Timecheck

type Timecheck struct {
	RoundStatus string `json:"round_status"`
	Epoch       int64  `json:"epoch"`
	Round       int64  `json:"round"`
}

Jump to

Keyboard shortcuts

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