File tree 8 files changed +89
-11
lines changed
8 files changed +89
-11
lines changed Original file line number Diff line number Diff line change 1
1
NAME = pblittle/docker-logstash
2
- VERSION = 0.12.1
2
+ VERSION = 0.13.0
3
3
4
4
# Set the LOGSTASH_CONFIG_URL env var to your logstash.conf file.
5
5
# We will use our basic config if the value is empty.
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function main() {
35
35
36
36
# Fire up logstash!
37
37
#
38
- logstash_start_agent
38
+ logstash_start_agent " $@ "
39
39
}
40
40
41
41
main " $@ "
Original file line number Diff line number Diff line change @@ -72,13 +72,41 @@ function logstash_create_log_dir() {
72
72
}
73
73
74
74
function logstash_start_agent() {
75
+ local binary=" $LOGSTASH_BINARY "
75
76
local config_dir=" $LOGSTASH_CONFIG_DIR "
76
77
local log_file=" $LOGSTASH_LOG_FILE "
77
78
78
- exec " $LOGSTASH_BINARY " \
79
- agent \
80
- --config " $config_dir " \
81
- --log " $log_file " \
82
- -- \
83
- web
79
+ case " $1 " in
80
+ # run just the agent
81
+ ' agent' )
82
+ exec " $binary " \
83
+ agent \
84
+ --config " $config_dir " \
85
+ --log " $log_file " \
86
+ --
87
+ ;;
88
+ # test the logstash configuration
89
+ ' configtest' )
90
+ exec " $binary " \
91
+ agent \
92
+ --config " $config_dir " \
93
+ --log " $log_file " \
94
+ --configtest \
95
+ --
96
+ ;;
97
+ # run just the web
98
+ ' web' )
99
+ exec " $binary " \
100
+ web
101
+ ;;
102
+ # run agent+web (default operation)
103
+ * )
104
+ exec " $binary " \
105
+ agent \
106
+ --config " $config_dir " \
107
+ --log " $log_file " \
108
+ -- \
109
+ web
110
+ ;;
111
+ esac
84
112
}
Original file line number Diff line number Diff line change 1
1
NAME = pblittle/docker-logstash-test
2
- VERSION = 0.12.1
2
+ VERSION = 0.13.0
3
3
4
4
BUILD_SRC = ${CURDIR}/../base
5
5
@@ -29,3 +29,12 @@ test-elasticsearch-linked: build
29
29
fig rm && \
30
30
fig build && \
31
31
fig up
32
+
33
+ .PHONY : test-logstash-configtest
34
+ test-logstash-configtest : build
35
+
36
+ cd ${CURDIR}/logstash-configtest && \
37
+ fig stop && \
38
+ fig rm && \
39
+ fig build && \
40
+ fig up
Original file line number Diff line number Diff line change 1
- FROM pblittle/docker-logstash:0.12.1
1
+ FROM pblittle/docker-logstash:0.13.0
2
2
MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)
3
3
4
4
# Download packages required to run the test suite
Original file line number Diff line number Diff line change 1
- FROM pblittle/docker-logstash:0.12.1
1
+ FROM pblittle/docker-logstash:0.13.0
2
2
MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)
3
3
4
4
# Download packages required to run the test suite
Original file line number Diff line number Diff line change
1
+ FROM pblittle/docker-logstash:0.13.0
2
+ MAINTAINER P. Barrett Little <barrett@barrettlittle.com> (@pblittle)
3
+
4
+ # Download packages required to run the test suite
5
+ #
6
+ RUN apt-get update \
7
+ && apt-get install -yq \
8
+ apt-utils \
9
+ git \
10
+ net-tools \
11
+ telnet \
12
+ --no-install-recommends \
13
+ && rm -rf /var/cache/apt/* \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Download and install BATS test framework
17
+ #
18
+ RUN git clone https://github.com/sstephenson/bats.git /tmp/bats \
19
+ && /tmp/bats/install.sh /usr/local \
20
+ && rm -rf /tmp/bats
21
+
22
+ # $TERM needs to be set for bats
23
+ #
24
+ ENV TERM xterm-256color
25
+
26
+ WORKDIR /app
27
+ ADD test.bats /app/test.bats
28
+
29
+ CMD []
Original file line number Diff line number Diff line change
1
+ ---
2
+ elasticsearch :
3
+ image : dockerfile/elasticsearch
4
+ ports :
5
+ - ' 9200:9200'
6
+ - ' 9300:9300'
7
+ command : ' /elasticsearch/bin/elasticsearch -Des.http.cors.enabled=true'
8
+
9
+ logstash :
10
+ build : .
11
+ environment :
12
+ LOGSTASH_TRACE : true
You can’t perform that action at this time.
0 commit comments