-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.go
64 lines (51 loc) · 1.19 KB
/
config.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package filesystem
import (
"github.com/NETWAYS/check_system_basics/internal/common/thresholds"
)
type DualThresholdWrapper struct {
Free thresholds.ThresholdWrapper
Used thresholds.ThresholdWrapper
}
type Thresholds struct {
Space DualThresholdWrapper
Inodes DualThresholdWrapper
}
type Filters struct {
// Selection/File options
// Paths
IncludeDevicePaths []string
ExcludeDevicePaths []string
// Filesystem Types
IncludeFsType []string
ExcludeFsType []string
// Mount Paths
IncludeMountPaths []string
ExcludeMountPaths []string
// Filesystem Options
// Read-Only? Read-Write
// pass through general mount options?
IncludeOptions []string
ExcludeOptions []string
}
type CheckConfig struct {
// Thresholds
WarningAbsolutThreshold Thresholds
CriticalAbsolutThreshold Thresholds
WarningPercentThreshold Thresholds
CriticalPercentThreshold Thresholds
WarningTotalCountOfFs thresholds.ThresholdWrapper
CriticalTotalCountOfFs thresholds.ThresholdWrapper
Filters Filters
ReadonlyOption bool
ReadWriteOption bool
// Output Verbosity
Verbosity uint
}
func GetFilesystemsWithFixedNumberOfInodes() []string {
return []string{
"bfs",
"ext2",
"ext3",
"ext4",
}
}