Add deprecation notice to jolokia plugin

This commit is contained in:
Daniel Nelson 2017-09-27 10:52:10 -07:00
parent 82a65fd70e
commit 084f73c0ea
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,7 @@
# Telegraf plugin: Jolokia
**Deprecated in version 1.5:** Please use the [jolokia2](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia2) plugin.
#### Configuration
```toml

View File

@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"time"
@ -254,6 +255,10 @@ func (j *Jolokia) extractValues(measurement string, value interface{}, fields ma
func (j *Jolokia) Gather(acc telegraf.Accumulator) error {
if j.jClient == nil {
log.Println("W! DEPRECATED: the jolokia plugin has been deprecated " +
"in favor of the jolokia2 plugin " +
"(https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia2)")
tr := &http.Transport{ResponseHeaderTimeout: j.ResponseHeaderTimeout.Duration}
j.jClient = &JolokiaClientImpl{&http.Client{
Transport: tr,