Added documentation to Meshtastic ingestor on how to collect MQTT evens in JSON

This commit is contained in:
Dionysus 2024-11-30 18:20:53 -05:00
parent e38e0ec69b
commit 1fedeb2081
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -2,6 +2,14 @@
# Elasticsearch Recon Ingestion Scripts (ERIS) - Developed by Acidvegas (https://git.acid.vegas/eris)
# ingest_meshtastic.py
'''
This plugin needs the meshtastic-mqtt-json library to convert Meshtastic MQTT messages to JSON.
pip install meshtastic-mqtt-json
Use this command to pipe Meshtastic MQTT messages to the ERIS FIFO when using the --watch flag:
meshtastic-mqtt-json > ERIS_FIFO_PATH
'''
import asyncio
import json
import logging
@ -23,7 +31,8 @@ def construct_map() -> dict:
# Match on exact value or full text search
keyword_mapping = { 'type': 'text', 'fields': { 'keyword': { 'type': 'keyword', 'ignore_above': 256 } } }
return {
# Construct the index mapping
mapping = {
'mappings': {
'properties': {
'channel' : { 'type': 'long'},
@ -128,6 +137,8 @@ def construct_map() -> dict:
}
}
return mapping
async def process_data(input_path: str):
'''