File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ collector:
5050 # 如果为空,默认采集系统主分区(Linux/macOS: "/",Windows: "C:\")
5151 # 例如:
5252 # Linux/macOS: ["/", "/data", "/home"]
53- # Windows: ["C:\\ ", "D:\\ "]
53+ # Windows: ["C:", "D:"]
5454 disk_include :
5555 - " /" # 只采集根分区
5656
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ type CollectorConfig struct {
7070 // 如果为空,默认采集系统主分区(Linux/macOS: "/",Windows: "C:\")
7171 // 例如:
7272 // Linux/macOS: ["/", "/data", "/home"]
73- // Windows: ["C:\\ ", "D:\\ "]
73+ // Windows: ["C:", "D:"]
7474 DiskInclude []string `yaml:"disk_include"`
7575}
7676
@@ -372,11 +372,11 @@ func (c *Config) ShouldExcludeNetworkInterface(interfaceName string) bool {
372372// GetDiskInclude 获取磁盘包含的挂载点列表(白名单)
373373// 如果配置为空,返回默认的根分区匹配规则
374374// Linux/macOS: ["/"]
375- // Windows: ["C:\\ "]
375+ // Windows: ["C:"]
376376func (c * Config ) GetDiskInclude () []string {
377377 if len (c .Collector .DiskInclude ) == 0 {
378378 if runtime .GOOS == "windows" {
379- return []string {"C:\\ " }
379+ return []string {"C:" }
380380 }
381381 return []string {"/" }
382382 }
You can’t perform that action at this time.
0 commit comments