-
Notifications
You must be signed in to change notification settings - Fork 39
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
Making the template work for kibana #25
Comments
I originally had used As httpbeat will be a core feature in Beats 6.0 and there was a a similar discussion in elastic/beats#5258 on using also |
@carofe82 @christiangalsterer The initial reason I changed from nested to object is because nested fields does not with the new index sorting feature in elaticsearch. But also it was the only place in all our beats that we used nested fields and in general we stay away from it as it is hard to do reasonable queries. @christiangalsterer Would be great to know what the issue was :-) |
@ruflin Thanks for your feedback. |
I just re-read the documentation of nested and object data type, I think I recall now why I had opted for nested. AFAIR the main reason was, that with object the relationship of arrays is lost. In many cases this might be not a problem but maybe in some is. @ruflin: You mentioned that nested is not used in any other beat, which gives some indication that this seems to be not an issue to loose the relationship in arrays. Do you know by chance if there are some open/closed issues where if was requested to support |
Just tried to switch to
If I don't define any type it works, but then the index files, etc. are not correctly generated as then I'm currently using Beats 5.6.2. |
I think so far we never had a request to support nested fields (I could be wrong). For the headers and the relations I'm not sure I can follow. I think headers are key/value pairs? Can you provide an example on what you mean loosing relations? For the above failure: We did quite a few changes for 6.0 to enhance the fields.yml and port it to Golang. I think what you need to use with 5.6 is |
@ruflin, an example of loosing relations when using object instead of nested type
If that's an object, in the index it will become:
So you won't be able to get accurate results if you query for documents that contains, for example, elements inside If that's an nested type. The index would generate three documents:
nested doc 1 would have
nested doc 2 would have
@christiangalsterer, I know you will loose the relationship but I think that requirement may not be as common as wanting to have objects to make it work out of the box with kibana. If nested type were a requirement for the user, he has the option of editing the |
@carofe82 Perhaps I was a bit too focused on the header case as this is what I changed in the http module in metricbeat. For http headers I think there should not be any nested object but I would have to check the RFC to verify that. Back to your example above: In case of your example you are right. So far in beats we always found a way to "circumvent" the issue and model the data in query friendlier way. |
Thanks for the feedbacks. I'm still struggling with changing back to I think it should work but I get the error message as stated in a previous comment. If I leave out the type information in the @ruflin / @carofe82 : If you have an idea how to fix this, this would be highly appreciated. |
@christiangalsterer, - name: headers
type: dict
dict-type: keyword ... for the body in the request: - name: body
type: text
description: The body of the HTTP request. ... and for the body in the response (no type at all): - name: body
description: The body of the HTTP response. but in 6.0.0-rc1(https://github.com/elastic/beats/blob/v6.0.0-rc1/packetbeat/protos/http/_meta/fields.yml) they have in the headers for the requests: - name: headers
type: object
object_type: keyword ... and the same as in 5.5.2 for the body request and body response. Not sure if this helps. |
We have quite some changes in 6.0 to cleanup the templates. So |
Thanks for the update. As there is no support for |
I tried to use - name: headers
type: dict
dict-type: keyword as in https://github.com/elastic/beats/blob/5.6/packetbeat/_meta/fields.yml and in the example above. Now headers are not included anymore in the generated template files but also no error message. |
For your first comment: Historically our fields.yml file just started with very few fields and was never thought as a 1-1 mapping of elasticsearch fields docs. We only had it for internal use. But since then it grew quite a bit and it supports now a large set of the mappings in ES and because of some potential confusion we also started to clean it up for 6.0. So 5.x is still a bit messy. Also there isn't any real documentation for our I assume the reason we didn't put the |
Thanks for the clarification. Unfortunately there is no "else" which would add |
Thanks for this awesome plugin, I use it for monitoring spring /health and /metrics data in kibana (v5.3.2), but it is challenge to setup initially - I could see all data in "Discover" view, but switching to "Visualise" view and filtering data it would not display anything from variables > 2 levels deep (i.e. 'response.statusCode' is ok and response.jsonbody.heap would display "No results found", althought I've seen data in Discover) Big thanks to @carofe82, after replacing 'nested' with 'object' in index template I can see filtered data correctly. |
we have a rest endpoint which has hundreds of fields as nested json. I need to use this data in kibana. met with engineers a elasticonf they recommended httpbeat but looks like it's not ready for our use case above. we also have same live data in s3 bucket so we'll just point ELK to our s3 bucket. |
@RedCloudDC , |
Just released 4.1.0 which contains the necessary fixes. |
Thank you! @christangalsterer |
I’m currently pulling metrics with httpbeat and sending them to Elasticsearch and visualizing it with kibana. I had issues getting data with kibana to display in charts because the httpbeat is using
nested
for the actual data type. Kibana doesn’t work great with nested objects (elastic/kibana#1084). I solved the problem by changing the template to useobject
type instead.Taking into account that probably most people will use httpbeat with kibana, wouldn’t it give a better experience out of the box if by default the template used
object
as the type for the data?If you like the idea I can send you a PR.
Thank you for httpbeat! Great job!
The text was updated successfully, but these errors were encountered: