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] Zookeeper ecs #10286

Merged
merged 8 commits into from
Jan 24, 2019
Merged

[Metricbeat] Zookeeper ecs #10286

merged 8 commits into from
Jan 24, 2019

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented Jan 23, 2019

No description provided.

@ruflin ruflin added in progress Pull request is currently in progress. module review Metricbeat Metricbeat ecs Team:Integrations Label for the Integrations team labels Jan 23, 2019
@ruflin ruflin self-assigned this Jan 23, 2019
@ruflin ruflin requested a review from webmat January 23, 2019 12:50
@ruflin ruflin requested review from a team as code owners January 23, 2019 12:50
@ruflin ruflin changed the title Zookeeper ecs [Metricbeat] Zookeeper ecs Jan 23, 2019
@@ -5,6 +5,7 @@
command.
release: ga
fields:
# TODO: Shoudl also be migrated?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@webmat As we don't have service.hostname you would say this should go into host.hostname

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this field refered anywhere else in the code, we can probably remove it from here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I were managing a Zk cluster, I would definitely want to know which hostname an event is associated to. I say we keep this field.

I agree with using host.hostname.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem that this will cause now is that host.name will be filled in by Beats and host.hostname will be filled by the service (which could be on a remote host).

Theoretically if host.hostname != host.name, the metadata from the host where Beats is running on should not be added or added in the observer, correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, events observed on one of my Kafka nodes should have host.* about the host of the Kafka node, whether it's remote or local.

The data about the host running Metricbeat should either be under observer or agent (e.g. agent.hostname), not host. The agent's details are pipeline metadata, not "userland" event data. So I'd rather have Metricbeat's host metadata processor not populate host.

For your host.name concern, seeing how is this value set when configuring a Beat, I'd say the name: Beat option should populate observer instead.

Note that I'm starting to see concrete problems with the agent/observer dichotomy, in relationship to host. Too late to open that can of worm for now, though...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like we are on the same page here for all the above you mentioned. Unfortunately not something we can clean up right now.

To not have confusion but still this value in one place, WDYT about service.hostname? We already have service.address from Metricbeat and we could add this on the Metricbeat side. Does not require to be in ECS.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the comment for now so this PR can be merged. Lets still continue this discussion as I think it applies broader then just to zookeeper.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah let's go with service.hostname for now

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, wait to resolve the hostname question.


t.Logf("%s/%s event: %+v", f.Module().Name(), f.Name(), event)

e, _ := events[0].BeatEvent("zookeeper", "mntr").Fields.GetValue("zookeeper.mntr")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

events[0].BeatEvent("zookeeper", "mntr").Fields could be stored in a variable as it is being used two times.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, would make the logic a little more obvious.

Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Agree with a point by @jsoriano, but not a deal breaker for me either way.

"service": {
"address": "localhost:2181",
"type": "zookeeper",
"version": "3.4.8--1, built on 02/06/2016 03:18 GMT"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh jeez 🤦‍♂️

Well, I didn't think our keyword version field would get versions that detailed 😆I guess that's a testament to the flexibility of ECS

Copy link
Member Author

@ruflin ruflin Jan 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nice part is that 3.4.8 is at the beginning, so prefix queries for 3.4 still work.

@@ -5,6 +5,7 @@
command.
release: ga
fields:
# TODO: Shoudl also be migrated?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I were managing a Zk cluster, I would definitely want to know which hostname an event is associated to. I say we keep this field.

I agree with using host.hostname.


t.Logf("%s/%s event: %+v", f.Module().Name(), f.Name(), event)

e, _ := events[0].BeatEvent("zookeeper", "mntr").Fields.GetValue("zookeeper.mntr")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, would make the logic a little more obvious.

* Rename `zookeeper.mntr.version` to `service.version`

The bigger refactoring in this PR to the reporter interface was needed to allow publishing version on the top level.
Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ruflin ruflin merged commit f8f8069 into elastic:master Jan 24, 2019
@ruflin ruflin deleted the zookeeper-ecs branch January 24, 2019 15:30
@ruflin ruflin mentioned this pull request Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecs in progress Pull request is currently in progress. Metricbeat Metricbeat module review Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants