-
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
Adding beat module with state metricset #12615
Conversation
jenkins, test this |
Co-Authored-By: Nicolas Ruflin <spam@ruflin.com>
Co-Authored-By: Nicolas Ruflin <spam@ruflin.com>
Co-Authored-By: Nicolas Ruflin <spam@ruflin.com>
Pinging @elastic/stack-monitoring |
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.
I wonder if we should follow ECS here?
"service": { | ||
"address": "127.0.0.1:5066", | ||
"name": "beat", | ||
"type": "beat" |
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.
This does not seem to be correct. This should be metricbeat
. And name should probably be what we have in beat.name
or skip it.
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.
Done in 64eff0c.
{ | ||
"@timestamp": "2017-10-12T08:05:34.853Z", | ||
"beat": { | ||
"id": "1f0c187b-f2ef-4950-b9cc-dd6864b9191a", |
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.
service.id
?
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.
Done in 64eff0c.
"name": "mem" | ||
} | ||
}, | ||
"type": "metricbeat" |
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.
Should be under service.type
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.
Done in 64eff0c.
@ruflin I believe I've addressed all your review feedback now. Ready for your 👀 again, when you get a chance. Thanks! |
@ycombinator Skimmed through it and LGTM. But would be good if for example @mikecote could have a look to as I mainly checked fields and didn't test it locally. |
I think you meant @cachedout? :) |
Yep, 🤦♂ |
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.
I have tested this according to the instructions and found that, as described, the noted fields are present in the second document but not the first, along with differences in field values for things such as timestamps.
This PR adds the
state
metricset to thebeat
Metricbeat module.More specifically, this PR:
modules.d/beat.yml
andmodules.d/beat-xpack.yml
module configuration files.Testing this PR
X-Pack code path (for Stack Monitoring UI)
Build metricbeat with this PR.
Using Kibana > Console, clear out existing Beats monitoring data.
Start Metricbeat with internal collection.
Wait 10 seconds or so for monitoring data to be collected.
Using Kibana > Console, retrieve the latest document from the
.monitoring-beats-*
index and save it.Stop Metricbeat.
Using Kibana > Console, clear out existing Beats monitoring data.
Start Metricbeat with HTTP API enabled for external collection.
In a new window enable the
beats-xpack
Metricbeat module for external collection and start this Metricbeat instance.Wait 10 seconds or so for monitoring data to be collected.
Using Kibana > Console, retrieve the latest document from the
.monitoring-beats-*
index and save it.Compare the JSON document saved from internal collection (step 5) with the JSON document saved from external collection (step 11). You might want to use a tool like jsondiff.com for this purpose.
The only structural difference between the two documents should be that the externally-collected JSON document should have 7 extra top-level fields:
@timestamp
,event
,ecs
,agent
,metricset
,service
,host
. These are expected extra fields that are always inserted by Metricbeat. Other than these expected structural differences, the rest of the structure should be identical; however, values of corresponding fields may be different.