generate

package
v2.0.0-...-22a6e85 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "generate",
	Short: "Generate Harvest related files",
	Long:  "Generate Harvest related files",
}

Functions

func BuildMetrics

func BuildMetrics(dir, configPath, pollerName string) (map[string]Counter, conf.Remote)

Types

type AdminInfo

type AdminInfo struct {
	ServiceName   string
	Port          int
	ConfigFile    string
	Image         string
	ContainerName string
	Enabled       bool
	CertDir       string
}

type Counter

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

func (Counter) HasAPIs

func (c Counter) HasAPIs() bool

func (Counter) Header

func (c Counter) Header() string

type CounterMetaData

type CounterMetaData struct {
	Date         string
	OntapVersion 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"`
	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 PollerInfo

type PollerInfo struct {
	ServiceName   string
	PollerName    string
	Port          int
	ConfigFile    string
	LogLevel      int
	Image         string
	ContainerName string
	ShowPorts     bool
	IsFull        bool
	CertDir       string
	Mounts        []string
}

type PollerTemplate

type PollerTemplate struct {
	Pollers []PollerInfo
	Admin   AdminInfo
}

type PromTemplate

type PromTemplate struct {
	GrafanaPort int
	PromPort    int
}

Jump to

Keyboard shortcuts

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