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

[Auditbeat] Unable to get packages related data #16661

Closed
samoz83 opened this issue Feb 27, 2020 · 4 comments · Fixed by #17188
Closed

[Auditbeat] Unable to get packages related data #16661

samoz83 opened this issue Feb 27, 2020 · 4 comments · Fixed by #17188

Comments

@samoz83
Copy link

samoz83 commented Feb 27, 2020

I keep getting the below from the System module of Auditbeat in relation to packages information.

failed to get packages: error getting DEB packages: error converting 25G to int: strconv.ParseUint: parsing "25G": invalid syntax

For confirmed bugs, please report:

@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@rvillablanca
Copy link
Contributor

Looking in two files of some friends /var/lib/dpkg/status (I don't have it because I use Arch), none of them have the line Installed-Size: with G or any other non-numeric character so, this could be even an invalid file I think

@samoz83
Copy link
Author

samoz83 commented Mar 2, 2020

Ah I wasn't sure what file it was looking at, it does seem to be a random package that someone has put into our apt repos. I'll pull the package and fix it on my side. Thanks

@adriansr
Copy link
Contributor

Reopened as this is an issue users are experiencing from time to time.

adriansr added a commit to adriansr/beats that referenced this issue Mar 23, 2020
Deb packages report their installed size in a field, Installed-Size,
which is an integer interpreted as KiB. Some unoficial packages are
adding a unit at the end of this field:

Installed-Size: 65M

Dpkg/Apt ignore everything after the number. Auditbeat is currently
failing to parse the list of packages once this mistake is reached.

This updates the dataset to:
- Do not fail when installed size can't be parsed.
- Understand prefixes k/K, m/M and G/b.

Fixes elastic#16661
adriansr added a commit that referenced this issue Mar 23, 2020
* Harden system/package parsing of deb size

Deb packages report their installed size in a field, Installed-Size,
which is an integer interpreted as KiB. Some unofficial packages are
adding a unit at the end of this field:

Installed-Size: 65M

System tools dpkg/apt ignore everything after the number.
Auditbeat is currently failing to parse the list of installed packages
once this mistake is reached.

This updates the dataset to:
- Do not fail when installed size can't be parsed.
- Understand prefixes k/K, m/M and G/b.

Fixes #16661
adriansr added a commit to adriansr/beats that referenced this issue Mar 23, 2020
* Harden system/package parsing of deb size

Deb packages report their installed size in a field, Installed-Size,
which is an integer interpreted as KiB. Some unofficial packages are
adding a unit at the end of this field:

Installed-Size: 65M

System tools dpkg/apt ignore everything after the number.
Auditbeat is currently failing to parse the list of installed packages
once this mistake is reached.

This updates the dataset to:
- Do not fail when installed size can't be parsed.
- Understand prefixes k/K, m/M and G/b.

Fixes elastic#16661

(cherry picked from commit b131405)
adriansr added a commit that referenced this issue Mar 24, 2020
* Harden system/package parsing of deb size

Deb packages report their installed size in a field, Installed-Size,
which is an integer interpreted as KiB. Some unofficial packages are
adding a unit at the end of this field:

Installed-Size: 65M

System tools dpkg/apt ignore everything after the number.
Auditbeat is currently failing to parse the list of installed packages
once this mistake is reached.

This updates the dataset to:
- Do not fail when installed size can't be parsed.
- Understand prefixes k/K, m/M and G/b.

Fixes #16661

(cherry picked from commit b131405)
adriansr added a commit to adriansr/beats that referenced this issue Mar 24, 2020
* Harden system/package parsing of deb size

Deb packages report their installed size in a field, Installed-Size,
which is an integer interpreted as KiB. Some unofficial packages are
adding a unit at the end of this field:

Installed-Size: 65M

System tools dpkg/apt ignore everything after the number.
Auditbeat is currently failing to parse the list of installed packages
once this mistake is reached.

This updates the dataset to:
- Do not fail when installed size can't be parsed.
- Understand prefixes k/K, m/M and G/b.

Fixes elastic#16661

(cherry picked from commit b131405)
adriansr added a commit that referenced this issue Mar 24, 2020
…17230)

Deb packages report their installed size in a field, Installed-Size,
which is an integer interpreted as KiB. Some unofficial packages are
adding a unit at the end of this field:

Installed-Size: 65M

System tools dpkg/apt ignore everything after the number.
Auditbeat is currently failing to parse the list of installed packages
once this mistake is reached.

This updates the dataset to:
- Do not fail when installed size can't be parsed.
- Understand prefixes k/K, m/M and G/b.

Fixes #16661

(cherry picked from commit b131405)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants