Skip to content

Commit ec3cd6e

Browse files
GDR!GDR!
authored andcommitted
Run setup hook for netflow plugin
1 parent 3815364 commit ec3cd6e

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ RUN CONF_DIR=/etc/elasticsearch gosu elasticsearch bin/elasticsearch-plugin \
99
WORKDIR ${LOGSTASH_HOME}
1010
RUN gosu logstash bin/logstash-plugin install logstash-codec-netflow
1111

12-
ADD logstash-30-netflow.conf /etc/logstash/conf.d/30-netflow.conf
12+
#ADD logstash-30-netflow.conf /etc/logstash/conf.d/30-netflow.conf
1313
ADD elk-post-hooks.sh /usr/local/bin/elk-post-hooks.sh

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ elk:
55
- "9200:9200"
66
- "5044:5044"
77
- "9995:9995/udp"
8+
environment:
9+
- KIBANA_CONNECT_RETRY=120

elk-post-hooks.sh

100644100755
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@ echo "Running first-run setup hooks"
99
touch /setup_complete
1010

1111
cd /opt/logstash
12-
bin/logstash --modules netflow --setup
12+
service logstash stop
13+
14+
re_is_numeric='^[0-9]+$'
15+
if ! [[ $NETFLOW_PORT =~ $re_is_numeric ]] ; then
16+
NETFLOW_PORT=9995
17+
fi
18+
bin/logstash --modules netflow --setup -M netflow.var.input.udp.port=$NETFLOW_PORT
19+
1320
echo "Netflow module setup complete"

0 commit comments

Comments
 (0)