Skip to content

Commit

Permalink
Add CEPH Module with health metrics (#3311)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanda H. L. de Andrade authored and ruflin committed Jan 24, 2017
1 parent 868b622 commit f9031b9
Show file tree
Hide file tree
Showing 23 changed files with 970 additions and 0 deletions.
7 changes: 7 additions & 0 deletions metricbeat/_meta/beat.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ metricbeat.modules:
# Password of hosts. Empty by default
#password: test123

#-------------------------------- ceph Module --------------------------------
#- module: ceph
# metricsets: ["health"]
# enabled: true
# period: 10s
# hosts: ["localhost:5000"]

#------------------------------ couchbase Module -----------------------------
#- module: couchbase
#metricsets: ["cluster", "node", "bucket"]
Expand Down
12 changes: 12 additions & 0 deletions metricbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
build: ${PWD}/.
depends_on:
- apache
- ceph
- couchbase
- mongodb
- haproxy
Expand All @@ -17,6 +18,8 @@ services:
environment:
- APACHE_HOST=apache
- APACHE_PORT=80
- CEPH_HOST=ceph
- CEPH_PORT=5000
- COUCHBASE_HOST=couchbase
- COUCHBASE_PORT=8091
- COUCHBASE_DSN=http://Administrator:password@couchbase:8091
Expand Down Expand Up @@ -53,6 +56,15 @@ services:
apache:
build: ${PWD}/module/apache/_meta

ceph:
image: ceph/demo
hostname: ceph
environment:
- MON_IP=0.0.0.0
- CEPH_PUBLIC_NETWORK=0.0.0.0/0
expose:
- 5000

couchbase:
build: ${PWD}/module/couchbase/_meta

Expand Down
1 change: 1 addition & 0 deletions metricbeat/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ waitFor() {

# Main
waitFor ${APACHE_HOST} ${APACHE_PORT} Apache
waitFor ${CEPH_HOST} ${CEPH_PORT} Ceph
waitFor ${COUCHBASE_HOST} ${COUCHBASE_PORT} Couchbase
waitFor ${HAPROXY_HOST} ${HAPROXY_PORT} HAProxy
waitFor ${KAFKA_HOST} ${KAFKA_PORT} Kafka
Expand Down
158 changes: 158 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ grouped in the following categories:
* <<exported-fields-apache>>
* <<exported-fields-beat>>
* <<exported-fields-ceph>>
* <<exported-fields-cloud>>
* <<exported-fields-common>>
* <<exported-fields-couchbase>>
Expand Down Expand Up @@ -412,6 +413,163 @@ type: dict
Contains user configurable fields.
[[exported-fields-ceph]]
== ceph Fields
experimental[] ceph Module
[float]
== ceph Fields
`ceph` contains the metrics that were scraped from CEPH.
[float]
== health Fields
health
[float]
=== ceph.health.cluster.overall_status
type: keyword
Overall status of the cluster
[float]
=== ceph.health.cluster.timechecks.epoch
type: long
Map version
[float]
=== ceph.health.cluster.timechecks.round.value
type: long
timecheck round
[float]
=== ceph.health.cluster.timechecks.round.status
type: keyword
Status of the round
[float]
=== ceph.health.mon.available.pct
type: long
Available percent of the MON
[float]
=== ceph.health.mon.health
type: keyword
Health of the MON
[float]
=== ceph.health.mon.available.kb
type: long
Available KB of the MON
[float]
=== ceph.health.mon.total.kb
type: long
Total KB of the MON
[float]
=== ceph.health.mon.used.kb
type: long
Used KB of the MON
[float]
=== ceph.health.mon.last_updated
type: date
Time when was updated
[float]
=== ceph.health.mon.name
type: keyword
Name of the MON
[float]
=== ceph.health.mon.store_stats.log.bytes
type: long
format: bytes
Log bytes of MON
[float]
=== ceph.health.mon.store_stats.misc.bytes
type: long
format: bytes
Misc bytes of MON
[float]
=== ceph.health.mon.store_stats.sst.bytes
type: long
format: bytes
SST bytes of MON
[float]
=== ceph.health.mon.store_stats.total.bytes
type: long
format: bytes
Total bytes of MON
[float]
=== ceph.health.mon.store_stats.last_updated
type: long
Last updated
[[exported-fields-cloud]]
== Cloud Provider Metadata Fields
Expand Down
36 changes: 36 additions & 0 deletions metricbeat/docs/modules/ceph.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-module-ceph]]
== ceph Module

This is the ceph Module. Metrics are collected submitting HTTP GET requests to ceph-rest-api.
Reference: http://docs.ceph.com/docs/master/man/8/ceph-rest-api/


[float]
=== Example Configuration

The ceph module supports the standard configuration options that are described
in <<configuration-metricbeat>>. Here is an example configuration:

[source,yaml]
----
metricbeat.modules:
#- module: ceph
# metricsets: ["health"]
# enabled: true
# period: 10s
# hosts: ["localhost:5000"]
----

[float]
=== Metricsets

The following metricsets are available:

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

include::ceph/health.asciidoc[]

19 changes: 19 additions & 0 deletions metricbeat/docs/modules/ceph/health.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-metricset-ceph-health]]
include::../../../module/ceph/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/health/_meta/data.json[]
----
2 changes: 2 additions & 0 deletions metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ This file is generated! See scripts/docs_collector.py
////

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

include::modules/apache.asciidoc[]
include::modules/ceph.asciidoc[]
include::modules/couchbase.asciidoc[]
include::modules/docker.asciidoc[]
include::modules/haproxy.asciidoc[]
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/include/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
// This list is automatically generated by `make imports`
_ "github.com/elastic/beats/metricbeat/module/apache"
_ "github.com/elastic/beats/metricbeat/module/apache/status"
_ "github.com/elastic/beats/metricbeat/module/ceph"
_ "github.com/elastic/beats/metricbeat/module/ceph/health"
_ "github.com/elastic/beats/metricbeat/module/couchbase"
_ "github.com/elastic/beats/metricbeat/module/couchbase/bucket"
_ "github.com/elastic/beats/metricbeat/module/couchbase/cluster"
Expand Down
7 changes: 7 additions & 0 deletions metricbeat/metricbeat.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ metricbeat.modules:
# Password of hosts. Empty by default
#password: test123

#-------------------------------- ceph Module --------------------------------
#- module: ceph
# metricsets: ["health"]
# enabled: true
# period: 10s
# hosts: ["localhost:5000"]

#------------------------------ couchbase Module -----------------------------
#- module: couchbase
#metricsets: ["cluster", "node", "bucket"]
Expand Down
Loading

0 comments on commit f9031b9

Please sign in to comment.