-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Support to CEPH input. #3311
Support to CEPH input. #3311
Changes from 11 commits
de6ae45
dd0f784
98715a7
0c8ae90
a1ff1f7
41c445d
86982ce
8868254
b082c45
5f8dd37
208818c
b8ca266
1011f02
747debd
fbe6ba2
66bd1d4
06fd61c
85a3c26
9dec734
9cec164
596fd29
46ad8db
9c8e65a
48c0e38
d289374
431c99f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
//// | ||
This file is generated! See scripts/docs_collector.py | ||
//// | ||
|
||
[[metricbeat-module-ceph]] | ||
== ceph Module | ||
|
||
This is the ceph Module. | ||
|
||
We used code/reference from: | ||
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/ceph/ceph.go | ||
https://github.com/elastic/beats/blob/master/metricbeat/module/docker/ | ||
|
||
Thanks! | ||
|
||
|
||
[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: ["perf"] | ||
enabled: true | ||
period: 1s | ||
|
||
ceph: | ||
# location of ceph binary | ||
binary_path = "/usr/bin/ceph" | ||
# | ||
##### | ||
### MetricSet perf gather statistics via the admin socket, requires socket_dir, mon_prefix, osd_prefix and socket_suffix | ||
##### | ||
# directory in which to look for socket files | ||
socket_dir = "/var/run/ceph" | ||
# prefix of MON and OSD socket files, used to determine socket type | ||
mon_prefix = "ceph-mon" | ||
osd_prefix = "ceph-osd" | ||
# suffix used to identify socket files | ||
socket_suffix = "asok" | ||
# | ||
##### | ||
### MetricSets status,df and poolio gather statistics via ceph commands, requires ceph_user and ceph_config | ||
##### | ||
# Ceph user to authenticate as, ceph will search for the corresponding keyring | ||
# e.g. client.admin.keyring in /etc/ceph | ||
# Consult the ceph documentation for more detail on keyring generation. | ||
user = "client.admin" | ||
# Ceph configuration to use to locate the cluster | ||
config_path = "/etc/ceph/ceph.conf" | ||
|
||
---- | ||
|
||
[float] | ||
=== Metricsets | ||
|
||
The following metricsets are available: | ||
|
||
* <<metricbeat-metricset-ceph-df,df>> | ||
|
||
* <<metricbeat-metricset-ceph-osdpoolstats,osdpoolstats>> | ||
|
||
* <<metricbeat-metricset-ceph-perf,perf>> | ||
|
||
* <<metricbeat-metricset-ceph-status,status>> | ||
|
||
include::ceph/df.asciidoc[] | ||
|
||
include::ceph/osdpoolstats.asciidoc[] | ||
|
||
include::ceph/perf.asciidoc[] | ||
|
||
include::ceph/status.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-df]] | ||
include::../../../module/ceph/df/_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/df/_meta/data.json[] | ||
---- |
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-osdpoolstats]] | ||
include::../../../module/ceph/osdpoolstats/_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/osdpoolstats/_meta/data.json[] | ||
---- |
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-perf]] | ||
include::../../../module/ceph/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/perf/_meta/data.json[] | ||
---- |
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-status]] | ||
include::../../../module/ceph/status/_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/status/_meta/data.json[] | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,38 @@ metricbeat.modules: | |
# Password of hosts. Empty by default | ||
#password: test123 | ||
|
||
#-------------------------------- ceph Module -------------------------------- | ||
- module: ceph | ||
metricsets: ["perf"] | ||
enabled: true | ||
period: 1s | ||
|
||
ceph: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part of the config must be moved under the module. I assume it doesn't work the way it is at the moment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved. |
||
# location of ceph binary | ||
binary_path = "/usr/bin/ceph" | ||
# | ||
##### | ||
### MetricSet perf gather statistics via the admin socket, requires socket_dir, mon_prefix, osd_prefix and socket_suffix | ||
##### | ||
# directory in which to look for socket files | ||
socket_dir = "/var/run/ceph" | ||
# prefix of MON and OSD socket files, used to determine socket type | ||
mon_prefix = "ceph-mon" | ||
osd_prefix = "ceph-osd" | ||
# suffix used to identify socket files | ||
socket_suffix = "asok" | ||
# | ||
##### | ||
### MetricSets status,df and poolio gather statistics via ceph commands, requires ceph_user and ceph_config | ||
##### | ||
# Ceph user to authenticate as, ceph will search for the corresponding keyring | ||
# e.g. client.admin.keyring in /etc/ceph | ||
# Consult the ceph documentation for more detail on keyring generation. | ||
user = "client.admin" | ||
# Ceph configuration to use to locate the cluster | ||
config_path = "/etc/ceph/ceph.conf" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general we recommend metricbeat to connect to each node and get the specific metrics for each node instead from the cluster. What is inside this file? You should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used telegraf as reference and that only collects performance metrics from the MON and OSD nodes in a Ceph storage cluster. I can change the description, perhaps. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not aware of the inner workings of CEPH. Can you share some details on what MON and OSD nodes are? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A Ceph Storage Cluster requires at least one MON and at least 2 OSD. A OSD (Object Storage Daemon) handles data (storage, replication, recovery...) and provide some monitoring information to MON by checking others OSD for a heartbeat. A MON (Monitor) handles the cluster state (maps, history...). You can have this architecture on one server/node but just for tests. Real productions environments works in a distributed way. If you want metrics just for the daemons where metricbeat its collecting, you can use Admin Socket Stats. In our case here, it's the "perf" metricset. If you want metrics for the whole cluster, you can use ceph commands. In our case here, it's the "status", "df" and "osdpoolstats" metricsets. That's why I wrote those comments on config.yml. Depending on choosen metricset, you need just some parameters. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "...means only one of the instances connecting needs to collect them?" Yes. |
||
|
||
|
||
#------------------------------ couchbase Module ----------------------------- | ||
#- module: couchbase | ||
#metricsets: ["cluster", "node", "bucket"] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the reference is only used to get inspiration, these should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I'll change to use Rest API, this reference will be no longer necessary indeed. I'll remove.