No commit activity in last 3 years
No release in over 3 years
This plugin lets you get the majority of you Mautic data into Elasticsearch for viewing using Kibana. Just setup a http input for logstash and a filter like so mautic { source => 'message'}. See the GitHub repository for more information
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

< 3.0.0, >= 2.0.0
 Project Readme

Logstash Plugin

Build Status

This is a plugin for Logstash.

It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.

  1. Install this plugin using
./plugin install logstash-filter-mautic
  1. Setup your Logstash configuration like so
input {
	http {
		host => "127.0.0.1"
		port => "5543"
		type => "mautic-lead"
	}

}
filter {

if [type] == "mautic-lead" {
		mautic {
			source => "message"
			remove_field => ["headers", "message", "host"]
		}
		if [type] == "lead"{
			mutate {
				replace => { "@timestamp" => "%{dateAdded}"}
			}
		}
		if [type] == "form_submission"{
			mutate {
				replace => { "@timestamp" => "%{dateSubmmited}"}
			}
		}
		if [type] == "email"{
			mutate {
				replace => { "@timestamp" => "%{dateSent}"}
			}
		}
		if [type] == "page_hit"{
			mutate {
				replace => { "@timestamp" => "%{dateHit}"}
			}
		}
		
	}

}
output {
	if [type] == "lead" {
		elasticsearch { 
			hosts => ["localhost:9200"] 
			index => ["mautic-leads"]
			#document_id => "%{[leadid]}"
		}
	}
	else if [type] == "form_submission" {
		elasticsearch { 
			hosts => ["localhost:9200"] 
			index => ["mautic-leads"]
			document_id => "F%{[leadid]}-%{[form][id]}-%{[submissionid]}"
			routing => "%{[leadid]}"
		}
	}
	else if [type] == "page_hit" {
		elasticsearch { 
			hosts => ["localhost:9200"] 
			index => ["mautic-leads"]
			routing => "%{[leadid]}"
		}
	}
	else if [type] == "email" {
		elasticsearch { 
			hosts => ["localhost:9200"] 
			index => ["mautic-leads"]
			document_id => "E%{[leadid]}-%{[email][id]}-%{[emailopenid]}"
			routing => "%{[leadid]}"
		}
	}
	}