refactor: change collect config path

This commit is contained in:
710leo 2020-03-24 20:41:21 +08:00
parent 19c9e4eb36
commit fb43b03b2c
8 changed files with 10 additions and 5 deletions

1
etc/port/20_2058 Normal file
View File

@ -0,0 +1 @@
n9e-collector

View File

@ -1 +0,0 @@
sshd

1
etc/port/20_5800 Normal file
View File

@ -0,0 +1 @@
n9e-monapi

1
etc/port/20_5810 Normal file
View File

@ -0,0 +1 @@
n9e-transfer

1
etc/port/20_5820 Normal file
View File

@ -0,0 +1 @@
n9e-tsdb

1
etc/port/20_5830 Normal file
View File

@ -0,0 +1 @@
n9e-index

1
etc/port/20_5840 Normal file
View File

@ -0,0 +1 @@
n9e-judge

View File

@ -62,16 +62,16 @@ func Parse(conf string) error {
"enable": true,
"timeout": 1000,
"interval": 10, //采集策略更新时间
"portPath": "/home/n9e/etc/port",
"procPath": "/home/n9e/etc/proc",
"logPath": "/home/n9e/etc/log",
"portPath": "./etc/port",
"procPath": "./etc/proc",
"logPath": "./etc/log",
"api": "/api/portal/collects/",
})
viper.SetDefault("sys", map[string]interface{}{
"timeout": 1000, //请求超时时间
"interval": 10, //基础指标上报周期
"plugin": "/home/n9e/plugin",
"plugin": "./plugin",
})
err = viper.Unmarshal(&Config)