Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set all ceph metrics as default in metricbeat module #6682

Merged
merged 2 commits into from
Apr 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions metricbeat/docs/modules/ceph.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file is generated! See scripts/docs_collector.py
beta[]

The Ceph module collects metrics by submitting HTTP GET requests to
the http://docs.ceph.com/docs/master/man/8/ceph-rest-api/[ceph-rest-api].
the http://docs.ceph.com/docs/master/man/8/ceph-rest-api/[ceph-rest-api]. The default metricsets are `cluster_disk`, `cluster_health`, `monitor_health`, `pool_disk`, `osd_tree`.


[float]
Expand All @@ -21,9 +21,12 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: ceph
metricsets: ["cluster_disk", "cluster_health", "monitor_health", "pool_disk", "osd_tree"]
metricsets: ["cluster_health", "cluster_status", "monitor_health"]
period: 10s
hosts: ["localhost:5000"]

- module: ceph
metricsets: ["cluster_disk", "osd_tree", "pool_disk"]
period: 1m
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
Expand Down
1 change: 1 addition & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ metricbeat.modules:
metricsets: ["cluster_disk", "cluster_health", "monitor_health", "pool_disk", "osd_tree"]
period: 10s
hosts: ["localhost:5000"]
enabled: true

#------------------------------ Couchbase Module -----------------------------
- module: couchbase
Expand Down
5 changes: 5 additions & 0 deletions metricbeat/module/ceph/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- module: ceph
metricsets: ["cluster_disk", "cluster_health", "monitor_health", "pool_disk", "osd_tree"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another example of module where we may want different default periods for different metricsets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, let me look into this. I also realised one of the metricsets is experimental so not all of them should be here (or I should set it to beta).

period: 10s
hosts: ["localhost:5000"]
enabled: true
7 changes: 5 additions & 2 deletions metricbeat/module/ceph/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
- module: ceph
metricsets: ["cluster_disk", "cluster_health", "monitor_health", "pool_disk", "osd_tree"]
metricsets: ["cluster_health", "cluster_status", "monitor_health"]
period: 10s
hosts: ["localhost:5000"]

- module: ceph
metricsets: ["cluster_disk", "osd_tree", "pool_disk"]
period: 1m
2 changes: 1 addition & 1 deletion metricbeat/module/ceph/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
The Ceph module collects metrics by submitting HTTP GET requests to
the http://docs.ceph.com/docs/master/man/8/ceph-rest-api/[ceph-rest-api].
the http://docs.ceph.com/docs/master/man/8/ceph-rest-api/[ceph-rest-api]. The default metricsets are `cluster_disk`, `cluster_health`, `monitor_health`, `pool_disk`, `osd_tree`.
7 changes: 4 additions & 3 deletions metricbeat/module/ceph/cluster_disk/cluster_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

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

type MetricSet struct {
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/ceph/cluster_health/cluster_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

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

type MetricSet struct {
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/ceph/cluster_status/cluster_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

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

type MetricSet struct {
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/ceph/monitor_health/monitor_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

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

type MetricSet struct {
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/ceph/osd_df/osd_df.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

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

type MetricSet struct {
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/ceph/osd_tree/osd_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

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

type MetricSet struct {
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/ceph/pool_disk/pool_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

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

type MetricSet struct {
Expand Down
7 changes: 5 additions & 2 deletions metricbeat/modules.d/ceph.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
- module: ceph
metricsets: ["cluster_disk", "cluster_health", "monitor_health", "pool_disk", "osd_tree"]
metricsets: ["cluster_health", "cluster_status", "monitor_health"]
period: 10s
hosts: ["localhost:5000"]

- module: ceph
metricsets: ["cluster_disk", "osd_tree", "pool_disk"]
period: 1m