-
Notifications
You must be signed in to change notification settings - Fork 431
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
Add type
to package definition
#587
Conversation
Stores information about the type of the installed package, e.g. rpm, dpkg, etc. related to elastic#515
Should we even consider the .exe and .app software in this discussion? I agree we want to be able to track those & report on them. But software that's not installed via a package should probably not dictate how we design the I'd like us to continue the discussion on file type vs package manager a bit. My understanding is that in most cases, package information is collected by querying the local package DB or API. So as much as I'd like to have the ability to see details about tgz packages, I'm not sure we can collect that (short of scanning the disk)? Also, I'd like it if we established more firmly what information is expected in the field. I think depending on the package type, people will vary between putting the file format vs the package manager name. So the more extensive our list of expected values, the less variance there will be. Here's the packages I have in mind. Please contribute additional packages for other languages or platforms, and comment on what you think would make most sense in
What are the Java, .Net and PHP packages? cc @cwurm |
@webmat I agree that we need to be more clear about which information we expect in this field. My main concern I tried to raise is that with the suggested approach we are mixing file type and origin or installation type, depending on what we can collect. From the very beginning of this discussions:
Seeing something like @cwurm I have to admit I got a bit lost in this discussion, and would highly appreciate your input on @webmat 's and my suggestions. |
@cwurm could you please give this a review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looping back on this, I'd be in favour of progress over perfection. I think we can orient the field description to be around the file type, rather than package manager.
So: gem not rubygems, egg not pip, and rpm not yum.
If "homebrew" or "brew" shows up in there, I'm not terribly worried. It's an in-between in the sense that it's straightforward to gather that programmatically (that's the "packages" Auditbeat currently captures on MacOS), yet there isn't an actual "package" file per se, as the underlying distribution mechanism is Git.
I don't think we need to be explicit in the field descriptions around the subtleties we've discussed here. If confusion arises we can clarify later. Also if we find a need to specifically support the package manager or method of distribution, we can tackle that as another PR, with another field.
Final changes I see:
- Let's add a changelog for this field addition
- Adjust the description a bit, see other comment
schemas/package.yml
Outdated
Type of package. | ||
|
||
When installed from a package manager, this would contain the package manager name, e.g. RPM, DPKG, Homebrew, NPM. | ||
example: RPM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to guide in the right direction without getting into all of the subtleties discussed above, I think the following would work well enough:
description: >
Type of package.
This should contain the package file type, rather than the package
manager name. Examples: rpm, dpkg, brew, npm, gem.
example: rpm
Note also that I switched all examples to lowercase. This aligns better with the rest of ECS.
Shouldn't we name the field |
IMO package type should reflect the file type of the package rather than the install manager, so from my perspective naming is fine now. I added the latest suggestions, from my perspective this PR is final. |
Just to make sure I understand correctly how APM agents should fill |
@SergeyKleyman It's meant to be the file extension (without leading dot), not the binary file format. So in the examples you give, "nupkg" and "jar" should be the values. |
@simitt Could you update the example and lowercase the |
@@ -81,5 +81,5 @@ | |||
Type of package. | |||
|
|||
This should contain the package file type, rather than the package manager name. | |||
Examples: rpm, dpkg, brew, npm, gem. | |||
example: RPM | |||
Examples: rpm, dpkg, brew, npm, gem, nupkg, jar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ the added examples, thx!
Stores information about the type of the installed package, e.g. rpm,
dpkg, etc.
related to #515
Follow up from #532 to focus on adding package type information.
Summary of discussions so far:
#532 (review)
#532 (comment)
#532 (comment)
#532 (comment)
#532 (comment)