Documentation
¶
Index ¶
- Variables
- type APIMetrics
- func (m *APIMetrics) ExecuteWithMetrics(command string, errCounter int, f func() error) (error, int)
- func (m *APIMetrics) Failure(command string)
- func (m *APIMetrics) Finish(command string, startTime time.Time)
- func (m *APIMetrics) RegisterMetrics()
- func (m *APIMetrics) Start(command string, startTime time.Time)
- func (m *APIMetrics) Success(command string)
Constants ¶
This section is empty.
Variables ¶
View Source
var FailedPartsCount = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: "clickhouse_backup",
Name: "failed_parts_count",
Help: "Counter of data parts skipped as broken during backup creation with max_broken_part_ratio > 0",
})
FailedPartsCount counts data parts skipped as broken during backup creation when general.max_broken_part_ratio > 0 tolerated them. It is a package-level counter because it is incremented from pkg/backup (which has no APIMetrics instance) and registered in RegisterMetrics, see https://github.com/Altinity/clickhouse-backup/issues/1418
Functions ¶
This section is empty.
Types ¶
type APIMetrics ¶
type APIMetrics struct {
SuccessfulCounter map[string]prometheus.Counter
FailedCounter map[string]prometheus.Counter
LastStart map[string]prometheus.Gauge
LastFinish map[string]prometheus.Gauge
LastDuration map[string]prometheus.Gauge
LastStatus map[string]prometheus.Gauge
LastBackupSizeLocal prometheus.Gauge
LastBackupSizeRemote prometheus.Gauge
NumberBackupsRemote prometheus.Gauge
NumberBackupsRemoteBroken prometheus.Gauge
NumberBackupsLocal prometheus.Gauge
NumberBackupsRemoteExpected prometheus.Gauge
NumberBackupsLocalExpected prometheus.Gauge
InProgressCommands prometheus.Gauge
LocalDataSize prometheus.Gauge
SubCommands map[string][]string
}
func NewAPIMetrics ¶
func NewAPIMetrics() *APIMetrics
func (*APIMetrics) ExecuteWithMetrics ¶
func (*APIMetrics) Failure ¶
func (m *APIMetrics) Failure(command string)
func (*APIMetrics) RegisterMetrics ¶
func (m *APIMetrics) RegisterMetrics()
RegisterMetrics resister prometheus metrics and define allowed measured commands list
func (*APIMetrics) Success ¶
func (m *APIMetrics) Success(command string)
Click to show internal directories.
Click to hide internal directories.