The Manifest#

The mapping between MQTT and Otel is configured via a file called Manifest.yaml (or whatever is configured in Application Settings).

The structure of the file is as following

File structure#

  1. Version#

    The version must be set and must be the first line of the file. If not set, or not being on the first line, the file will be declined. Currently the following versions are supported: 1.0.

  2. MqttBroker#

    In this section the available Mqtt broker connections will be configured. For details, see Mqtt broker.

  3. OtelServer#

    In this section the available open telemetry connections will be configured. For details, see Otel server

  4. SubscriptionGroups#

    A list of grouped subscriptions that can be referred later in the otel section. For details see Subscription groups.

  5. Processors#

    A list of processors, that will take mqtt payloads, processes them and then create otel logs or metrics. For details see Processors

As a starting point, this is an example manifest using logs, and metrics:

 1Version: 1.0
 2
 3MqttBroker:
 4  - Name: "My broker"
 5    Endpoint:
 6      Port: 32007
 7      Address: "mymqtt-broker.net"
 8      EnableTls: false
 9
10OtelServer:
11  - Name: "My Otel server"
12    ServiceName: "my-service"
13    ServiceNamespace: "my-service-namespace"
14    Endpoint:
15      Protocol: "http"
16      Port: 32014
17      Address: "my-otel-collector.net"
18      EnableTls: false
19
20Processors:
21  - Name: "Processor Temperature"
22    Description: "Provides the current processor temperature."
23    Mqtt: 
24      Subscriptions:
25        - Name: "Processor information"
26          Topic: "message-topic"
27    Otel:
28      Metrics:
29        - Name: "Processor.Temperature"
30          Description: "The current processor temperature."
31          SignalDataType: Float
32          Instrument: Gauge
33          Value: "JSONPATH('$.Processor.Temperature')"
34
35  - Name: "Server logs"
36    Description: "Collect all log messages from the server."
37    Mqtt:
38      Subscriptions:
39        - Name: "Server logs"
40          Topic: "message-log-topic"
41    Otel:
42      Attributes:
43        - Key: Location
44          Value: MainServerRoom
45      Logs:
46        - Name: "Logging"
47          PayloadType: Json
48          Transform: "GROK('%{TIME:otel_timestamp} [%{WORD:otel_loglevel}] [%{WORD:server_name}] %{GREEDYDATA:otel_message}')"