Added documentation to Meshtastic ingestor on how to collect MQTT evens in JSON
This commit is contained in:
parent
e38e0ec69b
commit
1fedeb2081
@ -2,6 +2,14 @@
|
|||||||
# Elasticsearch Recon Ingestion Scripts (ERIS) - Developed by Acidvegas (https://git.acid.vegas/eris)
|
# Elasticsearch Recon Ingestion Scripts (ERIS) - Developed by Acidvegas (https://git.acid.vegas/eris)
|
||||||
# ingest_meshtastic.py
|
# 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 asyncio
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
@ -23,7 +31,8 @@ def construct_map() -> dict:
|
|||||||
# Match on exact value or full text search
|
# Match on exact value or full text search
|
||||||
keyword_mapping = { 'type': 'text', 'fields': { 'keyword': { 'type': 'keyword', 'ignore_above': 256 } } }
|
keyword_mapping = { 'type': 'text', 'fields': { 'keyword': { 'type': 'keyword', 'ignore_above': 256 } } }
|
||||||
|
|
||||||
return {
|
# Construct the index mapping
|
||||||
|
mapping = {
|
||||||
'mappings': {
|
'mappings': {
|
||||||
'properties': {
|
'properties': {
|
||||||
'channel' : { 'type': 'long'},
|
'channel' : { 'type': 'long'},
|
||||||
@ -128,6 +137,8 @@ def construct_map() -> dict:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return mapping
|
||||||
|
|
||||||
|
|
||||||
async def process_data(input_path: str):
|
async def process_data(input_path: str):
|
||||||
'''
|
'''
|
||||||
|
Loading…
Reference in New Issue
Block a user