config

package
v0.0.0-...-0ffe786 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInterval        uint  = 60         // 1 minute
	DefaultMaxSlowLogSize  int64 = 1073741824 // 1G
	DefaultSlowLogRotation       = true       // whether to rotate slow logs
	DefaultRetainSlowLogs        = 1          // how many slow logs to keep on filesystem
	DefaultExampleQueries        = true
	// internal
	DefaultReportLimit uint = 200
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	UUID        string
	ApiHostname string
	ApiPath     string
	Keepalive   uint              `json:",omitempty"`
	PidFile     string            `json:",omitempty"`
	Links       map[string]string `json:",omitempty"`
	//
	ServerUser        string `json:",omitempty"`
	ServerPassword    string `json:",omitempty"`
	ServerSSL         bool   `json:",omitempty"`
	ServerInsecureSSL bool   `json:",omitempty"`
}

type Data

type Data struct {
	Encoding     string `json:",omitempty"`
	SendInterval uint   `json:",omitempty"`
	Blackhole    string `json:",omitempty"` // dev
	Limits       DataSpoolLimits
}

type DataSpoolLimits

type DataSpoolLimits struct {
	MaxAge   uint   // seconds
	MaxSize  uint64 // bytes
	MaxFiles uint
}

type Log

type Log struct {
	Level   string `json:",omitempty"`
	Offline string `json:",omitempty"` // dev
}

type QAN

type QAN struct {
	UUID           string   // of MySQL instance
	CollectFrom    string   `json:",omitempty"` // "slowlog" or "perfschema"
	Interval       uint     `json:",omitempty"` // seconds, 0 = DEFAULT_INTERVAL
	ExampleQueries *bool    `json:",omitempty"` // send real example of each query
	FilterOmit     []string `json:",omitempty"` // queries that should be omitted
	FilterAllow    []string `json:",omitempty"` // queries that are allowed
	// "slowlog" specific options.
	MaxSlowLogSize  int64 `json:"-"`          // bytes, 0 = DEFAULT_MAX_SLOW_LOG_SIZE. Don't write it to the config
	SlowLogRotation *bool `json:",omitempty"` // Enable slow logs rotation.
	RetainSlowLogs  *int  `json:",omitempty"` // Number of slow logs to keep.
	// internal
	Start       []string `json:",omitempty"` // queries to configure MySQL (enable slow log, etc.)
	Stop        []string `json:",omitempty"` // queries to un-configure MySQL (disable slow log, etc.)
	ReportLimit uint     `json:",omitempty"` // top N queries, 0 = DEFAULT_REPORT_LIMIT
}

func NewQAN

func NewQAN() QAN

type RunningQAN

type RunningQAN struct {
	AgentUUID     string
	SetConfig     string `json:",omitempty"`
	RunningConfig string `json:",omitempty"`
}

Response for GET /qan/:uuid/config

Jump to

Keyboard shortcuts

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