linux

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = ModuleConfig{
	Enabled:             false,
	EnableExporter:      true,
	NodeExporterVersion: "1.5.0",
}

Functions

This section is empty.

Types

type Module

type Module struct {
	// contains filtered or unexported fields
}

func (*Module) GetDashboardFiles added in v0.0.5

func (m *Module) GetDashboardFiles() map[string][]byte

GetDashboardFiles returns included dashboard files

func (*Module) GetDashboards added in v0.0.5

func (m *Module) GetDashboards() []map[string]interface{}

GetDashboards returns pointers to grafana.com dashboards

func (*Module) GetRules

func (m *Module) GetRules(tg string) rulefmt.RuleGroup

GetRules returns recording and alerting rules for this module.

func (*Module) GetTargets

func (m *Module) GetTargets(labels []labels.Labels, group string) ([]labels.Labels, error)

func (*Module) HostVars

func (m *Module) HostVars() (map[string]string, error)

func (*Module) Playbook

func (m *Module) Playbook(ctx context.Context) (*ansible.Playbook, error)

type ModuleConfig

type ModuleConfig struct {
	Enabled             bool   `yaml:"enabled"`
	EnableExporter      bool   `yaml:"enable_exporter"`
	NodeExporterVersion string `yaml:"node_exporter_version"`
}

func (*ModuleConfig) IsEnabled added in v0.0.5

func (m *ModuleConfig) IsEnabled() bool

IsEnabled returns a boolean indicating if the Module is enabled.

func (*ModuleConfig) Name

func (m *ModuleConfig) Name() string

func (*ModuleConfig) NewModule

func (*ModuleConfig) UnmarshalYAML

func (m *ModuleConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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