Add deprecation notice to jolokia plugin
This commit is contained in:
parent
82a65fd70e
commit
084f73c0ea
|
@ -1,5 +1,7 @@
|
||||||
# Telegraf plugin: Jolokia
|
# Telegraf plugin: Jolokia
|
||||||
|
|
||||||
|
**Deprecated in version 1.5:** Please use the [jolokia2](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia2) plugin.
|
||||||
|
|
||||||
#### Configuration
|
#### Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
|
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
@ -254,6 +255,10 @@ func (j *Jolokia) extractValues(measurement string, value interface{}, fields ma
|
||||||
func (j *Jolokia) Gather(acc telegraf.Accumulator) error {
|
func (j *Jolokia) Gather(acc telegraf.Accumulator) error {
|
||||||
|
|
||||||
if j.jClient == nil {
|
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}
|
tr := &http.Transport{ResponseHeaderTimeout: j.ResponseHeaderTimeout.Duration}
|
||||||
j.jClient = &JolokiaClientImpl{&http.Client{
|
j.jClient = &JolokiaClientImpl{&http.Client{
|
||||||
Transport: tr,
|
Transport: tr,
|
||||||
|
|
Loading…
Reference in New Issue