config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2017 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(configPath string)

InitConfig creates a config object from the give configpath

func InitConfigFromString added in v0.2.1

func InitConfigFromString(configString string)

InitConfigFromString creates a config object from the give configstring primary for testing

func IsAnyTargetOnPause added in v0.4.0

func IsAnyTargetOnPause() bool

IsAnyTargetOnPause will return true if any target requested pause, false otherwise

func StoreValue added in v0.4.0

func StoreValue(target data.Target, value bool)

Types

type Config

type Config struct {
	Main struct {
		NagiosSpoolfileFolder  string
		NagiosSpoolfileWorker  int
		InfluxWorker           int
		MaxInfluxWorker        int
		DumpFile               string
		NagfluxSpoolfileFolder string
		FieldSeparator         string
		BufferSize             int
		FileBufferSize         int
		DefaultTarget          string
	}
	ModGearman map[string]*struct {
		Enabled    bool
		Address    string
		Queue      string
		Secret     string
		SecretFile string
		Worker     int
	}
	Log struct {
		LogFile     string
		MinSeverity string
	}
	Monitoring struct {
		PrometheusAddress string
	}
	InfluxDBGlobal struct {
		CreateDatabaseIfNotExists bool
		NastyString               string
		NastyStringToReplace      string
		HostcheckAlias            string
	}
	InfluxDB map[string]*struct {
		Enabled               bool
		Address               string
		Arguments             string
		Version               string
		StopPullingDataIfDown bool
	}
	Livestatus struct {
		Type          string
		Address       string
		MinutesToWait int
		Version       string
	}
	ElasticsearchGlobal struct {
		HostcheckAlias   string
		NumberOfShards   int
		NumberOfReplicas int
		IndexRotation    string
	}
	Elasticsearch map[string]*struct {
		Enabled bool
		Address string
		Index   string
		Version string
	}
	JSONFileExport map[string]*struct {
		Enabled               bool
		Path                  string
		AutomaticFileRotation int
	}
}

Config Represents the config file.

func GetConfig

func GetConfig() Config

GetConfig returns the static config object

type PauseMap added in v0.4.0

type PauseMap map[data.Target]bool

PauseMap is a map to store if an target requested pause or not

Jump to

Keyboard shortcuts

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