Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Always report Pod UID in the `pod` metricset. {pull}12345[12345]
- Add Vsphere Virtual Machine operating system to `os` field in Vsphere virtualmachine module. {pull}12391[12391]
- Add validation for elasticsearch and kibana modules' metricsets when xpack.enabled is set to true. {pull}12386[12386]
- Add CockroachDB module. {pull}12465[12465]
Comment thread
jsoriano marked this conversation as resolved.
Outdated
- Add support for metricbeat modules based on existing modules (a.k.a. light modules) {issue}12270[12270] {pull}12465[12465]
- Add a system/entropy metricset {pull}12450[12450]
- Allow redis URL format in redis hosts config. {pull}12408[12408]
Expand Down
17 changes: 8 additions & 9 deletions dev-tools/cmd/module_include_list/module_include_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,18 @@ func main() {
// Build import paths.
var imports []string
for _, dir := range dirs {
// Skip dirs that have no .go files.
goFiles, err := filepath.Glob(filepath.Join(dir, "*.go"))
if err != nil {
log.Fatal("Failed checking for .go files in package dir: %v", err)
}
if len(goFiles) == 0 {
continue
}

// Skip packages without an init() function because that cannot register
// anything as a side-effect of being imported (e.g. filebeat/input/file).
var foundInitMethod bool
goFiles, err := filepath.Glob(filepath.Join(dir, "*.go"))
if err != nil {
log.Fatalf("Failed checking for .go files in package dir: %v", err)
}
for _, f := range goFiles {
// Skip test files
if strings.HasSuffix(f, "_test.go") {
continue
}
Comment thread
jsoriano marked this conversation as resolved.
if hasInitMethod(f) {
foundInitMethod = true
break
Expand Down
9 changes: 9 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ grouped in the following categories:
* <<exported-fields-beat>>
* <<exported-fields-ceph>>
* <<exported-fields-cloud>>
* <<exported-fields-cockroachdb>>
* <<exported-fields-common>>
* <<exported-fields-consul>>
* <<exported-fields-coredns>>
Expand Down Expand Up @@ -2701,6 +2702,14 @@ alias to: cloud.region

--

[[exported-fields-cockroachdb]]
== CockroachDB fields

CockroachDB module




[[exported-fields-common]]
== Common fields

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

[[metricbeat-module-cockroachdb]]
== CockroachDB module

beta[]

This module periodically fetches metrics from CockroachDB.

[float]
=== Compatibility

The CockroachDB `status` metricset is compatible with any CockroachDB version
exposing metrics in Prometheus format.


[float]
=== Example configuration

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

[source,yaml]
----
metricbeat.modules:
- module: cockroachdb
metricsets: ['status']
period: 10s
hosts: ['localhost:8080']

# This module uses the Prometheus collector metricset, all
# the options for this metricset are also available here.
#metrics_path: /_status/vars
----

This module supports TLS connections when using `ssl` config field, as described in <<configuration-ssl>>.
It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets

The following metricsets are available:

* <<metricbeat-metricset-cockroachdb-status,status>>

include::cockroachdb/status.asciidoc[]

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

[[metricbeat-metricset-cockroachdb-status]]
=== CockroachDB status metricset

beta[]

include::../../../../x-pack/metricbeat/module/cockroachdb/status/_meta/docs.asciidoc[]


==== Fields

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

3 changes: 3 additions & 0 deletions metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ This file is generated! See scripts/docs_collector.py
|<<metricbeat-metricset-ceph-osd_df,osd_df>>
|<<metricbeat-metricset-ceph-osd_tree,osd_tree>>
|<<metricbeat-metricset-ceph-pool_disk,pool_disk>>
|<<metricbeat-module-cockroachdb,CockroachDB>> beta[] |image:./images/icon-no.png[No prebuilt dashboards] |
.1+| .1+| |<<metricbeat-metricset-cockroachdb-status,status>> beta[]
|<<metricbeat-module-consul,consul>> beta[] |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.1+| .1+| |<<metricbeat-metricset-consul-agent,agent>> beta[]
|<<metricbeat-module-coredns,coredns>> beta[] |image:./images/icon-yes.png[Prebuilt dashboards are available] |
Expand Down Expand Up @@ -182,6 +184,7 @@ include::modules/aerospike.asciidoc[]
include::modules/apache.asciidoc[]
include::modules/aws.asciidoc[]
include::modules/ceph.asciidoc[]
include::modules/cockroachdb.asciidoc[]
include::modules/consul.asciidoc[]
include::modules/coredns.asciidoc[]
include::modules/couchbase.asciidoc[]
Expand Down
1 change: 0 additions & 1 deletion packetbeat/include/list.go

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

1 change: 1 addition & 0 deletions x-pack/metricbeat/include/list.go

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

10 changes: 10 additions & 0 deletions x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,16 @@ metricbeat.modules:
hosts: ["localhost:5000"]
enabled: true

#----------------------------- CockroachDB Module -----------------------------
- module: cockroachdb
metricsets: ['status']
period: 10s
hosts: ['localhost:8080']

# This module uses the Prometheus collector metricset, all
# the options for this metricset are also available here.
#metrics_path: /_status/vars

#-------------------------------- Consul Module --------------------------------
- module: consul
metricsets:
Expand Down
8 changes: 8 additions & 0 deletions x-pack/metricbeat/module/cockroachdb/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- module: cockroachdb
metricsets: ['status']
period: 10s
hosts: ['localhost:8080']

# This module uses the Prometheus collector metricset, all
# the options for this metricset are also available here.
#metrics_path: /_status/vars
7 changes: 7 additions & 0 deletions x-pack/metricbeat/module/cockroachdb/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This module periodically fetches metrics from CockroachDB.

[float]
=== Compatibility

The CockroachDB `status` metricset is compatible with any CockroachDB version
exposing metrics in Prometheus format.
10 changes: 10 additions & 0 deletions x-pack/metricbeat/module/cockroachdb/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- key: cockroachdb
title: 'CockroachDB'
release: beta
description: >
CockroachDB module
settings: ["ssl", "http"]
fields:
- name: cockroachdb
type: group
fields:
23 changes: 23 additions & 0 deletions x-pack/metricbeat/module/cockroachdb/fields.go

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

3 changes: 3 additions & 0 deletions x-pack/metricbeat/module/cockroachdb/module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: cockroachdb
metricsets:
- status
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The CockroachDB `status` metricset collects metrics exposed by the
https://www.cockroachlabs.com/docs/v2.1/monitoring-and-alerting.html#prometheus-endpoint[Prometheus endpoint]
of CockroachDB.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- release: beta
Loading