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

[7.14](backport #25599) [Metricbeat] Add Couchbase's Sync Gateway module #27156

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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,205 changes: 1,205 additions & 0 deletions metricbeat/docs/fields.asciidoc

Large diffs are not rendered by default.

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

[[metricbeat-module-syncgateway]]
[role="xpack"]
== SyncGateway module

beta[]

Sync Gateway is the synchronization server in a Couchbase for Mobile and Edge deployment. This metricset allows to monitor a Sync Gateway instance by using its REST API.

Sync Gateway access `[host]:[port]/_expvar` on Sync Gateway nodes to fetch metrics data, ensure that the URL is accessible from the host where Metricbeat is running.


[float]
=== Example configuration

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

[source,yaml]
----
metricbeat.modules:
- module: syncgateway
metricsets:
- db
# - memory
# - replication
# - resources
period: 10s

# SyncGateway hosts
hosts: ["127.0.0.1:4985"]
----

[float]
=== Metricsets

The following metricsets are available:

* <<metricbeat-metricset-syncgateway-db,db>>

* <<metricbeat-metricset-syncgateway-memory,memory>>

* <<metricbeat-metricset-syncgateway-replication,replication>>

* <<metricbeat-metricset-syncgateway-resources,resources>>

include::syncgateway/db.asciidoc[]

include::syncgateway/memory.asciidoc[]

include::syncgateway/replication.asciidoc[]

include::syncgateway/resources.asciidoc[]

25 changes: 25 additions & 0 deletions metricbeat/docs/modules/syncgateway/db.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-syncgateway-db]]
[role="xpack"]
=== SyncGateway db metricset

beta[]

include::../../../../x-pack/metricbeat/module/syncgateway/db/_meta/docs.asciidoc[]

This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.

==== Fields

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

Here is an example document generated by this metricset:

[source,json]
----
include::../../../../x-pack/metricbeat/module/syncgateway/db/_meta/data.json[]
----
24 changes: 24 additions & 0 deletions metricbeat/docs/modules/syncgateway/memory.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-syncgateway-memory]]
[role="xpack"]
=== SyncGateway memory metricset

beta[]

include::../../../../x-pack/metricbeat/module/syncgateway/memory/_meta/docs.asciidoc[]


==== Fields

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

Here is an example document generated by this metricset:

[source,json]
----
include::../../../../x-pack/metricbeat/module/syncgateway/memory/_meta/data.json[]
----
18 changes: 18 additions & 0 deletions metricbeat/docs/modules/syncgateway/replication.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-syncgateway-replication]]
[role="xpack"]
=== SyncGateway replication metricset

beta[]

include::../../../../x-pack/metricbeat/module/syncgateway/replication/_meta/docs.asciidoc[]


==== Fields

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

25 changes: 25 additions & 0 deletions metricbeat/docs/modules/syncgateway/resources.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-syncgateway-resources]]
[role="xpack"]
=== SyncGateway resources metricset

beta[]

include::../../../../x-pack/metricbeat/module/syncgateway/resources/_meta/docs.asciidoc[]

This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.

==== Fields

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

Here is an example document generated by this metricset:

[source,json]
----
include::../../../../x-pack/metricbeat/module/syncgateway/resources/_meta/data.json[]
----
6 changes: 6 additions & 0 deletions metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-metricset-stan-subscriptions,subscriptions>>
|<<metricbeat-module-statsd,Statsd>> |image:./images/icon-no.png[No prebuilt dashboards] |
.1+| .1+| |<<metricbeat-metricset-statsd-server,server>>
|<<metricbeat-module-syncgateway,SyncGateway>> beta[] |image:./images/icon-no.png[No prebuilt dashboards] |
.4+| .4+| |<<metricbeat-metricset-syncgateway-db,db>> beta[]
|<<metricbeat-metricset-syncgateway-memory,memory>> beta[]
|<<metricbeat-metricset-syncgateway-replication,replication>> beta[]
|<<metricbeat-metricset-syncgateway-resources,resources>> beta[]
|<<metricbeat-module-system,System>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.18+| .18+| |<<metricbeat-metricset-system-core,core>>
|<<metricbeat-metricset-system-cpu,cpu>>
Expand Down Expand Up @@ -350,6 +355,7 @@ include::modules/redisenterprise.asciidoc[]
include::modules/sql.asciidoc[]
include::modules/stan.asciidoc[]
include::modules/statsd.asciidoc[]
include::modules/syncgateway.asciidoc[]
include::modules/system.asciidoc[]
include::modules/tomcat.asciidoc[]
include::modules/traefik.asciidoc[]
Expand Down
5 changes: 5 additions & 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.

12 changes: 12 additions & 0 deletions x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,18 @@ metricbeat.modules:
enabled: false
#ttl: "30s"

#----------------------------- SyncGateway Module -----------------------------
- module: syncgateway
metricsets:
- db
# - memory
# - replication
# - resources
period: 10s

# SyncGateway hosts
hosts: ["127.0.0.1:4985"]

#-------------------------------- Tomcat Module --------------------------------
- module: tomcat
metricsets: ['threading', 'cache', 'memory', 'requests']
Expand Down
10 changes: 10 additions & 0 deletions x-pack/metricbeat/module/syncgateway/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- module: syncgateway
metricsets:
- db
# - memory
# - replication
# - resources
period: 10s

# SyncGateway hosts
hosts: ["127.0.0.1:4985"]
3 changes: 3 additions & 0 deletions x-pack/metricbeat/module/syncgateway/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Sync Gateway is the synchronization server in a Couchbase for Mobile and Edge deployment. This metricset allows to monitor a Sync Gateway instance by using its REST API.

Sync Gateway access `[host]:[port]/_expvar` on Sync Gateway nodes to fetch metrics data, ensure that the URL is accessible from the host where Metricbeat is running.
10 changes: 10 additions & 0 deletions x-pack/metricbeat/module/syncgateway/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- key: syncgateway
title: "SyncGateway"
description: SyncGateway metrics
release: beta
fields:
- name: syncgateway
type: group
description: >
`syncgateway` contains the information and statistics from SyncGateway.
fields:
76 changes: 76 additions & 0 deletions x-pack/metricbeat/module/syncgateway/_meta/testdata/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"interface": ":4984",
"logging": {
"log_file_path": "/var/tmp/sglogs",
"console": {
"log_level": "debug",
"log_keys": [
"*"
]
},
"error": {
"enabled": true,
"rotation": {
"max_size": 20,
"max_age": 180
}
},
"warn": {
"enabled": true,
"rotation": {
"max_size": 20,
"max_age": 90
}
},
"info": {
"enabled": false
},
"debug": {
"enabled": false
}
},
"databases": {
"beer-sample": {
"import_docs": "continuous",
"enable_shared_bucket_access": true,
"bucket": "beer-sample",
"server": "http://172.17.0.2:8091",
"username": "admin",
"password": "123456",
"num_index_replicas": 0,
"users": {
"GUEST": {
"disabled": true
},
"admin": {
"password": "123456",
"admin_channels": [
"*"
]
}
},
"revs_limit": 20
},
"travel-sample": {
"import_docs": "continuous",
"enable_shared_bucket_access": true,
"bucket": "travel-sample",
"server": "http://172.17.0.2:8091",
"username": "admin",
"password": "123456",
"num_index_replicas": 0,
"users": {
"GUEST": {
"disabled": true
},
"admin": {
"password": "123456",
"admin_channels": [
"*"
]
}
},
"revs_limit": 20
}
}
}
Loading