Skip to content

Commit

Permalink
Add deprecation notice to jolokia plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson committed Sep 27, 2017
1 parent b8a0b84 commit 9bddd50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/inputs/jolokia/README.md
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions plugins/inputs/jolokia/jolokia.go
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"time"
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9bddd50

Please sign in to comment.