Add riemann output plugin deprecation message

This commit is contained in:
Cameron Sparr 2016-10-11 12:28:20 +01:00
parent 3e3b094270
commit 1ff721ad84
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package riemann
import ( import (
"fmt" "fmt"
"log"
"os" "os"
"sort" "sort"
"strings" "strings"
@ -11,6 +12,8 @@ import (
"github.com/influxdata/telegraf/plugins/outputs" "github.com/influxdata/telegraf/plugins/outputs"
) )
const deprecationMsg = "I! WARNING: this Riemann output plugin will be deprecated in a future release, see https://github.com/influxdata/telegraf/issues/1878 for more details & discussion."
type Riemann struct { type Riemann struct {
URL string URL string
Transport string Transport string
@ -29,6 +32,7 @@ var sampleConfig = `
` `
func (r *Riemann) Connect() error { func (r *Riemann) Connect() error {
log.Printf(deprecationMsg)
c, err := raidman.Dial(r.Transport, r.URL) c, err := raidman.Dial(r.Transport, r.URL)
if err != nil { if err != nil {
@ -58,6 +62,7 @@ func (r *Riemann) Description() string {
} }
func (r *Riemann) Write(metrics []telegraf.Metric) error { func (r *Riemann) Write(metrics []telegraf.Metric) error {
log.Printf(deprecationMsg)
if len(metrics) == 0 { if len(metrics) == 0 {
return nil return nil
} }