collector

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Code generated by fields_generator.go. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func New

func New(cfg *Config, logger log.Logger) (*Collector, error)

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type Config

type Config struct {
}

type Field

type Field struct {
	Type        FieldType
	Name        string
	Description string
}

type FieldType

type FieldType string
const (
	FieldTypeSTR      FieldType = "STR"
	FieldTypeNUM      FieldType = "NUM"
	FieldTypeBIN      FieldType = "BIN"
	FieldTypeSIZ      FieldType = "SIZ"
	FieldTypePCT      FieldType = "PCT"
	FieldTypeTIM      FieldType = "TIM"
	FieldTypeSNUM     FieldType = "SNUM"
	FieldTypeSTR_LIST FieldType = "STR_LIST"
)

type Label

type Label struct {
	Field string
	Value string
}

type Metric

type Metric struct {
	Field string
	Value float64
	Label *Label
	Help  string
}

type MetricsLabels

type MetricsLabels struct {
	Namespace string
	Metrics   []Metric
	Labels    []Label
}

func ReportsToMetrics

func ReportsToMetrics(b []byte) ([]MetricsLabels, error)

type Reports

type Reports []map[string][]map[string]string // []map[TYPE(lv/vg/pv)][]map[FIELD]VALUE

Jump to

Keyboard shortcuts

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