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

Filebeat inputs - Support subfields on fields section (relative to ecs support) #240

Open
disaster37 opened this issue Jan 17, 2020 · 3 comments

Comments

@disaster37
Copy link
Contributor

Fix code to support ability to set sub fields on fields section. Actually, we can only set key and value.

Actually supported:

fields:
  type: apache_access

Actually not supported:

fields:
  event:
    dataset: apache_access

Maybe we can replace this:

<%- if @fields.length > 0 -%>
  fields:
    <%- @fields.each_pair do |k, v| -%>
    <%= k %>: <%= v %>
    <%- end -%>
  <%- end -%>

by:

<%- if @fields.length > 0 -%>
fields:
  <%- %><%= @fields.to_yaml.lines.drop(1).join.gsub(/^/, '  ') -%>
<%- end -%>
@pcfens
Copy link
Owner

pcfens commented Jan 17, 2020

I think a lot of changes like this are going to be supported when we merge #236.

@jbehrends
Copy link
Contributor

There is a workaround to this issue which still exists today:

fields => { 'my.nested.field.key' => 'value' }

@disaster37
Copy link
Contributor Author

The pull request #236 seems not permit to use pure_array when use create_ressource(filebeat::input, $filebeat_apache), because of it not use field on class filebeat::input::inputs, but field on filebeat::inputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants