Skip to content

Commit

Permalink
Change default paths to avoid another subdirectory (#258)
Browse files Browse the repository at this point in the history
This brings the sidecar in line with the graylog-server package which
stores data in "/var/{log,lib}/graylog-server".
  • Loading branch information
bernd authored and Marius Sturm committed Jul 23, 2018
1 parent 604b411 commit 3ba4a43
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (ctx *Ctx) LoadConfig(path *string) error {
if runtime.GOOS == "windows" {
cachePath = filepath.Join(os.Getenv("SystemDrive")+"\\", "Program Files", "graylog", "sidecar", "cache")
} else {
cachePath = filepath.Join("/var", "cache", "graylog", "sidecar")
cachePath = filepath.Join("/var", "cache", "graylog-sidecar")
}
ctx.UserConfig.CachePath = cachePath
log.Errorf("No cache directory was configured. Using default: %s", cachePath)
Expand Down
4 changes: 2 additions & 2 deletions dist/recipe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def install
bin.install '../../collectors/filebeat/linux/x86_64/filebeat'
etc('graylog/sidecar').install '../../../sidecar-example.yml', 'sidecar.yml'
etc('graylog/sidecar/generated').mkdir
var('log/graylog/sidecar').mkdir
var('run/graylog/sidecar').mkdir
var('log/graylog-sidecar').mkdir
var('run/graylog-sidecar').mkdir
var('spool/graylog-sidecar/nxlog').mkdir
end
end
4 changes: 2 additions & 2 deletions dist/recipe32.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def install
bin.install '../../collectors/filebeat/linux/x86/filebeat'
etc('graylog/sidecar').install '../../../sidecar-example.yml', 'sidecar.yml'
etc('graylog/sidecar/generated').mkdir
var('log/graylog/sidecar').mkdir
var('run/graylog/sidecar').mkdir
var('log/graylog-sidecar').mkdir
var('run/graylog-sidecar').mkdir
var('spool/graylog-sidecar/nxlog').mkdir
end
end
8 changes: 4 additions & 4 deletions sidecar-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ send_status: true
list_log_files:

# Directory where the sidecar stores internal data.
# Default: "/var/cache/graylog/sidecar"
cache_path: "/var/cache/graylog/sidecar"
# Default: "/var/cache/graylog-sidecar"
cache_path: "/var/cache/graylog-sidecar"

# Directory where the sidecar stores logs for collectors and the sidecar itself.
# Default: "/var/log/graylog/sidecar"
log_path: "/var/log/graylog/sidecar"
# Default: "/var/log/graylog-sidecar"
log_path: "/var/log/graylog-sidecar"

# TODO: Document or remove depending on the outcome of https://github.com/Graylog2/collector-sidecar/issues/251
log_rotation_time: 86400
Expand Down

0 comments on commit 3ba4a43

Please sign in to comment.