Skip to content

Commit 05949f7

Browse files
committed
Initial commit.
1 parent a452b6e commit 05949f7

File tree

9 files changed

+81
-1
lines changed

9 files changed

+81
-1
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/files/
2+
/output_files/
3+
/parsedmarc/GeoLite2-Country*

README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
# dmarc-visualizer
2-
Analyse and visualize DMARC results using open-source tools
2+
3+
Analyse and visualize DMARC results using open-source tools.
4+
5+
* [parsedmarc](https://github.com/domainaware/parsedmarc) for parsing DMARC reports,
6+
* [Elasticsearch](https://www.elastic.co/) to store aggregated data.
7+
* [Grafana](https://grafana.com/) to visualize the aggregated reports.
8+
9+
See the full blog post with instructions at https://debricked.com/blog/some-url-here.
10+
11+
## Screenshot
12+
13+
![Screenshot of Grafana dashboard](/big_screenshot.png?raw=true)

big_screenshot.png

264 KB
Loading

docker-compose.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: '3.7'
2+
services:
3+
parsedmarc:
4+
build: ./parsedmarc/
5+
volumes:
6+
- ./files:/input:ro
7+
- ./output_files:/output
8+
command: parsedmarc -c /parsedmarc.ini /input/*
9+
depends_on:
10+
- elasticsearch
11+
12+
elasticsearch:
13+
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
14+
environment:
15+
- discovery.type=single-node
16+
17+
grafana:
18+
build: ./grafana/
19+
ports:
20+
- 3000:3000
21+
environment:
22+
GF_INSTALL_PLUGINS: grafana-piechart-panel,grafana-worldmap-panel
23+
GF_AUTH_ANONYMOUS_ENABLED: 'true'

grafana/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM grafana/grafana:6.7.3
2+
3+
ADD --chown=grafana:grafana https://raw.githubusercontent.com/domainaware/parsedmarc/master/grafana/Grafana-DMARC_Reports.json /var/lib/grafana/dashboards/
4+
RUN chmod 644 /var/lib/grafana/dashboards/Grafana-DMARC_Reports.json
5+
6+
COPY grafana-provisioning/ /etc/grafana/provisioning/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- name: 'default'
2+
org_id: 1
3+
path: ''
4+
type: 'file'
5+
options:
6+
folder: '/var/lib/grafana/dashboards'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: 1
2+
3+
datasources:
4+
- name: 'dmarc-ag'
5+
type: 'elasticsearch'
6+
access: 'proxy'
7+
orgId: 1
8+
url: 'http://elasticsearch:9200'
9+
database: '[dmarc_aggregate-]YYYY-MM-DD'
10+
isDefault: true
11+
jsonData:
12+
esVersion: 70
13+
timeField: 'date_range'
14+
interval: 'Daily'
15+
version: 1
16+
editable: false

parsedmarc/Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM python:alpine
2+
3+
RUN apk add build-base libxml2-dev libxslt-dev \
4+
&& pip install parsedmarc
5+
6+
COPY parsedmarc.ini /
7+
#COPY GeoLite2-Country.mmdb /usr/share/GeoIP/GeoLite2-Country.mmdb

parsedmarc/parsedmarc.ini

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[general]
2+
save_aggregate = True
3+
save_forensic = True
4+
output = /output/
5+
6+
[elasticsearch]
7+
hosts = elasticsearch:9200
8+
ssl = False

0 commit comments

Comments
 (0)