collectors

package
v2.0.0-...-8e2f7f2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBatchSize    = "500"
	MaxAllowedTimeDrift = 10 * time.Second
)

Variables

View Source
var CurrentRegex = regexp.MustCompile(`^PSU\d (\d+V Curr|Curr|InCurrent|Curr IIN|AC In Curr)$`)

Functions

func GetClusterTime

func GetClusterTime(client *rest.Client, returnTimeOut *int, logger *logging.Logger) (time.Time, error)

func GetDataInterval

func GetDataInterval(param *node.Node, defaultInterval time.Duration) (time.Duration, error)

GetDataInterval fetch pollData interval

func GetFlexGroupFabricPoolMetrics

func GetFlexGroupFabricPoolMetrics(dataMap map[string]*matrix.Matrix, object string, opName string, includeConstituents bool, l *logging.Logger) (*matrix.Matrix, error)

func InvokeRestCall

func InvokeRestCall(client *rest.Client, href string, logger *logging.Logger) ([]gjson.Result, error)

func IsEmbedShelf

func IsEmbedShelf(model string, moduleType string) bool

func IsTimestampOlderThanDuration

func IsTimestampOlderThanDuration(nowish time.Time, timestamp float64, duration time.Duration) bool

IsTimestampOlderThanDuration - timestamp units are micro seconds The `begin` argument lets us virtualize time without requiring sleeps in test code

func IsValidUnit

func IsValidUnit(unit string) bool

func JSONToGson

func JSONToGson(path string, flatten bool) []gjson.Result

func NewSensor

func NewSensor(p *plugin.AbstractPlugin) plugin.Plugin

func Params

func Params(object string, path string) *node.Node

func ReadPluginKey

func ReadPluginKey(param *node.Node, key string) bool

func SetNameservice

func SetNameservice(nsDB, nsSource, nisDomain string, instance *matrix.Instance)

func UpdateLagTime

func UpdateLagTime(instance *matrix.Instance, lastTransferSize *matrix.Metric, lagTime *matrix.Metric, logger *logging.Logger)

func UpdateProtectedFields

func UpdateProtectedFields(instance *matrix.Instance)

Types

type Sensor

type Sensor struct {
	*plugin.AbstractPlugin
	// contains filtered or unexported fields
}

func (*Sensor) Init

func (my *Sensor) Init() error

func (*Sensor) Run

func (my *Sensor) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, *util.Metadata, error)

Jump to

Keyboard shortcuts

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