Skip to content

Commit

Permalink
Added telegraf tag to Riemann output
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhruv Bansal committed Feb 4, 2016
1 parent fff054c commit fe92298
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/outputs/riemann/riemann.go
Expand Up @@ -77,6 +77,7 @@ func (r *Riemann) Write(metrics []telegraf.Metric) error {

func buildEvents(p telegraf.Metric, s string) []*raidman.Event {
events := []*raidman.Event{}
telegrafTags := []string{"telegraf"}
for fieldName, value := range p.Fields() {
host, ok := p.Tags()["host"]
if !ok {
Expand All @@ -91,6 +92,7 @@ func buildEvents(p telegraf.Metric, s string) []*raidman.Event {
event := &raidman.Event{
Host: host,
Service: serviceName(s, p.Name(),p.Tags(),fieldName),
Tags: telegrafTags,
}

switch value.(type) {
Expand Down

0 comments on commit fe92298

Please sign in to comment.