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

Move Metricbeat modules.d dir to /etc/metricbeat #8105

Merged
merged 2 commits into from
Aug 29, 2018
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
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ https://github.com/elastic/beats/compare/v6.4.0...master[Check the HEAD diff]
- Recover metrics for old apache versions removed by mistake on #6450. {pull}7871[7871]
- Add missing namespace field in http server metricset {pull}7890[7890]
- Fixed the RPM by designating the modules.d config files as configuration data in the RPM spec. {issue}8075[8075]
- Fixed the location of the modules.d dir in Deb and RPM packages. {issue}8104[8104]
- Add docker diskio stats on Windows. {issue}6815[6815] {pull}8126[8126]

*Packetbeat*
Expand Down
11 changes: 4 additions & 7 deletions metricbeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ func GoTestIntegration(ctx context.Context) error {
// not supported.
func customizePackaging() {
var (
archiveModulesDir = "modules.d"
linuxPkgModulesDir = "/usr/share/{{.BeatName}}/modules.d"
darwinDMGModulesDir = "/Library/Application Support/{{.BeatVendor}}/{{.BeatName}}/modules.d"
Copy link
Contributor

@ruflin ruflin Aug 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it on purpose that now the Mac files are placed under a different location?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new MacOS installer puts our typical path.home files into /Library/Application Support because this is conventional (it's like /usr/share).

The config and logs go to /etc and /var just like Linux. So the modules.d was wrong for MacOS too.

archiveModulesDir = "modules.d"
unixModulesDir = "/etc/{{.BeatName}}/modules.d"

modulesDir = mage.PackageFile{
Mode: 0644,
Expand Down Expand Up @@ -176,10 +175,8 @@ func customizePackaging() {
switch pkgType {
case mage.TarGz, mage.Zip:
args.Spec.Files[archiveModulesDir] = modulesDir
case mage.Deb, mage.RPM:
args.Spec.Files[linuxPkgModulesDir] = modulesDir
case mage.DMG:
args.Spec.Files[darwinDMGModulesDir] = modulesDir
case mage.Deb, mage.RPM, mage.DMG:
args.Spec.Files[unixModulesDir] = modulesDir
default:
panic(errors.Errorf("unhandled package type: %v", pkgType))
}
Expand Down