collector

package
v0.0.0-...-d65ccae Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIGRTMIN = syscall.Signal(32)
	SIGJSON  = SIGRTMIN + 4
)

Signals.

View Source
const (
	Init = iota
	Backup
	Master
	Fault
)

States.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Iname          string  `json:"iname"`
	IfpIfname      string  `json:"ifp_ifname"`
	LastTransition float64 `json:"last_transition"`
	Vrid           int     `json:"vrid"`
	State          int     `json:"state"`
	Wantstate      int     `json:"wantstate"`
}

Data type.

type KACollector

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

KACollector type.

func NewKACollector

func NewKACollector(useJSON bool) (*KACollector, error)

NewKACollector creates an KACollector.

func (*KACollector) Collect

func (k *KACollector) Collect(ch chan<- prometheus.Metric)

Collect fetches metrics from and sends them to the provided channel.

func (*KACollector) Describe

func (k *KACollector) Describe(ch chan<- *prometheus.Desc)

Describe outputs metrics descriptions.

type KAStats

type KAStats struct {
	Data  Data  `json:"data"`
	Stats Stats `json:"stats"`
}

KAStats type.

type Stats

type Stats struct {
	AdvertRcvd        int `json:"advert_rcvd"`
	AdvertSent        int `json:"advert_sent"`
	BecomeMaster      int `json:"become_master"`
	ReleaseMaster     int `json:"release_master"`
	PacketLenErr      int `json:"packet_len_err"`
	AdvertIntervalErr int `json:"advert_interval_err"`
	IPTTLErr          int `json:"ip_ttl_err"`
	InvalidTypeRcvd   int `json:"invalid_type_rcvd"`
	AddrListErr       int `json:"addr_list_err"`
	InvalidAuthtype   int `json:"invalid_authtype"`
	AuthtypeMismatch  int `json:"authtype_mismatch"`
	AuthFailure       int `json:"auth_failure"`
	PriZeroRcvd       int `json:"pri_zero_rcvd"`
	PriZeroSent       int `json:"pri_zero_sent"`
}

Stats type.

Jump to

Keyboard shortcuts

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