go fmt run over jolokia.go
This commit is contained in:
parent
40d8aeecb0
commit
62270a3697
|
@ -13,7 +13,6 @@ import (
|
|||
"github.com/influxdb/telegraf/plugins"
|
||||
)
|
||||
|
||||
|
||||
type Server struct {
|
||||
Name string
|
||||
Host string
|
||||
|
@ -28,14 +27,12 @@ type Metric struct {
|
|||
}
|
||||
|
||||
type Jolokia struct {
|
||||
|
||||
Context string
|
||||
Servers []Server
|
||||
Metrics []Metric
|
||||
Tags map[string]string
|
||||
}
|
||||
|
||||
|
||||
func (j *Jolokia) SampleConfig() string {
|
||||
return `[jolokia]
|
||||
context = "/jolokia/read"
|
||||
|
@ -70,8 +67,6 @@ func (j *Jolokia) Description() string {
|
|||
return "Read JMX metrics through Jolokia"
|
||||
}
|
||||
|
||||
|
||||
|
||||
func getAttr(requestUrl *url.URL) (map[string]interface{}, error) {
|
||||
//make request
|
||||
resp, err := http.Get(requestUrl.String())
|
||||
|
@ -144,7 +139,6 @@ func (m *Metric) filterFields(fields map[string]interface{}) map[string]interfac
|
|||
return fields
|
||||
}
|
||||
|
||||
|
||||
func (j *Jolokia) Gather(acc plugins.Accumulator) error {
|
||||
|
||||
context := j.Context //"/jolokia/read"
|
||||
|
@ -156,7 +150,6 @@ func (j *Jolokia) Gather(acc plugins.Accumulator) error {
|
|||
tags = map[string]string{}
|
||||
}
|
||||
|
||||
|
||||
for _, server := range servers {
|
||||
for _, metric := range metrics {
|
||||
|
||||
|
|
Loading…
Reference in New Issue