cfg

package
v0.10.10 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PromURL prometheus url
	PromURL = "prometheus.url"
	// PromBasePath the base path of the prometheus URL
	PromBasePath = "prometheus.basepath"
	// CoreStartdelay lets the core wait for the given duration
	CoreStartdelay = "core.startdelay"

	// BusWsPath is the url path the bus listens ons
	BusWsPath = "bus.ws.path"

	// AlertDelay is the timespan (time.Duration) that must have passed in order to gernerate an alert
	AlertDelay = "alert.delay"
	// AlertIntervall is the intervall (time.Duration) after which an alert is resend
	AlertIntervall = "alert.intervall"
	// AlertLevel is the min level for an alert to get escalated
	AlertLevel = "alert.level"
	// AlertSubject (Mail) Subject of the alert
	AlertSubject = "alert.subject"
	// AlertMailFrom from mail adr
	AlertMailFrom = "alert.mail.from"
	// AlertMailSMTPHost smtp host
	AlertMailSMTPHost = "alert.mail.smtp.host"
	// AlertMailSMTPPort smtp port
	AlertMailSMTPPort = "alert.mail.smtp.port"
	// AlertIncidentCorrelationEvents is the number of events used for correlation
	AlertIncidentCorrelationEvents = "alert.event.correlation.events"
	// AlertIncidentCorrelationReopenTime is the duration during which a icident is reopened
	AlertIncidentCorrelationReopenTime = "alert.event.correlation.reopentime"

	// AlertDestinations defines destinations for alerting (handled in alerter)
	AlertDestinations = "alert.destinations"
	// AlertRules defines rules alert handling (handled in alerter)
	AlertRules = "alert.rules"

	// AlertVisualiserURL is the URL of the webserver serving details
	AlertVisualiserURL = "alert.visualiserURL"

	// StatusTimeout is the duration after which a status will be unknow if no event is received
	StatusTimeout = "status.timeout"
	// StatusCleanup is the duration after which a status will be removed if no event is received
	StatusCleanup = "status.cleanup"
)

config keys

View Source
const (
	// BrowserShow show the browser window
	BrowserShow = "browser.show"
	// BrowserNoClose Do not close the browser window in the end. Implies show, timeout 10m and no repeat
	BrowserNoClose = "browser.noclose"
	// CheckTimeout Check timeout (time.Duration)
	CheckTimeout = "check.timeout"
	// CheckRepeat Check intervall (time.Duration)
	CheckRepeat = "check.repeat"
	// CheckUser the user the check is run with (probably temp workaround) -- not parsed as flag globally
	CheckUser = "check.user"
	// CheckRegion region the checks runs in
	CheckRegion = "check.region"
	// DataDir Folder to save output like screenshots in
	DataDir = "data.dir"
	// LogLevel error warn info debug trace off
	LogLevel = "log.level"
	// WebURLBasePath the base path of the URL
	WebURLBasePath = "web.urlpath"
	// WebPort the port the webserver runs on
	WebPort = "web.port"

	// BusLogLevel sets the level the bus logs (default: off)
	BusLogLevel = "bus.log.level"
	// BusEndpoints are the endpoints the bus connects to
	BusEndpoints = "bus.endpoint"

	// AlertEnabled is used to disable alerting globally
	AlertEnabled = "alert.enabled"

	// CfgFile
	CfgFile = "config.file"

	// CfgSave triggers periodic config saves
	CfgSave = "config.save"
)

flag keys

View Source
const (
	// VersionMajor major version
	VersionMajor = 0
	// VersionMinor minor version
	VersionMinor = 10
	// VersionPatch patch level
	VersionPatch = 10
)

Variables

View Source
var (
	// BuildInfo contains the build timestamp
	BuildInfo = "development"
	// Version string
	Version = fmt.Sprintf("%v.%v.%v (%v)", VersionMajor, VersionMinor, VersionPatch, BuildInfo)
)
View Source
var (
	// TimeFormatString defines the timeformat
	TimeFormatString = "02.01.2006 15:04:05"
)

Functions

func HclOptions

func HclOptions() hcl.LoggerOpt

HclOptions configures the HCL logger (using commandline flags)

func Parse

func Parse()

Parse parses the config

func SetConfigFileName

func SetConfigFileName(n string)

SetConfigFileName sets the config file name

Types

This section is empty.

Jump to

Keyboard shortcuts

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