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

[Heartbeat] Add fields to example heartbeat autodiscover usage. #9901

Closed
wants to merge 2 commits into from

Conversation

andrewvc
Copy link
Contributor

@andrewvc andrewvc commented Jan 4, 2019

It's useful when using autodiscovered endpoints to have container metadata. It's not obvious how to do this, so we document some of the fields one might use here in the docs.

This addresses a comment brought up on discuss in https://discuss.elastic.co/t/autodiscover-and-metadata/162980/1

It's useful when using autodiscovered endpoints to have container metadata. It's not obvious how to do this, so we document some of the fields one might use here in the docs.

This addresses a comment brought up on discuss in https://discuss.elastic.co/t/autodiscover-and-metadata/162980/1
@andrewvc andrewvc added docs needs_backport PR is waiting to be backported to other branches. Heartbeat labels Jan 4, 2019
@andrewvc andrewvc requested a review from a team as a code owner January 4, 2019 20:16
@@ -14,6 +14,10 @@ heartbeat.autodiscover:
hosts: ["${data.host}:${data.port}"]
schedule: "@every 1s"
timeout: 1s
fields:
Copy link
Contributor

Choose a reason for hiding this comment

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

The field names use used as example are not ECS which I would not recommend.

When using autodiscovery, I would expect some of the field below to already be added. @exekias can you comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ruflin it's hard to add this stuff automatically AFAICT the way the autodiscover code is written. Would love to hear @exekias ' take on it.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry for the late answer folks, this got lost in my inbox...

uhm, from what I know autodiscover should be enriching events coming from it with these fields, but that needs to be implemented by Hearbeat:

Autodiscover will pass you a meta object (common.MapStrPointer) with all the metadata, the adapter should inject this data to all the resulting events of the runner. Look at how Metricbeat is doing it, for instance:

libbeat will take these fields and put them in the field. Happy to help on this if needed!

@andrewvc
Copy link
Contributor Author

andrewvc commented Jan 8, 2019

@ruflin I've updated the docs to use ECS fields.

I didn't add the labels because we don't have a great answer there. Interpolating them won't create an object, just a weird string.

I think this is a temporary solution, I agree we need a better one in the future.

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

jenkins, test this

@andrewvc
Copy link
Contributor Author

Closing in favor of #10258

@andrewvc andrewvc closed this Jan 22, 2019
@andrewvc andrewvc removed the needs_backport PR is waiting to be backported to other branches. label Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants