domainaware / parsedmarc

A Python package and CLI for parsing aggregate and forensic DMARC reports
https://domainaware.github.io/parsedmarc/
Apache License 2.0
961 stars 209 forks source link

Keep Opensearch, Kibana, and Graphana dashboards in parity with the Splunk dashboards #502

Open seanthegeek opened 3 months ago

seanthegeek commented 3 months ago

When I initially built parsedmarc I pushed the parsed DMARC data to Elasticsearch and visualized it with Kibana and visualized it with Kibana both as a proof of concept and as a way to keep the entire solution open source. Later on, Graphana dashboards were added, but those haven't been updated in 2 years.

These days, I'm pushing the results to Splunk and using Splunk dashboards to visualize the results. I've made some improvements to the Splunk dashboards recently, but I don't have an ELK or OpenSearch instance to maintain the other dashboard solutions.

The changes I've made include:

I'd like to keep all of the dashboards up to parity, but I'm not sure what's the best way to do that. My understanding is that OpenSearch is a fork of ELK before undesirable licensing changes were made. Newer versions of ELK won't allow forked clients to connect. I'm wondering:

Also, after all this time, I just noticed that the source_Base_domain field in the elastic and opensearch modules for parsedmarc should have been named source_base_domain to match every other field, which is all lowercase. I'm guessing changing that now would break backwards compatibility, right?

https://github.com/domainaware/parsedmarc/blob/master/parsedmarc/elastic.py#L63C32-L64C5

https://github.com/domainaware/parsedmarc/blob/master/parsedmarc/opensearch.py#L62

@Szasza I'm hoping you can answer some of these questions since you contributed the opensearch module.

Szasza commented 3 months ago

Hi @seanthegeek ,

I use Grafana together with OpenSearch.

Now to the maintenance of the various dashboards. As there are a variety of visualisation and data store solutions and versions, it may worth putting together some automated tests using the different containers (OS, Grafana, ES, Kibana, Kafka, whatnot). The charts can be verified using headless Firefox and Playwright - taking screenshots and comparing them to golden images.

Last but not least, changing source_Base_domain to source_base_domain won't break OS/ES backward compatibility as they convert everything to lowercase. You can check that by getting an OpenSearch environment up and running, for example from https://github.com/Szasza/dmarc-visualizer-opensearch.

seanthegeek commented 3 months ago

Thanks for the detailed explanation.