Skip to content

Commit f9031b9

Browse files
Amanda H. L. de Andraderuflin
Amanda H. L. de Andrade
authored andcommitted
Add CEPH Module with health metrics (#3311)
1 parent 868b622 commit f9031b9

23 files changed

+970
-0
lines changed

metricbeat/_meta/beat.full.yml

+7
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ metricbeat.modules:
9494
# Password of hosts. Empty by default
9595
#password: test123
9696

97+
#-------------------------------- ceph Module --------------------------------
98+
#- module: ceph
99+
# metricsets: ["health"]
100+
# enabled: true
101+
# period: 10s
102+
# hosts: ["localhost:5000"]
103+
97104
#------------------------------ couchbase Module -----------------------------
98105
#- module: couchbase
99106
#metricsets: ["cluster", "node", "bucket"]

metricbeat/docker-compose.yml

+12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ services:
44
build: ${PWD}/.
55
depends_on:
66
- apache
7+
- ceph
78
- couchbase
89
- mongodb
910
- haproxy
@@ -17,6 +18,8 @@ services:
1718
environment:
1819
- APACHE_HOST=apache
1920
- APACHE_PORT=80
21+
- CEPH_HOST=ceph
22+
- CEPH_PORT=5000
2023
- COUCHBASE_HOST=couchbase
2124
- COUCHBASE_PORT=8091
2225
- COUCHBASE_DSN=http://Administrator:password@couchbase:8091
@@ -53,6 +56,15 @@ services:
5356
apache:
5457
build: ${PWD}/module/apache/_meta
5558

59+
ceph:
60+
image: ceph/demo
61+
hostname: ceph
62+
environment:
63+
- MON_IP=0.0.0.0
64+
- CEPH_PUBLIC_NETWORK=0.0.0.0/0
65+
expose:
66+
- 5000
67+
5668
couchbase:
5769
build: ${PWD}/module/couchbase/_meta
5870

metricbeat/docker-entrypoint.sh

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ waitFor() {
2323

2424
# Main
2525
waitFor ${APACHE_HOST} ${APACHE_PORT} Apache
26+
waitFor ${CEPH_HOST} ${CEPH_PORT} Ceph
2627
waitFor ${COUCHBASE_HOST} ${COUCHBASE_PORT} Couchbase
2728
waitFor ${HAPROXY_HOST} ${HAPROXY_PORT} HAProxy
2829
waitFor ${KAFKA_HOST} ${KAFKA_PORT} Kafka

metricbeat/docs/fields.asciidoc

+158
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ grouped in the following categories:
1414
1515
* <<exported-fields-apache>>
1616
* <<exported-fields-beat>>
17+
* <<exported-fields-ceph>>
1718
* <<exported-fields-cloud>>
1819
* <<exported-fields-common>>
1920
* <<exported-fields-couchbase>>
@@ -412,6 +413,163 @@ type: dict
412413
Contains user configurable fields.
413414
414415
416+
[[exported-fields-ceph]]
417+
== ceph Fields
418+
419+
experimental[] ceph Module
420+
421+
422+
423+
[float]
424+
== ceph Fields
425+
426+
`ceph` contains the metrics that were scraped from CEPH.
427+
428+
429+
430+
[float]
431+
== health Fields
432+
433+
health
434+
435+
436+
437+
[float]
438+
=== ceph.health.cluster.overall_status
439+
440+
type: keyword
441+
442+
Overall status of the cluster
443+
444+
445+
[float]
446+
=== ceph.health.cluster.timechecks.epoch
447+
448+
type: long
449+
450+
Map version
451+
452+
453+
[float]
454+
=== ceph.health.cluster.timechecks.round.value
455+
456+
type: long
457+
458+
timecheck round
459+
460+
461+
[float]
462+
=== ceph.health.cluster.timechecks.round.status
463+
464+
type: keyword
465+
466+
Status of the round
467+
468+
469+
[float]
470+
=== ceph.health.mon.available.pct
471+
472+
type: long
473+
474+
Available percent of the MON
475+
476+
477+
[float]
478+
=== ceph.health.mon.health
479+
480+
type: keyword
481+
482+
Health of the MON
483+
484+
485+
[float]
486+
=== ceph.health.mon.available.kb
487+
488+
type: long
489+
490+
Available KB of the MON
491+
492+
493+
[float]
494+
=== ceph.health.mon.total.kb
495+
496+
type: long
497+
498+
Total KB of the MON
499+
500+
501+
[float]
502+
=== ceph.health.mon.used.kb
503+
504+
type: long
505+
506+
Used KB of the MON
507+
508+
509+
[float]
510+
=== ceph.health.mon.last_updated
511+
512+
type: date
513+
514+
Time when was updated
515+
516+
517+
[float]
518+
=== ceph.health.mon.name
519+
520+
type: keyword
521+
522+
Name of the MON
523+
524+
525+
[float]
526+
=== ceph.health.mon.store_stats.log.bytes
527+
528+
type: long
529+
530+
format: bytes
531+
532+
Log bytes of MON
533+
534+
535+
[float]
536+
=== ceph.health.mon.store_stats.misc.bytes
537+
538+
type: long
539+
540+
format: bytes
541+
542+
Misc bytes of MON
543+
544+
545+
[float]
546+
=== ceph.health.mon.store_stats.sst.bytes
547+
548+
type: long
549+
550+
format: bytes
551+
552+
SST bytes of MON
553+
554+
555+
[float]
556+
=== ceph.health.mon.store_stats.total.bytes
557+
558+
type: long
559+
560+
format: bytes
561+
562+
Total bytes of MON
563+
564+
565+
[float]
566+
=== ceph.health.mon.store_stats.last_updated
567+
568+
type: long
569+
570+
Last updated
571+
572+
415573
[[exported-fields-cloud]]
416574
== Cloud Provider Metadata Fields
417575

metricbeat/docs/modules/ceph.asciidoc

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
////
2+
This file is generated! See scripts/docs_collector.py
3+
////
4+
5+
[[metricbeat-module-ceph]]
6+
== ceph Module
7+
8+
This is the ceph Module. Metrics are collected submitting HTTP GET requests to ceph-rest-api.
9+
Reference: http://docs.ceph.com/docs/master/man/8/ceph-rest-api/
10+
11+
12+
[float]
13+
=== Example Configuration
14+
15+
The ceph module supports the standard configuration options that are described
16+
in <<configuration-metricbeat>>. Here is an example configuration:
17+
18+
[source,yaml]
19+
----
20+
metricbeat.modules:
21+
#- module: ceph
22+
# metricsets: ["health"]
23+
# enabled: true
24+
# period: 10s
25+
# hosts: ["localhost:5000"]
26+
----
27+
28+
[float]
29+
=== Metricsets
30+
31+
The following metricsets are available:
32+
33+
* <<metricbeat-metricset-ceph-health,health>>
34+
35+
include::ceph/health.asciidoc[]
36+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
////
2+
This file is generated! See scripts/docs_collector.py
3+
////
4+
5+
[[metricbeat-metricset-ceph-health]]
6+
include::../../../module/ceph/health/_meta/docs.asciidoc[]
7+
8+
9+
==== Fields
10+
11+
For a description of each field in the metricset, see the
12+
<<exported-fields-ceph,exported fields>> section.
13+
14+
Here is an example document generated by this metricset:
15+
16+
[source,json]
17+
----
18+
include::../../../module/ceph/health/_meta/data.json[]
19+
----

metricbeat/docs/modules_list.asciidoc

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ This file is generated! See scripts/docs_collector.py
33
////
44

55
* <<metricbeat-module-apache,Apache>>
6+
* <<metricbeat-module-ceph,ceph>>
67
* <<metricbeat-module-couchbase,couchbase>>
78
* <<metricbeat-module-docker,Docker>>
89
* <<metricbeat-module-haproxy,HAProxy>>
@@ -21,6 +22,7 @@ This file is generated! See scripts/docs_collector.py
2122
--
2223

2324
include::modules/apache.asciidoc[]
25+
include::modules/ceph.asciidoc[]
2426
include::modules/couchbase.asciidoc[]
2527
include::modules/docker.asciidoc[]
2628
include::modules/haproxy.asciidoc[]

metricbeat/include/list.go

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
// This list is automatically generated by `make imports`
1111
_ "github.com/elastic/beats/metricbeat/module/apache"
1212
_ "github.com/elastic/beats/metricbeat/module/apache/status"
13+
_ "github.com/elastic/beats/metricbeat/module/ceph"
14+
_ "github.com/elastic/beats/metricbeat/module/ceph/health"
1315
_ "github.com/elastic/beats/metricbeat/module/couchbase"
1416
_ "github.com/elastic/beats/metricbeat/module/couchbase/bucket"
1517
_ "github.com/elastic/beats/metricbeat/module/couchbase/cluster"

metricbeat/metricbeat.full.yml

+7
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ metricbeat.modules:
9494
# Password of hosts. Empty by default
9595
#password: test123
9696

97+
#-------------------------------- ceph Module --------------------------------
98+
#- module: ceph
99+
# metricsets: ["health"]
100+
# enabled: true
101+
# period: 10s
102+
# hosts: ["localhost:5000"]
103+
97104
#------------------------------ couchbase Module -----------------------------
98105
#- module: couchbase
99106
#metricsets: ["cluster", "node", "bucket"]

0 commit comments

Comments
 (0)