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

Cherry-pick to 7.0: Enable checks for jolokia documented fields (#10979) #11144

Merged
merged 2 commits into from
Mar 12, 2019
Merged
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
3 changes: 1 addition & 2 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ https://github.com/elastic/beats/compare/v7.0.0-beta1...master[Check the HEAD di
- Migrate docker autodiscover to ECS. {issue}10757[10757] {pull}10862[10862]
- Fix issue in kubernetes module preventing usage percentages to be properly calculated. {pull}10946[10946]
- Fix parsing error using GET in Jolokia module. {pull}11075[11075] {issue}11071[11071]
- Collect metrics when EC2 instances are not in running state. {issue}11008[11008] {pull}11023[11023]
- Change ECS field cloud.provider to aws. {pull}11023[11023]
- Add documentation about jolokia autodiscover fields. {issue}10925[10925] {pull}10979[10979]

*Packetbeat*

Expand Down
70 changes: 70 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10796,6 +10796,76 @@ jolokia contains metrics exposed via jolokia agent



*`jolokia.agent.version`*::
+
--
type: keyword

Version number of jolokia agent.


--

*`jolokia.agent.id`*::
+
--
type: keyword

Each agent has a unique id which can be either provided during startup of the agent in form of a configuration parameter or being autodetected. If autodected, the id has several parts: The IP, the process id, hashcode of the agent and its type.


--

*`jolokia.server.product`*::
+
--
type: keyword

The container product if detected.


--

*`jolokia.server.version`*::
+
--
type: keyword

The container's version (if detected).


--

*`jolokia.server.vendor`*::
+
--
type: keyword

The vendor of the container the agent is running in.


--

*`jolokia.url`*::
+
--
type: keyword

The URL how this agent can be contacted.


--

*`jolokia.secured`*::
+
--
type: boolean

Whether the agent was configured for authentication or not.


--

[[exported-fields-kafka]]
== Kafka fields

Expand Down
28 changes: 28 additions & 0 deletions metricbeat/module/jolokia/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,31 @@
description: >
jolokia contains metrics exposed via jolokia agent
fields:
- name: agent.version
type: keyword
description: >
Version number of jolokia agent.
- name: agent.id
type: keyword
description: >
Each agent has a unique id which can be either provided during startup of the agent in form of a configuration parameter or being autodetected. If autodected, the id has several parts: The IP, the process id, hashcode of the agent and its type.
- name: server.product
type: keyword
description: >
The container product if detected.
- name: server.version
type: keyword
description: >
The container's version (if detected).
- name: server.vendor
type: keyword
description: >
The vendor of the container the agent is running in.
- name: url
type: keyword
description: >
The URL how this agent can be contacted.
- name: secured
type: boolean
description: >
Whether the agent was configured for authentication or not.
2 changes: 1 addition & 1 deletion metricbeat/module/jolokia/fields.go

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

7 changes: 6 additions & 1 deletion metricbeat/module/jolokia/jmx/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
- release: ga
- key: jmx
type: group
description: >
Jolokia jmx metricset
release: ga
fields:
8 changes: 8 additions & 0 deletions metricbeat/tests/system/test_autodiscover_jolokia.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,11 @@ def test_jolokia_jmx(self):
print(evt)

assert evt["jolokia"]["test"]["gc"]["collection_count"] >= 0

# Check Jolokia autodiscover metadata is added
assert evt['jolokia']['server']['product'] == 'tomcat'
assert evt['jolokia']['server']['vendor'] == 'Apache'

# Remove "test" fields because namespace specific fields are not documented
del(evt["jolokia"]["test"])
self.assert_fields_are_documented(output[0])