refactor: change collect config path
This commit is contained in:
parent
19c9e4eb36
commit
fb43b03b2c
|
@ -0,0 +1 @@
|
||||||
|
n9e-collector
|
|
@ -1 +0,0 @@
|
||||||
sshd
|
|
|
@ -0,0 +1 @@
|
||||||
|
n9e-monapi
|
|
@ -0,0 +1 @@
|
||||||
|
n9e-transfer
|
|
@ -0,0 +1 @@
|
||||||
|
n9e-tsdb
|
|
@ -0,0 +1 @@
|
||||||
|
n9e-index
|
|
@ -0,0 +1 @@
|
||||||
|
n9e-judge
|
|
@ -62,16 +62,16 @@ func Parse(conf string) error {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"timeout": 1000,
|
"timeout": 1000,
|
||||||
"interval": 10, //采集策略更新时间
|
"interval": 10, //采集策略更新时间
|
||||||
"portPath": "/home/n9e/etc/port",
|
"portPath": "./etc/port",
|
||||||
"procPath": "/home/n9e/etc/proc",
|
"procPath": "./etc/proc",
|
||||||
"logPath": "/home/n9e/etc/log",
|
"logPath": "./etc/log",
|
||||||
"api": "/api/portal/collects/",
|
"api": "/api/portal/collects/",
|
||||||
})
|
})
|
||||||
|
|
||||||
viper.SetDefault("sys", map[string]interface{}{
|
viper.SetDefault("sys", map[string]interface{}{
|
||||||
"timeout": 1000, //请求超时时间
|
"timeout": 1000, //请求超时时间
|
||||||
"interval": 10, //基础指标上报周期
|
"interval": 10, //基础指标上报周期
|
||||||
"plugin": "/home/n9e/plugin",
|
"plugin": "./plugin",
|
||||||
})
|
})
|
||||||
|
|
||||||
err = viper.Unmarshal(&Config)
|
err = viper.Unmarshal(&Config)
|
||||||
|
|
Loading…
Reference in New Issue