-
Notifications
You must be signed in to change notification settings - Fork 0
/
metrics.go
35 lines (32 loc) · 915 Bytes
/
metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package foldercleaner
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
const monitorNamespace = "foldercleaner"
var (
promFilesRemoved = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: monitorNamespace,
Name: "removed_files_count",
Help: "Number of files Removed",
},
[]string{"path", "pattern"},
)
promFileCleanFailures = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: monitorNamespace,
Name: "clean_folder_failures_count",
Help: "Number of times the clean folders operation has failed",
},
[]string{"path", "pattern"},
)
promFileRemoveFailures = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: monitorNamespace,
Name: "remove_file_failures_count",
Help: "Number of file remove failures",
},
[]string{"path", "pattern"},
)
)