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 Apache module cannot assume browser patch version to be a number #3836

Closed
cwurm opened this issue Mar 29, 2017 · 5 comments
Closed
Assignees
Labels

Comments

@cwurm
Copy link
Contributor

cwurm commented Mar 29, 2017

Version: Filebeat 5.3.0

In https://github.com/elastic/beats/blob/master/filebeat/module/apache2/access/_meta/fields.yml, we assume the browser patch version is a number:

        - name: patch
          type: long
          description: >
            The patch version of the user agent.

That is not a safe assumption, e.g. Firefox beta versions had a patch versions such as "b12". A full user agent string then looks like this:

Mozilla/5.0 (X11; Linux x86_64; rv:2.0b12) Gecko/20110222 Firefox/4.0b12

There are a bunch of them, see for example http://www.useragentstring.com/pages/useragentstring.php?name=Firefox

I'm not 100% sure if the other components of the user agent version string - major, minor and build - are never not numbers. However, I've just ingested 300K log lines successfully and no error came up.

@cwurm cwurm added bug Filebeat Filebeat labels Mar 29, 2017
@cwurm
Copy link
Contributor Author

cwurm commented Mar 29, 2017

This then also affects the nginx module, specifically https://github.com/elastic/beats/blob/master/filebeat/module/nginx/access/_meta/fields.yml

@ruflin
Copy link
Contributor

ruflin commented Mar 30, 2017

I would suggest we switch the type here to a keyword. It would be great to have support for "version strings" in Lucene directly so someone could search for > 1.x but as far as I know this is not possible.

@cwurm
Copy link
Contributor Author

cwurm commented Mar 30, 2017

I agree, keyword should do the trick.

@ruflin
Copy link
Contributor

ruflin commented Mar 31, 2017

@tsg Could you see any potential issues with switching this to keyword?

@tsg
Copy link
Contributor

tsg commented May 24, 2017

No, i think we can change that.

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

No branches or pull requests

4 participants