grafana

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = ModuleConfig{
	AdminPassword:  "changeme",
	Enabled:        false,
	GrafanaVersion: "latest",
}

Functions

This section is empty.

Types

type Module

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

func (*Module) GetDashboardFiles

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

GetDashboardFiles returns included dashboard files

func (*Module) GetDashboards

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(c context.Context) (*ansible.Playbook, error)

type ModuleConfig

type ModuleConfig struct {
	AdminPassword  string `yaml:"admin_password"`
	Enabled        bool   `yaml:"enabled"`
	GrafanaVersion string `yaml:"grafana_version"`
}

func (*ModuleConfig) IsEnabled

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