Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request bitsensor/back-end/elastalert!37
  • Loading branch information
martijnrondeel committed May 14, 2019
2 parents d7253d5 + c689475 commit 59bc361
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM alpine:latest as py-ea
ARG ELASTALERT_VERSION=v0.1.39
ARG ELASTALERT_VERSION=v0.2.0b2
ENV ELASTALERT_VERSION=${ELASTALERT_VERSION}
# URL from which to download Elastalert.
ARG ELASTALERT_URL=https://github.com/Yelp/elastalert/archive/$ELASTALERT_VERSION.zip
Expand Down Expand Up @@ -45,5 +45,12 @@ COPY config/config.json config/config.json
COPY rule_templates/ /opt/elastalert/rule_templates
COPY elastalert_modules/ /opt/elastalert/elastalert_modules

# Add default rules directory
# Set permission as unpriviledged user (1000:1000), compatible with Kubernetes
RUN mkdir -p /opt/elastalert/rules/ /opt/elastalert/server_data/tests/ \
&& chown -R node:node /opt

USER node

EXPOSE 3030
ENTRYPOINT ["npm", "start"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v ?= v0.1.39
v ?= v0.2.0b2

all: build

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitsensor/elastalert",
"version": "2.0.1",
"version": "3.0.0-beta.0",
"description": "A server that runs ElastAlert and exposes REST API's for manipulating rules and alerts.",
"license": "MIT",
"main": "index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/process/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ export default class ProcessController {
});

// Redirect stdin/stderr to logger
if (indexCreate.stdout.toString() !== '') {
if (indexCreate.stdout && indexCreate.stdout.toString() !== '') {
logger.info(indexCreate.stdout.toString());
}
if (indexCreate.stderr.toString() !== '') {
if (indexCreate.stderr && indexCreate.stderr.toString() !== '') {
logger.error(indexCreate.stderr.toString());
}

Expand Down

0 comments on commit 59bc361

Please sign in to comment.