collectors

package
v2.0.0-...-ca652af Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func AggregatePerScanner

func AggregatePerScanner(logger *slog.Logger, data *matrix.Matrix, latencyKey string, rateKey string) ([]*matrix.Matrix, *util.Metadata, error)

func GatherClusterInfo

func GatherClusterInfo(pollerName string, cred *auth.Credentials) (conf.Remote, error)

func GetClusterTime

func GetClusterTime(client *rest.Client, returnTimeOut *int, logger *slog.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 *slog.Logger) (*matrix.Matrix, error)

func InvokeRestCall

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

func InvokeRestCallWithTestFile

func InvokeRestCallWithTestFile(client *rest.Client, href string, testFilePath string) ([]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 MergeRemotes

func MergeRemotes(remoteZapi conf.Remote, remoteRest conf.Remote, errZapi error, errRest error) (conf.Remote, error)

func NewSensor

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

func Params

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

func PopulateIfgroupMetrics

func PopulateIfgroupMetrics(portIfgroupMap map[string]string, portDataMap map[string]PortData, nData *matrix.Matrix, logger *slog.Logger) error

func ProcessFlexGroupData

func ProcessFlexGroupData(logger *slog.Logger, data *matrix.Matrix, style string, includeConstituents bool, opsKeyPrefix string, volumesMap map[string]string) ([]*matrix.Matrix, *util.Metadata, error)

func QosSetLabel

func QosSetLabel(labelName string, data *matrix.Matrix, instance *matrix.Instance, value string, logger *slog.Logger)

func ReadPluginKey

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

func SetNameservice

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

func SetThroughput

func SetThroughput(data *matrix.Matrix, instance *matrix.Instance, labelName string, iopLabel string, mbpsLabel string, logger *slog.Logger)

func TruncateURL

func TruncateURL(href string) string

func UpdateLagTime

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

func UpdateProtectedFields

func UpdateProtectedFields(instance *matrix.Instance)

Types

type MaxXput

type MaxXput struct {
	IOPS string
	Mbps string
}

func ZapiXputToRest

func ZapiXputToRest(zapi string) (MaxXput, error)

type PortData

type PortData struct {
	Node  string
	Port  string
	Read  float64
	Write float64
}

type Sensor

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

func (*Sensor) Init

func (s *Sensor) Init(remote conf.Remote) error

func (*Sensor) Run

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

type VscanNames

type VscanNames struct {
	Svm     string
	Scanner string
	Node    string
}

func SplitVscanName

func SplitVscanName(ontapName string, isZapi bool) (VscanNames, bool)

SplitVscanName splits the vscan name into three parts and returns them as a VscanNames

Jump to

Keyboard shortcuts

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