Skip to content

Commit 207b82b

Browse files
authored
Merge pull request #195 from engineyard/fbz-10528-change-elasticsearch-log-dump-storage-locations
[FBZ-10528] Updated paths for elasticsearch Heapdumps and logs
2 parents a5cacca + cd506a9 commit 207b82b

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

cookbooks/ey-elasticsearch/recipes/install.rb

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
mode "755"
1515
end
1616

17+
directory "/mnt/log/elasticsearch" do
18+
owner "elasticsearch"
19+
group "elasticsearch"
20+
mode "755"
21+
end
22+
1723
directory "/data/elasticsearch-#{ES['version']}/data" do
1824
owner "elasticsearch"
1925
group "elasticsearch"

cookbooks/ey-elasticsearch/templates/default/elasticsearch.yml.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
path:
2-
logs: /var/log/elasticsearch
2+
logs: /mnt/log/elasticsearch
33
data: /data/elasticsearch
44

55

custom-cookbooks/elasticsearch/cookbooks/custom-elasticsearch/templates/default/jvm.options.6.x.erb

+4-4
Original file line numberDiff line numberDiff line change
@@ -96,24 +96,24 @@
9696

9797
# specify an alternative path for heap dumps; ensure the directory exists and
9898
# has sufficient space
99-
-XX:HeapDumpPath=/var/lib/elasticsearch
99+
-XX:HeapDumpPath=/data/elasticsearch
100100

101101
# specify an alternative path for JVM fatal error logs
102-
-XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log
102+
-XX:ErrorFile=/mnt/log/elasticsearch/hs_err_pid%p.log
103103

104104
## JDK 8 GC logging
105105

106106
8:-XX:+PrintGCDetails
107107
8:-XX:+PrintGCDateStamps
108108
8:-XX:+PrintTenuringDistribution
109109
8:-XX:+PrintGCApplicationStoppedTime
110-
8:-Xloggc:/var/log/elasticsearch/gc.log
110+
8:-Xloggc:/mnt/log/elasticsearch/gc.log
111111
8:-XX:+UseGCLogFileRotation
112112
8:-XX:NumberOfGCLogFiles=32
113113
8:-XX:GCLogFileSize=64m
114114

115115
# JDK 9+ GC logging
116-
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
116+
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/mnt/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
117117
# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise
118118
# time/date parsing will break in an incompatible way for some date patterns and locals
119119
9-:-Djava.locale.providers=COMPAT

custom-cookbooks/elasticsearch/cookbooks/custom-elasticsearch/templates/default/jvm.options.7.x.erb

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,23 @@
9999

100100
# specify an alternative path for heap dumps; ensure the directory exists and
101101
# has sufficient space
102-
-XX:HeapDumpPath=/var/lib/elasticsearch
102+
-XX:HeapDumpPath=/data/elasticsearch
103103

104104
# specify an alternative path for JVM fatal error logs
105-
-XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log
105+
-XX:ErrorFile=/mnt/log/elasticsearch/hs_err_pid%p.log
106106

107107
## JDK 8 GC logging
108108
8:-XX:+PrintGCDetails
109109
8:-XX:+PrintGCDateStamps
110110
8:-XX:+PrintTenuringDistribution
111111
8:-XX:+PrintGCApplicationStoppedTime
112-
8:-Xloggc:/var/log/elasticsearch/gc.log
112+
8:-Xloggc:/mnt/log/elasticsearch/gc.log
113113
8:-XX:+UseGCLogFileRotation
114114
8:-XX:NumberOfGCLogFiles=32
115115
8:-XX:GCLogFileSize=64m
116116

117117
# JDK 9+ GC logging
118-
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
118+
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/mnt/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
119119
# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise
120120
# time/date parsing will break in an incompatible way for some date patterns and locals
121121
9-:-Djava.locale.providers=COMPAT

custom-cookbooks/elasticsearch/cookbooks/custom-elasticsearch/templates/default/jvm.options.8.x.erb

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,23 @@
9999

100100
# specify an alternative path for heap dumps; ensure the directory exists and
101101
# has sufficient space
102-
-XX:HeapDumpPath=/var/lib/elasticsearch
102+
-XX:HeapDumpPath=/data/elasticsearch
103103

104104
# specify an alternative path for JVM fatal error logs
105-
-XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log
105+
-XX:ErrorFile=/mnt/log/elasticsearch/hs_err_pid%p.log
106106

107107
## JDK 8 GC logging
108108
8:-XX:+PrintGCDetails
109109
8:-XX:+PrintGCDateStamps
110110
8:-XX:+PrintTenuringDistribution
111111
8:-XX:+PrintGCApplicationStoppedTime
112-
8:-Xloggc:/var/log/elasticsearch/gc.log
112+
8:-Xloggc:/mnt/log/elasticsearch/gc.log
113113
8:-XX:+UseGCLogFileRotation
114114
8:-XX:NumberOfGCLogFiles=32
115115
8:-XX:GCLogFileSize=64m
116116

117117
# JDK 9+ GC logging
118-
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
118+
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/mnt/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
119119
# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise
120120
# time/date parsing will break in an incompatible way for some date patterns and locals
121121
9-:-Djava.locale.providers=COMPAT

0 commit comments

Comments
 (0)