option

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EtcdEndpointsLine    string
	EtcdEndpoints        []string
	EtcdCaFile           string
	EtcdCertFile         string
	EtcdKeyFile          string
	LogLevel             string
	AdvertiseAddr        string
	BindIP               string
	Port                 int
	StartArgs            []string
	ConfigFile           string
	AlertingRulesFile    string
	LocalStoragePath     string
	Web                  Web
	Tsdb                 Tsdb
	WebTimeout           string
	RemoteFlushDeadline  string
	AlertmanagerCapacity string
	AlertmanagerTimeout  string
	QueryLookbackDelta   string
	QueryTimeout         string
	QueryMaxConcurrency  string
	CadvisorListenPort   int
	MysqldExporter       string
	KSMExporter          string
	KubeConfig           string
}

Config config

func NewConfig

func NewConfig() *Config

NewConfig new config

func (*Config) AddFlag

func (c *Config) AddFlag(cmd *pflag.FlagSet)

AddFlag monitor flag

func (*Config) AddPrometheusFlag

func (c *Config) AddPrometheusFlag(cmd *pflag.FlagSet)

AddPrometheusFlag prometheus flag

func (*Config) CompleteConfig

func (c *Config) CompleteConfig()

CompleteConfig complete config

type Tsdb

type Tsdb struct {
	// The interval at which the write ahead log is flushed to disc.
	WALFlushInterval time.Duration

	// The timestamp range of head blocks after which they get persisted.
	// It's the minimum duration of any persisted block.
	MinBlockDuration string

	// The maximum timestamp range of compacted blocks.
	MaxBlockDuration string

	// Duration for how long to retain data.
	Retention string

	// Disable creation and consideration of lockfile.
	NoLockfile bool
}

Tsdb Options of the DB storage.

type Web

type Web struct {
	ListenAddress        string
	ReadTimeout          time.Duration
	MaxConnections       int
	ExternalURL          string
	RoutePrefix          string
	UseLocalAssets       bool
	UserAssetsPath       string
	ConsoleTemplatesPath string
	ConsoleLibrariesPath string
	EnableLifecycle      bool
	EnableAdminAPI       bool
}

Web Options for the web Handler.

Jump to

Keyboard shortcuts

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