tools

package
v2.0.0-...-0ad2362 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMetrics

func BuildMetrics(dir, configPath, pollerName string, opts *Options, metricsPanelMap map[string]PanelData) (map[string]Counter, conf.Remote)

func CategorizeCounters

func CategorizeCounters(counters map[string]Counter) (map[string]Counter, map[string]Counter)

func FetchAndCategorizePrometheusMetrics

func FetchAndCategorizePrometheusMetrics(promURL string) (map[string]bool, map[string]bool, error)

func GenerateCiscoSwitchCounterTemplate

func GenerateCiscoSwitchCounterTemplate(counters map[string]Counter, version string)

func GenerateCounters

func GenerateCounters(dir string, counters map[string]Counter, collectorName string, metricsPanelMap map[string]PanelData) map[string]Counter

func GenerateESeriesCounterTemplate

func GenerateESeriesCounterTemplate(counters map[string]Counter, version string)

func GenerateOntapCounterTemplate

func GenerateOntapCounterTemplate(counters map[string]Counter, version string)

func GenerateStorageGridCounterTemplate

func GenerateStorageGridCounterTemplate(counters map[string]Counter, version string)

func LogErrAndExit

func LogErrAndExit(err error)

func MergeCounters

func MergeCounters(restCounters map[string]Counter, zapiCounters map[string]Counter) map[string]Counter

func ProcessExternalCounters

func ProcessExternalCounters(dir string, counters map[string]Counter, metricsPanelMap map[string]PanelData) map[string]Counter

func ProcessRestCounters

func ProcessRestCounters(dir string, client *rest.Client, metricsPanelMap map[string]PanelData) map[string]Counter

ProcessRestCounters parse rest and restperf templates

func ProcessZapiCounters

func ProcessZapiCounters(dir string, client *zapi.Client, metricsPanelMap map[string]PanelData) map[string]Counter

ProcessZapiCounters parse zapi and zapiperf templates

func ValidateMetrics

func ValidateMetrics(documentedRest, documentedZapi map[string]Counter, prometheusRest, prometheusZapi map[string]bool) error

Types

type Counter

type Counter struct {
	Object      string      `yaml:"-"`
	Name        string      `yaml:"Name"`
	Description string      `yaml:"Description"`
	APIs        []MetricDef `yaml:"APIs"`
	Panels      []PanelDef  `yaml:"Panels"`
	Labels      []string    `yaml:"Labels"`
}

func (Counter) HasAPIs

func (c Counter) HasAPIs() bool

func (Counter) HasPanels

func (c Counter) HasPanels() bool

func (Counter) Header

func (c Counter) Header() string

func (Counter) PanelHeader

func (c Counter) PanelHeader() string

type CounterMetaData

type CounterMetaData struct {
	Date           string
	OntapVersion   string
	SGVersion      string
	CiscoVersion   string
	ESeriesVersion string
}

type CounterTemplate

type CounterTemplate struct {
	Counters        []Counter
	CounterMetaData CounterMetaData
}

type Counters

type Counters struct {
	C []Counter `yaml:"counters"`
}

type MetricDef

type MetricDef struct {
	API            string `yaml:"API"`
	Endpoint       string `yaml:"Endpoint"`
	ONTAPCounter   string `yaml:"ONTAPCounter"`
	CiscoCounter   string `yaml:"CiscoCounter"`
	SGCounter      string `yaml:"SGCounter"`
	ESeriesCounter string `yaml:"ESeriesCounter"`
	Template       string `yaml:"Template"`
	Unit           string `yaml:"Unit"`
	Type           string `yaml:"Type"`
	BaseCounter    string `yaml:"BaseCounter"`
}

func (MetricDef) TableRow

func (m MetricDef) TableRow() string

type Options

type Options struct {
	Poller      string
	Loglevel    int
	Image       string
	FilesdPath  string
	ShowPorts   bool
	OutputPath  string
	CertDir     string
	PromPort    int
	GrafanaPort int
	Mounts      []string
	ConfigPath  string
	ConfPath    string
	PromURL     string
}

type PanelData

type PanelData struct {
	Panels []PanelDef
}

type PanelDef

type PanelDef struct {
	Dashboard string `yaml:"Dashboard"`
	Row       string `yaml:"Row"`
	Type      string `yaml:"Type"`
	Panel     string `yaml:"Panel"`
	PanelLink string `yaml:"PanelLink"`
}

func (PanelDef) DashboardTableRow

func (p PanelDef) DashboardTableRow() string

Directories

Path Synopsis
main command
main command
Package zapi Copyright NetApp Inc, 2021 All rights reserved
Package zapi Copyright NetApp Inc, 2021 All rights reserved
main command

Jump to

Keyboard shortcuts

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