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

[Metricbeat] Update Ceph module to support new API #16254

Merged
merged 41 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
bb81640
Ceph: docker image for nautilus
Feb 5, 2020
2ad3479
Expose Prometheus port
Feb 6, 2020
4ca3dea
Fix: expose missing port
Feb 6, 2020
d6338b0
Rename docker service
Feb 7, 2020
fd38f16
Boilerplate code for mgr_cluster_health
Feb 8, 2020
8652b6f
Use light module
Feb 8, 2020
02bda67
Strip fields
Feb 9, 2020
965e481
Ceph: add mgr_cluster_disk metricset
Feb 10, 2020
9c42f10
Ceph: add mgr_osd_disk metricset
Feb 10, 2020
61dee28
Ceph: add mgr_osd_* metricsets
Feb 10, 2020
18dc228
Update doc
Feb 10, 2020
6d8f9ad
Update metricset docs
Feb 10, 2020
1fcef89
Update module config
Feb 10, 2020
1a3ee03
Fix: comment
Feb 10, 2020
5444bff
Fix: fields.go
Feb 10, 2020
e011b62
Implement basic Python system test
Feb 11, 2020
539bb3e
Add system test
Feb 11, 2020
6a5ce30
Update data.json
Feb 12, 2020
15a34b9
Update data.json
Feb 12, 2020
ed6f587
Remove field with custom structs
Feb 12, 2020
46dc360
Update data.json
Feb 12, 2020
26f1c47
Use event processors
Feb 12, 2020
2cd1056
Update data.json
Feb 12, 2020
809277c
Fields.yml: mgr_cluster_disk
Feb 12, 2020
c63294b
Fields: mgr_cluster_health in progress
Feb 12, 2020
516b4d5
Fields: mgr_cluster_health
Feb 12, 2020
7021045
Update fields.go
Feb 12, 2020
252fec2
Update fields.yml
Feb 12, 2020
e8c1712
mgr_cluster_disk as standard metricset
Feb 13, 2020
4939ca2
mgr_cluster_health as standard metricset
Feb 13, 2020
e53af7e
mgr_osd_disk as standard metricset
Feb 13, 2020
3b6982e
mgr_osd_perf as standard metricset
Feb 13, 2020
e56f176
mgr_osd_... as standard metricset
Feb 13, 2020
1521de3
Update source after code review
Feb 17, 2020
cd07292
Fix: unit tests
Feb 17, 2020
4e6adb7
Fix: integration-tests
Feb 17, 2020
a672525
Adjust source after code review
Feb 18, 2020
f9e222d
Fix windows: too long path
Feb 18, 2020
481ff0a
Fix
Feb 18, 2020
0672054
Another review round
Feb 18, 2020
b1550b7
Define fields only in original metricset
Feb 18, 2020
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
110 changes: 110 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3932,6 +3932,116 @@ type: long

--

[float]
=== mgr_cluster_disk

see: cluster_disk


[float]
=== mgr_cluster_health

see: cluster_health


[float]
=== mgr_osd_perf

OSD performance metrics of Ceph cluster



*`ceph.mgr_osd_perf.id`*::
+
--
OSD ID

type: long

--

*`ceph.mgr_osd_perf.stats.commit_latency_ms`*::
+
--
Commit latency in ms

type: long

--

*`ceph.mgr_osd_perf.stats.apply_latency_ms`*::
+
--
Apply latency in ms

type: long

--

*`ceph.mgr_osd_perf.stats.commit_latency_ns`*::
+
--
Commit latency in ns

type: long

--

*`ceph.mgr_osd_perf.stats.apply_latency_ns`*::
+
--
Apply latency in ns

type: long

--

[float]
=== mgr_osd_pool_stats

OSD pool stats of Ceph cluster



*`ceph.mgr_osd_pool_stats.pool_name`*::
+
--
Pool name

type: keyword

--

*`ceph.mgr_osd_pool_stats.pool_id`*::
+
--
Pool ID

type: long

--

*`ceph.mgr_osd_pool_stats.client_io_rate`*::
+
--
Client I/O rates

type: object

--

[float]
=== mgr_osd_tree

see: osd_tree


[float]
=== mgr_pool_disk

see: pool_disk


[float]
=== monitor_health

Expand Down
28 changes: 27 additions & 1 deletion metricbeat/docs/modules/ceph.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ the http://docs.ceph.com/docs/master/man/8/ceph-rest-api/[ceph-rest-api]. The de
[float]
=== Compatibility

The Ceph module is tested with Ceph Jewel (10.2.10).
The Ceph module is tested with Ceph Jewel (10.2.10) and Ceph Nautilus (14.2.7).

Metricsets with the `mgr_` prefix are compatible with Ceph releases using the Ceph Manager Daemon.

[float]
=== Dashboard
Expand Down Expand Up @@ -52,6 +54,18 @@ The following metricsets are available:

* <<metricbeat-metricset-ceph-cluster_status,cluster_status>>

* <<metricbeat-metricset-ceph-mgr_cluster_disk,mgr_cluster_disk>>

* <<metricbeat-metricset-ceph-mgr_cluster_health,mgr_cluster_health>>

* <<metricbeat-metricset-ceph-mgr_osd_perf,mgr_osd_perf>>

* <<metricbeat-metricset-ceph-mgr_osd_pool_stats,mgr_osd_pool_stats>>

* <<metricbeat-metricset-ceph-mgr_osd_tree,mgr_osd_tree>>

* <<metricbeat-metricset-ceph-mgr_pool_disk,mgr_pool_disk>>

* <<metricbeat-metricset-ceph-monitor_health,monitor_health>>

* <<metricbeat-metricset-ceph-osd_df,osd_df>>
Expand All @@ -66,6 +80,18 @@ include::ceph/cluster_health.asciidoc[]

include::ceph/cluster_status.asciidoc[]

include::ceph/mgr_cluster_disk.asciidoc[]

include::ceph/mgr_cluster_health.asciidoc[]

include::ceph/mgr_osd_perf.asciidoc[]

include::ceph/mgr_osd_pool_stats.asciidoc[]

include::ceph/mgr_osd_tree.asciidoc[]

include::ceph/mgr_pool_disk.asciidoc[]

include::ceph/monitor_health.asciidoc[]

include::ceph/osd_df.asciidoc[]
Expand Down
23 changes: 23 additions & 0 deletions metricbeat/docs/modules/ceph/mgr_cluster_disk.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-ceph-mgr_cluster_disk]]
=== Ceph mgr_cluster_disk metricset

beta[]

include::../../../module/ceph/mgr_cluster_disk/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-ceph,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/ceph/mgr_cluster_disk/_meta/data.json[]
----
23 changes: 23 additions & 0 deletions metricbeat/docs/modules/ceph/mgr_cluster_health.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-ceph-mgr_cluster_health]]
=== Ceph mgr_cluster_health metricset

beta[]

include::../../../module/ceph/mgr_cluster_health/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-ceph,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/ceph/mgr_cluster_health/_meta/data.json[]
----
23 changes: 23 additions & 0 deletions metricbeat/docs/modules/ceph/mgr_osd_perf.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-ceph-mgr_osd_perf]]
=== Ceph mgr_osd_perf metricset

beta[]

include::../../../module/ceph/mgr_osd_perf/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-ceph,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/ceph/mgr_osd_perf/_meta/data.json[]
----
23 changes: 23 additions & 0 deletions metricbeat/docs/modules/ceph/mgr_osd_pool_stats.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-ceph-mgr_osd_pool_stats]]
=== Ceph mgr_osd_pool_stats metricset

beta[]

include::../../../module/ceph/mgr_osd_pool_stats/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-ceph,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/ceph/mgr_osd_pool_stats/_meta/data.json[]
----
23 changes: 23 additions & 0 deletions metricbeat/docs/modules/ceph/mgr_osd_tree.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-ceph-mgr_osd_tree]]
=== Ceph mgr_osd_tree metricset

beta[]

include::../../../module/ceph/mgr_osd_tree/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-ceph,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/ceph/mgr_osd_tree/_meta/data.json[]
----
23 changes: 23 additions & 0 deletions metricbeat/docs/modules/ceph/mgr_pool_disk.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-ceph-mgr_pool_disk]]
=== Ceph mgr_pool_disk metricset

beta[]

include::../../../module/ceph/mgr_pool_disk/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-ceph,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/ceph/mgr_pool_disk/_meta/data.json[]
----
8 changes: 7 additions & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ This file is generated! See scripts/mage/docs_collector.go
.2+| .2+| |<<metricbeat-metricset-beat-state,state>>
|<<metricbeat-metricset-beat-stats,stats>>
|<<metricbeat-module-ceph,Ceph>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.7+| .7+| |<<metricbeat-metricset-ceph-cluster_disk,cluster_disk>>
.13+| .13+| |<<metricbeat-metricset-ceph-cluster_disk,cluster_disk>>
|<<metricbeat-metricset-ceph-cluster_health,cluster_health>>
|<<metricbeat-metricset-ceph-cluster_status,cluster_status>>
|<<metricbeat-metricset-ceph-mgr_cluster_disk,mgr_cluster_disk>> beta[]
|<<metricbeat-metricset-ceph-mgr_cluster_health,mgr_cluster_health>> beta[]
|<<metricbeat-metricset-ceph-mgr_osd_perf,mgr_osd_perf>> beta[]
|<<metricbeat-metricset-ceph-mgr_osd_pool_stats,mgr_osd_pool_stats>> beta[]
|<<metricbeat-metricset-ceph-mgr_osd_tree,mgr_osd_tree>> beta[]
|<<metricbeat-metricset-ceph-mgr_pool_disk,mgr_pool_disk>> beta[]
|<<metricbeat-metricset-ceph-monitor_health,monitor_health>>
|<<metricbeat-metricset-ceph-osd_df,osd_df>>
|<<metricbeat-metricset-ceph-osd_tree,osd_tree>>
Expand Down
6 changes: 6 additions & 0 deletions metricbeat/include/list_common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ HEALTHCHECK --interval=1s --retries=300 \
CMD curl -s -H "Accept: application/json" localhost:5000/api/v0.1/health \
| jq .output.health.health_services[0].mons[0] \
| grep health
EXPOSE 5000

ENV NETWORK_AUTO_DETECT 4
ENV DEMO_DAEMONS osd,rest_api
Expand Down
19 changes: 19 additions & 0 deletions metricbeat/module/ceph/_meta/Dockerfile.nautilus
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ARG CEPH_VERSION
FROM ceph/daemon:${CEPH_VERSION}

RUN yum -q install -y jq && yum clean all && rm -fr /var/cache/yum

# Wait for the health endpoint to have monitors information
ADD healthcheck.sh /
HEALTHCHECK --interval=1s --retries=300 CMD /healthcheck.sh

EXPOSE 5000 8003 9283

ENV NETWORK_AUTO_DETECT 4
ENV CEPH_DAEMON demo
ENV CEPH_DEMO_UID beats
ENV CEPH_DEMO_BUCKET beats
ENV CEPH_DEMO_ACCESS_KEY demo
ENV CEPH_DEMO_SECRET_KEY demo

CMD ["demo"]
20 changes: 20 additions & 0 deletions metricbeat/module/ceph/_meta/config-mgr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- module: ceph
metricsets:
- mgr_cluster_health
period: 10s
hosts: [ "https://localhost:8003" ]
#username: "user"
#password: "secret"

- module: ceph
metricsets:
- mgr_cluster_disk
- mgr_cluster_health
- mgr_osd_disk
- mgr_osd_perf
# - mgr_osd_pool_stats
# - mgr_osd_tree
period: 1m
hosts: [ "https://localhost:8003" ]
#username: "user"
#password: "secret"
4 changes: 3 additions & 1 deletion metricbeat/module/ceph/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ the http://docs.ceph.com/docs/master/man/8/ceph-rest-api/[ceph-rest-api]. The de
[float]
=== Compatibility

The Ceph module is tested with Ceph Jewel (10.2.10).
The Ceph module is tested with Ceph Jewel (10.2.10) and Ceph Nautilus (14.2.7).

Metricsets with the `mgr_` prefix are compatible with Ceph releases using the Ceph Manager Daemon.

[float]
=== Dashboard
Expand Down
Loading