Skip to content

Commit

Permalink
Add output.name to state metrics (#7522)
Browse files Browse the repository at this point in the history
The document looks as following:

```
{
  "output": {
    "name": "elasticsearch"
  }
}
```
  • Loading branch information
ruflin authored and exekias committed Jul 6, 2018
1 parent 84e9b7b commit 15c1aba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libbeat/publisher/pipeline/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func loadOutput(
monitoring.NewString(outReg, "type").Set(outcfg.Name())
}

stateRegistry := monitoring.GetNamespace("state").GetRegistry()
outputRegistry := stateRegistry.NewRegistry("output")
monitoring.NewString(outputRegistry, "name").Set(outcfg.Name())

return out, nil
}

Expand Down

0 comments on commit 15c1aba

Please sign in to comment.