From 718ff95aad51fb18a6bd77bd0ad9f66d32b47397 Mon Sep 17 00:00:00 2001 From: Michael Kirpichev Date: Mon, 22 Aug 2022 16:09:49 +0200 Subject: [PATCH 1/2] Fixes to make it work --- .gitignore | 2 ++ docker-compose.yml | 6 ++++-- grafana/Dockerfile | 2 +- parsedmarc/Dockerfile | 4 ++-- parsedmarc/{parsedmarc.ini => parsedmarc.sample.ini} | 0 5 files changed, 9 insertions(+), 5 deletions(-) rename parsedmarc/{parsedmarc.ini => parsedmarc.sample.ini} (100%) diff --git a/.gitignore b/.gitignore index 965f66f..f345aae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /files/ /output_files/ /parsedmarc/GeoLite2-Country* +/elastic_data/ +parsedmarc.ini diff --git a/docker-compose.yml b/docker-compose.yml index 5b20b30..d20d556 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,15 +5,17 @@ services: volumes: - ./files:/input:ro - ./output_files:/output - command: parsedmarc -c /parsedmarc.ini /input/* + command: parsedmarc -c /parsedmarc.ini /input/* --debug depends_on: - elasticsearch restart: on-failure elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.9.1 + image: docker.elastic.co/elasticsearch/elasticsearch:7.17.5 environment: - discovery.type=single-node + volumes: + - ./elastic_data:/usr/share/elasticsearch/data grafana: build: ./grafana/ diff --git a/grafana/Dockerfile b/grafana/Dockerfile index b790317..6d7d2fd 100644 --- a/grafana/Dockerfile +++ b/grafana/Dockerfile @@ -1,4 +1,4 @@ -FROM grafana/grafana +FROM grafana/grafana:8.5.4 ADD --chown=grafana:root https://raw.githubusercontent.com/domainaware/parsedmarc/master/grafana/Grafana-DMARC_Reports.json /var/lib/grafana/dashboards/ RUN chmod 644 /etc/grafana/provisioning diff --git a/parsedmarc/Dockerfile b/parsedmarc/Dockerfile index cca9af5..04f8e24 100644 --- a/parsedmarc/Dockerfile +++ b/parsedmarc/Dockerfile @@ -1,6 +1,6 @@ -FROM python:alpine +FROM python:3.9-alpine3.16 -RUN apk add build-base libxml2-dev libxslt-dev \ +RUN apk add build-base libxml2-dev libxslt-dev libffi-dev \ && pip install parsedmarc COPY parsedmarc.ini / diff --git a/parsedmarc/parsedmarc.ini b/parsedmarc/parsedmarc.sample.ini similarity index 100% rename from parsedmarc/parsedmarc.ini rename to parsedmarc/parsedmarc.sample.ini From 0dbd63e3fded9a7cdf3140e01c7f6117d14070d6 Mon Sep 17 00:00:00 2001 From: Tim Noeding Date: Wed, 24 Aug 2022 12:58:41 -1000 Subject: [PATCH 2/2] Fixing esVersion to match Elastic Search version This will hopefully save some folks a bit of trouble with the "Support for Elasticsearch versions after their end-of-life (currently versions < 7.10)" error. --- grafana/grafana-provisioning/datasources/all.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grafana/grafana-provisioning/datasources/all.yml b/grafana/grafana-provisioning/datasources/all.yml index e405b3f..ae59743 100644 --- a/grafana/grafana-provisioning/datasources/all.yml +++ b/grafana/grafana-provisioning/datasources/all.yml @@ -9,7 +9,7 @@ datasources: database: '[dmarc_aggregate-]YYYY-MM-DD' isDefault: true jsonData: - esVersion: 70 + esVersion: 7.17.5 timeField: 'date_range' interval: 'Daily' version: 1 @@ -22,7 +22,7 @@ datasources: database: '[dmarc_forensic-]YYYY-MM-DD' isDefault: false jsonData: - esVersion: 70 + esVersion: 7.17.5 timeField: 'arrival_date' interval: 'Daily' version: 1