Quote from: Victor Kirhenshtein on April 07, 2017, 09:39:32 AM
Hi,
currently agent can connect to broker and pass published data to server as events or provide additional metrics with received data. You can connect multiple brokers to one agent. For each broker you should create section named MQTT/Broker/broker_name where you'll define broker hostname using Hostname parameter. Then you can use sections MQTT/Broker/broker_name/Events and MQTT/Broker/broker_name/Metrics to map receiving data to events and metrics.
Example MQTT subagent configuration:Code Select
SubAgent = mqtt.nsm
[MQTT/Brokers/Office]
Hostname = mqtt.office.radensolutions.com
[MQTT/Brokers/Office/Events]
MQTT_METERHUB_RAW_DATA = "cmnd/5C:CF:7F:25:79:D6/#"
[MQTT/Brokers/Office/Metrics]
MeterHub.Telemetry.RSSI = "tele/5C:CF:7F:25:79:D6/RSSI"
MeterHub.Telemetry.Time = "tele/5C:CF:7F:25:79:D6/TIME"
here agent will subscribe to one broker at address mqtt.office.radensolutions.com, will generate event MQTT_METERHUB_RAW_DATA for each message matching pattern cmnd/5C:CF:7F:25:79:D6/#, and provide two additional metrics MeterHub.Telemetry.RSSI and MeterHub.Telemetry.Time.
Best regards,
Victor
Hi Victor, I know this is an old post, but I couldn't find any other newer.
I have deployed Netxms 2.1 and I am trying to get some metrics from a mqtt broker.
I went to agent configuration menu, and configured the configuration file as your example. Now, I don't understand if I have to setup an external agent, or if the netxms server acts as the agent itself. Can you please clarify on this?
I will really appreciate your answer.
Thank you!
Gastón.