tmechen / mqttbeat

Elasticsearch beat to save messages received with the MQTT protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mqttbeat

Welcome to Mqttbeat for elastic stack version 8.0.0 (works for 7.2.0)

Support

Hello, this project is no longer under work. Feel free to fork it, adapt it to your need, and improve it ! Cheers,

Getting Started with Mqttbeat

Build

To build the Docker Image for Mqttbeat run the command below.

docker build -t tmechen/mqttbeat:8.0.0 .

Run

MQTTBeat is a Docker Image which depends on a mqttbeat.yml and field.yml config file to be mounted at /config/ Therefore an example docker-compose file looks like this:

version: "3.7"
services:
  mqttbeat:
    image: tmechen/mqttbeat:8.0.0
    container_name: elk_mqttbeat
    restart: always
    depends_on:
      - elasticsearch
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /elk/mqttbeat/config/:/config/:ro

Config

  • Example mqttbeat.yml looks like this:
mqttbeat:
  broker_url: "tcp://broker:1883"
  topics_subscribe:
    - example/#?2

output.elasticsearch:
  hosts: ["elasticsearch"]
  • Example field.yml looks like this:
- key: message
  title: "Mqtt message"
  description: >
    A message from a mqtt client
  fields:
    - name: topic
      required: false
      description: >
        The topic corresponding to the message, basically an url

About

Elasticsearch beat to save messages received with the MQTT protocol.

License:Other


Languages

Language:Go 65.8%Language:Jinja 21.9%Language:Python 7.0%Language:Dockerfile 5.3%