RunReveal

MQTT source

The mqtt source connects to an MQTT broker and subscribes to a topic. Each message received on the topic becomes a log event.

Configuration

{
  "sources": {
    "iot-events": {
      "type": "mqtt",
      "broker": "tcp://localhost:1883",
      "clientID": "reveald-collector",
      "topic": "devices/logs"
    }
  }
}

Options

OptionTypeDefaultDescription
brokerstringrequiredMQTT broker address (e.g. "tcp://host:1883", "ssl://host:8883")
clientIDstringrequiredClient identifier for the MQTT connection
topicstringrequiredTopic to subscribe to
userNamestring""Authentication username
passwordstring""Authentication password
qosint0Quality of Service level: 0 (at-most-once), 1 (at-least-once), 2 (exactly-once)
retainedboolfalseSubscribe to retained messages

Event fields

FieldValue
sourceType"mqtt"
rawLogMessage payload
eventTimeCurrent time when the message is received

On this page