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] Cherry-pick #11634 to 6.7: Package: Enable suse #11670

Merged
merged 1 commit into from
Apr 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ https://github.com/elastic/beats/compare/v6.7.0...6.x[Check the HEAD diff]

*Auditbeat*

- Add support to the system package dataset for the SUSE OS family. {pull}11634[11634]

*Filebeat*

*Heartbeat*
Expand Down
5 changes: 3 additions & 2 deletions x-pack/auditbeat/module/system/package/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const (
namespace = "system.audit.package"

redhat = "redhat"
suse = "suse"
debian = "debian"
darwin = "darwin"

Expand Down Expand Up @@ -207,7 +208,7 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
}
ms.osFamily = osInfo.Family
switch osInfo.Family {
case redhat:
case redhat, suse:
// ok
case debian:
if _, err := os.Stat(dpkgStatusFile); err != nil {
Expand Down Expand Up @@ -471,7 +472,7 @@ func (ms *MetricSet) savePackagesToDisk(packages []*Package) error {

func getPackages(osFamily string) (packages []*Package, err error) {
switch osFamily {
case redhat:
case redhat, suse:
packages, err = listRPMPackages()
if err != nil {
err = errors.Wrap(err, "error getting RPM packages")
Expand Down