prom

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitProm

func InitProm(name string)

InitProm sets up the prometheus monitor

func NewModbusPvProm

func NewModbusPvProm(pv modbuspv.ModbusPV) modbuspv.ModbusPV

NewModbusPvProm returns a pv with prom

func Payload2float64

func Payload2float64(payload modbuspv.Payload) float64

Payload2float64 convert payload to prom value

Types

type Stats

type Stats struct {
	PvValue         *prometheus.GaugeVec
	PvReadCounts    *prometheus.CounterVec
	PvReadDuration  *prometheus.GaugeVec
	PvWriteCounts   *prometheus.CounterVec
	PvWriteDuration *prometheus.GaugeVec
	PvStatus        *prometheus.GaugeVec
}

Stats is a collection for prometheus metrics

var (
	// Monitor is a stats
	Monitor *Stats
)

Jump to

Keyboard shortcuts

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