Just curious.. I see experimental mqtt support was added and looking at the source it is only listed under subagents. Is both the broker and client running on the agent ? Just trying to figure out the topology of this. Does the agent publish predefined metrics to the server ?
Thanks,
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:
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
P.S. You can also use Port, Login, and Password parameters in broker section.
Victor,
What metrics are available for the agent to publish ? And where does the netxms server come into play ? from the looks of it the agent publishes messages direct to a broker so then does the netxms server subscribe to that broker as well or is the netxms server acting as the broker ?
Ok now im confused :o i just built 2.1 from source and now things went from --with-mqtt to --with-mosquitto there is no documention on mqtt and at all on the website can some one throw me a hint on how to actually get mqtt working and what the architecture is does netxms now act as a broker and the agents publish metrics to netxms and will a third party software or dashboard be able to subscribe to those metrics to show which agents/nodes are up or down with out having to login using netxms client
Thanks
Hi,
I'll assign somebody from the team to update documentation on MQTT in a next few days.
Best regards,
Victor
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:
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.
Hi,
you should configure one of the agents to communicate with the broker. It can be agent running on same machine as NetXMS server or on any other machine.
Best regards,
Victor
пытаюсь проверить работу netXMS с брокером mqtt. При старте агента сообщение:
Error loading subagent module mqtt.nsm": ?? ??????? ????????? ?????????.
файл mqtt.nsm есть, по другим нет ошибок.
Версия 2.2.4 под windows 7. Подскажите пожалуйста, что может быть не так?