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

[Metricbeat] Add Couchbase's Sync Gateway module #25599

Merged
merged 20 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from 12 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,206 changes: 1,206 additions & 0 deletions metricbeat/docs/fields.asciidoc

Large diffs are not rendered by default.

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

[[metricbeat-module-syncgateway]]
== SyncGateway module

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

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

[[metricbeat-metricset-syncgateway-db]]
=== SyncGateway db metricset

include::../../../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::../../../module/syncgateway/db/_meta/data.json[]
----
21 changes: 21 additions & 0 deletions metricbeat/docs/modules/syncgateway/memory.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-syncgateway-memory]]
=== SyncGateway memory metricset

include::../../../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::../../../module/syncgateway/memory/_meta/data.json[]
----
15 changes: 15 additions & 0 deletions metricbeat/docs/modules/syncgateway/replication.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-syncgateway-replication]]
=== SyncGateway replication metricset

include::../../../module/syncgateway/replication/_meta/docs.asciidoc[]


==== Fields

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

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

[[metricbeat-metricset-syncgateway-resources]]
=== SyncGateway resources metricset

include::../../../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::../../../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>> |image:./images/icon-no.png[No prebuilt dashboards] |
.4+| .4+| |<<metricbeat-metricset-syncgateway-db,db>>
|<<metricbeat-metricset-syncgateway-memory,memory>>
|<<metricbeat-metricset-syncgateway-replication,replication>>
|<<metricbeat-metricset-syncgateway-resources,resources>>
|<<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 metricbeat/include/list_common.go

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

12 changes: 12 additions & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,18 @@ metricbeat.modules:
# Redis AUTH password. Empty by default.
#password: foobared

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

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

#------------------------------- Traefik Module -------------------------------
- module: traefik
metricsets: ["health"]
Expand Down
10 changes: 10 additions & 0 deletions metricbeat/module/syncgateway/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- module: syncgateway
# metricsets:
kaiyan-sheng marked this conversation as resolved.
Show resolved Hide resolved
# - db
# - memory
# - replication
# - resources
period: 10s

# SyncGateway hosts
hosts: ["127.0.0.1:4985"]
3 changes: 3 additions & 0 deletions 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 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: ga
fields:
- name: syncgateway
type: group
description: >
`syncgateway` contains the information and statistics from SyncGateway.
fields:
76 changes: 76 additions & 0 deletions 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