config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHIL

func ParseHIL(input string, hilConfig *hil.EvalConfig) (hil.EvaluationResult, error)

Types

type Check

type Check struct {
	Plugin         string                    `hcl:"plugin"`
	PluginInstance string                    `hcl:"plugin_instance"`
	Type           string                    `hcl:"type"`
	TypeInstance   string                    `hcl:"type_instance"`
	Comparator     Comparator                `hcl:"comparator"`
	WarningTpl     string                    `hcl:"warning"`
	CriticalTpl    string                    `hcl:"critical"`
	Warning        hil.EvaluationResult      `hcl:"-"`
	Critical       hil.EvaluationResult      `hcl:"-"`
	ValueTpl       string                    `hcl:"value"`
	Value          *template.Template        `hcl:"-"`
	Thresholds     map[string]CheckThreshold `hcl:"host"`
}

type CheckThreshold added in v0.0.2

type CheckThreshold struct {
	WarningTpl  string               `hcl:"warning"`
	CriticalTpl string               `hcl:"critical"`
	Warning     hil.EvaluationResult `hcl:"-"`
	Critical    hil.EvaluationResult `hcl:"-"`
}

type Comparator

type Comparator string
const (
	GreaterThan          Comparator = ">"
	GreaterThanOrEqualTo Comparator = ">="
	LesserThanOrEqualTo  Comparator = "<="
	LesserThan           Comparator = "<"
)

type Config

type Config struct {
	CheckResultsDir string           `hcl:"check_results_dir"`
	Checks          map[string]Check `hcl:"check"`
}

func Read

func Read(configFile string) (*Config, error)

Jump to

Keyboard shortcuts

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