config

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PauseNagflux atomic.Value

PauseNagflux is used to sync the state of the influxdb

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

Types

type Config

type Config struct {
	Main struct {
		NagiosSpoolfileFolder  string
		NagiosSpoolfileWorker  int
		InfluxWorker           int
		MaxInfluxWorker        int
		DumpFile               string
		NagfluxSpoolfileFolder string
		FieldSeparator         string
		BufferSize             int
	}
	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
	}
	Influx struct {
		Enabled                   bool
		Address                   string
		Arguments                 string
		Version                   string
		CreateDatabaseIfNotExists bool
		NastyString               string
		NastyStringToReplace      string
		HostcheckAlias            string
	}
	Livestatus struct {
		Type          string
		Address       string
		MinutesToWait int
	}
	Elasticsearch struct {
		Enabled          bool
		Address          string
		Index            string
		Version          string
		HostcheckAlias   string
		NumberOfShards   int
		NumberOfReplicas int
		IndexRotation    string
	}
}

Config Represents the config file.

func GetConfig

func GetConfig() Config

GetConfig returns the static config object

Jump to

Keyboard shortcuts

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