-
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
Issue #7187/fix vsphere metricbeat host #7213
Issue #7187/fix vsphere metricbeat host #7213
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
@ruflin any idea how to fix the build failing , besides reverting the fields.yml ? |
@marian-craciunescu Thanks for the PR. You have to run |
if err != nil { | ||
logp.Debug("vsphere", err.Error()) | ||
} else { | ||
event["hostname"] = hostSystem.Summary.Config.Name |
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 we put this under the global host.name
field? See in ECS: https://github.com/elastic/ecs#host
It will require a bit more changes as with the Fetcher
used here a few tricks must be applied to add fields on the root. I can help with that.
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 think I can do it..But @bogd raised a valid concern.Maybe somebody is already using this field as it is.I do not know what is the current state for it right now (is vsphere only in beta? )
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, vsphere is still in beta to exactly allow such changes. I assume you are thinking of moving it for both metricsets which would make querying easier. Would be great to have that.
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.
Based on the current ECS https://www.elastic.co/guide/en/ecs/current/ecs-host.html, it should be host.id
and host.hostname
.
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.
Sorry, please ignore my comment above. I just saw #7213 (comment)
Hi @marian-craciunescu, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in yout Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile? |
171b48d
to
be1fcf9
Compare
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.
Could you also add a changelog entry? If we add host.name
to the other metricset too it should go under breaking changes.
You have to rebase again on master because of a conflicting change in fields.go
. No need to try to merge it as it's auto generated with make update
.
if err != nil { | ||
logp.Debug("vsphere", err.Error()) | ||
} else { | ||
event["hostname"] = hostSystem.Summary.Config.Name |
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, vsphere is still in beta to exactly allow such changes. I assume you are thinking of moving it for both metricsets which would make querying easier. Would be great to have that.
@marian-craciunescu Any updates on this one? |
@ruflin I will update the pull request soon. |
Any update on this? |
Closing this PR due to inactivity. @marian-craciunescu please reopen if you decide to work again on this. |
How should I procced to reopen this ? |
@marian-craciunescu You should see a button below to reopen this PR, if not, let me know and I can reopen. @webmat WDYT about the placement of |
|
@marian-craciunescu Just reopened it, hope that helps. |
Thanks.. |
I'd be in favour of leaving the vsphere hostname where it is. I consider |
Maybe it is better to have a structure like
|
@marian-craciunescu I like what you propose above that you reuse the |
I don't think will be a breaking change.Basically 2 fields will not be populated and will not exist anymore .I wil test with an existing mapping on my cluster and I wil get back with more info |
…7187/fix-vmsphere-metricbeat-host
Done I would say |
@odacremolbap the build is failing and it does not seems to be related to what I've did. |
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.
thanks for your work so far, much appreciated.
can you check the 2 nits commented in the review?
metricbeat/magefile.go
Outdated
@@ -51,7 +51,7 @@ import ( | |||
|
|||
func init() { | |||
common.RegisterCheckDeps(update.Update) | |||
|
|||
devtools.SetBuildVariableSources(devtools.DefaultBeatBuildVariableSources) |
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.
is this needed?
If not, can you remove that line
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 will remove it..it should not be be there
@@ -255,7 +255,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d | |||
- Fix marshaling of ms-since-epoch values in `elasticsearch/cluster_stats` metricset. {pull}14378[14378] | |||
- Fix checking tagsFilter using length in cloudwatch metricset. {pull}14525[14525] | |||
- Log bulk failures from bulk API requests to monitoring cluster. {issue}14303[14303] {pull}14356[14356] | |||
|
|||
- Vshpere module splits `virtualmachine.host` into `virtualmachine.host.id` and `virtualmachine.host.hostname`. {issue}7187[7187] {pull}7213[7213] | |||
*Packetbeat* |
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.
Can you add a blank line between your entry and the packetbeat section?
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
@marian-craciunescu we are very about to end the never ending story indeed :-) CI has been a bit flaky lately, lots of new and old systems supported at beats now. We are actively working to improve that, in the meantime we can proceed if a failing test has nothing to do with the changes introduced. I restarted the failing job and will re-check in a few. offtopic: if you feel contributing is a pain, we are very willing to hear what we can improve from you. Feel encouraged to tell us if you like. cc @andresrc |
…ps://github.com/marian-craciunescu/beats into issue-elastic#7187/fix-vmsphere-metricbeat-host
My problem was actually with the build system you are using.It's overly compliated and sincerely you don't need those auto generated parts (fields.go) .That could be added later , based on a branch trigger. |
jenkins test this |
@marian-craciunescu changes approved, and thanks a lot for the feedback. can you solve that CHANGELOG.next conflict with master? |
Done |
* added host.id and host.hostname fields for vsphere (cherry picked from commit 4288a56)
#7187