Skip to content

Commit

Permalink
Make collector default prometheus metricset (#6636)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Pérez-Aradros Herce <[email protected]>
  • Loading branch information
exekias authored and ruflin committed Mar 26, 2018
1 parent 7ac8e2f commit d581d2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Allow to disable labels `dedot` in Docker module, in favor of a safe way to keep dots. {pull}6490[6490]
- Add experimental module to collect metrics from munin nodes. {pull}6517[6517]
- Add support for wildcards and explicit metrics grouping in jolokia/jmx. {pull}6462[6462]
- Set `collector` as default metricset in Prometheus module. {pull}6636[6636]

*Packetbeat*

Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/prometheus/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ var (
)

func init() {
if err := mb.Registry.AddMetricSet("prometheus", "collector", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("prometheus", "collector", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

type MetricSet struct {
Expand Down

0 comments on commit d581d2a

Please sign in to comment.