Skip to content

Commit

Permalink
Rename alert plugins to actions in docker env
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnbus committed Mar 20, 2019
1 parent 15ebc7b commit f4c9d4c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#

ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
DKR_IMAGES := mozdef_alertplugins mozdef_alerts mozdef_base mozdef_bootstrap mozdef_meteor mozdef_rest \
DKR_IMAGES := mozdef_alertactions mozdef_alerts mozdef_base mozdef_bootstrap mozdef_meteor mozdef_rest \
mozdef_mq_worker mozdef_loginput mozdef_cron mozdef_elasticsearch mozdef_mongodb \
mozdef_syslog mozdef_nginx mozdef_tester mozdef_rabbitmq mozdef_kibana
BUILD_MODE := build ## Pass `pull` in order to pull images instead of building them
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions docker/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@ services:
- ES_URL=http://localhost:9200
networks:
- default
alertplugins:
image: mozdef/mozdef_alertplugins
alertactions:
image: mozdef/mozdef_alertactions
build:
context: ../../
dockerfile: docker/compose/mozdef_alertplugins/Dockerfile
dockerfile: docker/compose/mozdef_alertactions/Dockerfile
cache_from:
- mozdef/mozdef_alertplugins
- mozdef_alertplugins:latest
- mozdef/mozdef_alertactions
- mozdef_alertactions:latest
restart: always
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && python alert_worker.py -c alert_worker.conf'
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && python alert_actions_worker.py -c alert_actions_worker.conf'
depends_on:
- base
- elasticsearch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM mozdef/mozdef_base
LABEL maintainer="[email protected]"

COPY alerts /opt/mozdef/envs/mozdef/alerts
COPY docker/compose/mozdef_alertplugins/files/alert_worker.conf /opt/mozdef/envs/mozdef/alerts/alert_worker.conf
COPY docker/compose/mozdef_alertactions/files/alert_actions_worker.conf /opt/mozdef/envs/mozdef/alerts/alert_actions_worker.conf
COPY docker/compose/mozdef_alerts/files/config.py /opt/mozdef/envs/mozdef/alerts/lib/config.py
RUN chown -R mozdef:mozdef /opt/mozdef/envs/mozdef/alerts

Expand Down
4 changes: 4 additions & 0 deletions docker/compose/mozdef_alerts/files/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
# 'relative pythonfile name (exclude the .py) - EX: sso_dashboard',
]

ALERT_ACTIONS = [
# 'relative pythonfile name (exclude the .py) - EX: sso_dashboard',
]

RABBITMQ = {
'mqserver': 'rabbitmq',
'mquser': 'guest',
Expand Down

0 comments on commit f4c9d4c

Please sign in to comment.