-
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
server Metricset for Zookeeper Metricbeat module #10341
Merged
sayden
merged 10 commits into
elastic:master
from
sayden:feature/mb/zookeeper-server-metricset
Jan 28, 2019
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0e82ebe
Atomic commit
sayden be788ed
Headers missing added.
sayden bb8d3fb
Comments addressed
sayden 1f05fff
data.json updated
sayden d386b86
Fields doc needed an update
sayden d2ed29d
It seems that X-pack must also be updated manually (yet)
sayden bb62dbe
Improve error handling and messages.
sayden 2bdf989
Add changelog entry
sayden b9e63be
Skip data generation test
sayden b5fab40
Some improvements on the error handling
sayden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//// | ||
This file is generated! See scripts/docs_collector.py | ||
//// | ||
|
||
[[metricbeat-metricset-zookeeper-server]] | ||
=== ZooKeeper server metricset | ||
|
||
include::../../../module/zookeeper/server/_meta/docs.asciidoc[] | ||
|
||
|
||
==== Fields | ||
|
||
For a description of each field in the metricset, see the | ||
<<exported-fields-zookeeper,exported fields>> section. | ||
|
||
Here is an example document generated by this metricset: | ||
|
||
[source,json] | ||
---- | ||
include::../../../module/zookeeper/server/_meta/data.json[] | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
- module: zookeeper | ||
enabled: true | ||
metricsets: ["mntr"] | ||
metricsets: ["mntr", "server"] | ||
period: 10s | ||
hosts: ["localhost:2181"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
- module: zookeeper | ||
#metricsets: | ||
# - mntr | ||
# - server | ||
period: 10s | ||
hosts: ["localhost:2181"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"@timestamp": "2017-10-12T08:05:34.853Z", | ||
"agent": { | ||
"hostname": "host.example.com", | ||
"name": "host.example.com" | ||
}, | ||
"event": { | ||
"dataset": "zookeeper.server", | ||
"duration": 115000, | ||
"module": "zookeeper" | ||
}, | ||
"metricset": { | ||
"name": "server" | ||
}, | ||
"service": { | ||
"address": "localhost:2181", | ||
"type": "zookeeper", | ||
"version": "3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03" | ||
}, | ||
"zookeeper": { | ||
"server": { | ||
"connections": 1, | ||
"count": 0, | ||
"epoch": 0, | ||
"latency": { | ||
"avg": 0, | ||
"max": 0, | ||
"min": 0 | ||
}, | ||
"mode": "standalone", | ||
"node_count": 4, | ||
"outstanding": 0, | ||
"received": 38, | ||
"sent": 37, | ||
"version_date": "06/29/2018 04:05 GMT", | ||
"zxid": "0x0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
`server` Metricset fetches the data returned by the `srvr` admin keyword. | ||
|
||
* *connections*: Connections established by the server | ||
* *latency.avg*: Average latency of the server | ||
* *latency.max*: Max latency reached by the server | ||
* *latency.min*: Minimum latency that has been reached by the server | ||
* *mode*: Server mode | ||
* *node_count*: Total number of nodes | ||
* *outstanding*: Outstanding | ||
* *received*: Received requests to the server | ||
* *sent*: Requests sent by the server | ||
* *version_date*: Date of the Zookeeper release in use | ||
* *zxid*: Original value of the Zookeeper transaction ID | ||
* *count*: Total transactions of the leader in epoch | ||
* *epoch*: Epoch value of the Zookeeper transaction ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
- name: server | ||
type: group | ||
description: 'server contains the metrics reported by the four-letter `srvr` command.' | ||
release: ga | ||
fields: | ||
- name: connections | ||
type: long | ||
description: Connections established by the server | ||
- name: latency | ||
type: group | ||
fields: | ||
- name: avg | ||
type: long | ||
description: Average latency of the server | ||
- name: max | ||
type: long | ||
description: Max latency reached by the server | ||
- name: min | ||
type: long | ||
description: Minimum latency that has been reached by the server | ||
- name: mode | ||
type: keyword | ||
description: Server mode | ||
- name: node_count | ||
type: long | ||
description: Total number of nodes | ||
- name: outstanding | ||
type: long | ||
description: Outstanding | ||
- name: received | ||
type: long | ||
description: Received requests to the server | ||
- name: sent | ||
type: long | ||
description: Requests sent by the server | ||
- name: version_date | ||
type: date | ||
description: Date of the Zookeeper release in use | ||
- name: zxid | ||
type: keyword | ||
description: Original value of the Zookeeper transaction ID | ||
- name: count | ||
type: long | ||
description: Total transactions of the leader in epoch | ||
- name: epoch | ||
type: long | ||
description: Epoch value of the Zookeeper transaction ID |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would be nice if this was also broken up as
service.ip
andservice.port
.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.
But we would still keep
service.address
too I would assume. As ip does not match localhost for example.BTW: This is not something related to this PR as it's done in the module logic. @webmat Could you open a separte issue for this? Nice thing here is we can always add this logic as it's not breaking but addition.
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.
Yes, we'd keep
service.address
as the source of truth.