ing
This commit is contained in:
parent
cda6a02f65
commit
f8580434e8
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
configM "git.loafle.net/overflow/overflow_commons_go/modules/config/model"
|
||||
configUtil "git.loafle.net/overflow/overflow_commons_go/modules/config/util"
|
||||
"git.loafle.net/overflow/overflow_probe_container_network/crawler"
|
||||
"git.loafle.net/overflow/overflow_probe_container_network/crawler/impl/ssh/client"
|
||||
"git.loafle.net/overflow/overflow_probe_container_network/crawler/impl/ssh/parser"
|
||||
|
@ -50,7 +51,6 @@ func (c *SSHCrawler) InternalGet(config *configM.Config) (map[string]string, err
|
|||
|
||||
pScanner := parser.NewParserScanner(scanner, boundary)
|
||||
|
||||
|
||||
for i := 0; i < itemCount; i++ {
|
||||
item := config.Items[i]
|
||||
mode := item.QueryInfo.Extend["mode"].(string)
|
||||
|
@ -65,8 +65,9 @@ func (c *SSHCrawler) InternalGet(config *configM.Config) (map[string]string, err
|
|||
}
|
||||
|
||||
if nil != rm {
|
||||
for k, v := range rm {
|
||||
results[k] = v
|
||||
mm := configUtil.KeysToMap(item.Keys)
|
||||
for key, value := range mm {
|
||||
results[value] = rm[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
"container": "go_proxy"
|
||||
},
|
||||
"items": [{
|
||||
"keys": [{
|
||||
"metric": "cpu.usage.sum",
|
||||
"key": "sum"
|
||||
},
|
||||
"keys": [
|
||||
{
|
||||
"metric": "cpu.usage.sum",
|
||||
"key": "sum"
|
||||
},
|
||||
{
|
||||
"metric": "cpu.usage.user",
|
||||
"key": "user"
|
||||
|
|
Loading…
Reference in New Issue
Block a user