36 lines
1.2 KiB
Go
36 lines
1.2 KiB
Go
package file
|
|
|
|
import (
|
|
"git.k-space.ee/k-space/logmower-shipper/pkg/globals"
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
)
|
|
|
|
var (
|
|
promFileInitialSeekSkipped = promauto.NewGaugeVec(prometheus.GaugeOpts{
|
|
Namespace: globals.PrometheusPrefix,
|
|
// Subsystem: "file",
|
|
Name: "skipped_bytes",
|
|
Help: "Bytes skipped in file after discovering",
|
|
}, []string{"filename"})
|
|
promFileCatchupDone = promauto.NewGaugeVec(prometheus.GaugeOpts{
|
|
Namespace: globals.PrometheusPrefix,
|
|
Subsystem: "file",
|
|
Name: "catchupped",
|
|
Help: "(0 or) 1 if initial backlog has been sent; (total <= watcher_file_count)",
|
|
}, []string{"filename"})
|
|
promFileErr = promauto.NewCounterVec(prometheus.CounterOpts{
|
|
Namespace: globals.PrometheusPrefix,
|
|
Subsystem: "file",
|
|
Name: "errors_count",
|
|
Help: "Errors while reading file",
|
|
}, []string{"filename"})
|
|
promFileLineSize = promauto.NewHistogramVec(prometheus.HistogramOpts{
|
|
Namespace: globals.PrometheusPrefix,
|
|
// Subsystem: "file",
|
|
Name: "line_size_bytes",
|
|
Help: "Log line size in bytes",
|
|
Buckets: []float64{80, 160, 320, 640, 1280},
|
|
}, []string{"filename"})
|
|
)
|