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

Support to CEPH input. #3311

Merged
merged 26 commits into from
Jan 24, 2017
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
32 changes: 32 additions & 0 deletions metricbeat/_meta/beat.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
# 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"


#------------------------------ couchbase Module -----------------------------
#- module: couchbase
#metricsets: ["cluster", "node", "bucket"]
Expand Down
32 changes: 32 additions & 0 deletions metricbeat/_meta/beat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,36 @@ metricbeat.modules:
period: 10s
processes: ['.*']

#-------------------------------- ceph Module --------------------------------
- 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"



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

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

This is the ceph Module.



[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[]

19 changes: 19 additions & 0 deletions metricbeat/docs/modules/ceph/df.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[]
----
19 changes: 19 additions & 0 deletions metricbeat/docs/modules/ceph/osdpoolstats.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-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[]
----
19 changes: 19 additions & 0 deletions metricbeat/docs/modules/ceph/perf.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-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[]
----
19 changes: 19 additions & 0 deletions metricbeat/docs/modules/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-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[]
----
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 @@ -20,6 +21,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
5 changes: 5 additions & 0 deletions metricbeat/include/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ 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/df"
_ "github.com/elastic/beats/metricbeat/module/ceph/osdpoolstats"
_ "github.com/elastic/beats/metricbeat/module/ceph/perf"
_ "github.com/elastic/beats/metricbeat/module/ceph/status"
_ "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
105 changes: 0 additions & 105 deletions metricbeat/metricbeat.yml
Original file line number Diff line number Diff line change
@@ -1,105 +0,0 @@
###################### Metricbeat Configuration Example #######################

# This file is an example configuration file highlighting only the most common
# options. The metricbeat.full.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/metricbeat/index.html

#========================== Modules configuration ============================
metricbeat.modules:

#------------------------------- System Module -------------------------------
- module: system
metricsets:
# CPU stats
- cpu

# System Load stats
- load

# Per CPU core stats
#- core

# IO stats
#- diskio

# Per filesystem stats
- filesystem

# File system summary stats
- fsstat

# Memory stats
- memory

# Network stats
- network

# Per process stats
- process

# Sockets (linux only)
#- socket
enabled: true
period: 10s
processes: ['.*']



#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
# env: staging

#================================ Outputs =====================================

# Configure what outputs to use when sending the data collected by the beat.
# Multiple outputs may be used.

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]

# Optional protocol and basic auth credentials.
#protocol: "https"
#username: "elastic"
#password: "changeme"

#----------------------------- Logstash output --------------------------------
#output.logstash:
# The Logstash hosts
#hosts: ["localhost:5044"]

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"

# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"

#================================ Logging =====================================

# Sets log level. The default log level is info.
# Available log levels are: critical, error, warning, info, debug
#logging.level: debug

# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]
30 changes: 30 additions & 0 deletions metricbeat/module/ceph/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- module: ceph
metricsets: ["perf"]
enabled: true
period: 1s

ceph:
Copy link
Member

Choose a reason for hiding this comment

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

Is this working? This looks like invalid yaml. All config options related to a metricset should be in the module itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually no. I commited a new version with this file corrected now.

# location of ceph binary
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to split up the config into config.full.yml and config.yml and only have the extensive options in the full file. See other metricsets for examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Working.

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"

Loading