Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove manual logstash process management
Logstash process is managed by system service, which makes it dangerous to call kill -9 on it manually. Instead of manual intervention, we let the system tools take care of the process management. Manually killing the logstash process was required since SystemV init scripts cannot handle processes that do not terminate voluntarily. By using upstart to manage the logstash process, we bypass this problem completely, since any process that does not terminate voluntarily withing five seconds is sent SIGKILL that forcefully terminates it.
- Loading branch information
Tadej Borovšak
authored and
Tadej Borovšak
committed
May 16, 2017
1 parent
3a0fe8a
commit 0546ee0
Showing
2 changed files
with
43 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
description "Logstash service" | ||
|
||
start on (net-device-up | ||
and local-filesystems | ||
and runlevel [2345]) | ||
stop on runlevel [016] | ||
|
||
respawn | ||
respawn limit 10 30 | ||
|
||
limit nofile 32000 32000 | ||
|
||
setuid ubuntu | ||
setgid ubuntu | ||
|
||
env heap_size="1g" | ||
|
||
script | ||
|
||
HOME="/opt/logstash" | ||
LS_JAVA_OPTS="-Djava.io.tmpdir=/opt/logstash" | ||
LS_HEAP_SIZE="$heap_size" | ||
export HOME LS_HEAP_SIZE LS_JAVA_OPTS | ||
exec /opt/logstash/bin/logstash agent \ | ||
-f /opt/DICE-Monitoring/src/conf/logstash.conf \ | ||
-l /opt/DICE-Monitoring/src/logs/logstash.log | ||
|
||
end script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters