Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. 2.1M3 Mqtt support

2.1M3 Mqtt support

Scheduled Pinned Locked Moved Support
9 Posts 4 Posters 30.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    G
    gmonk63
    wrote on last edited by
    #1

    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,

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        P.S. You can also use Port, Login, and Password parameters in broker section.

        1 Reply Last reply
        0
        • G
          G
          gmonk63
          wrote on last edited by
          #4

          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 ?

          1 Reply Last reply
          0
          • G
            G
            gmonk63
            wrote on last edited by
            #5

            Ok now im confused  😮    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

            1 Reply Last reply
            0
            • V
              V
              Victor Kirhenshtein
              wrote on last edited by
              #6

              Hi,

              I'll assign somebody from the team to update documentation on MQTT in a next few days.

              Best regards,
              Victor

              1 Reply Last reply
              0
              • G
                G
                gtheaded
                wrote on last edited by
                #7

                @victor said in 2.1M3 Mqtt support:

                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.

                1 Reply Last reply
                0
                • V
                  V
                  Victor Kirhenshtein
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0
                  • B
                    B
                    blinov
                    wrote on last edited by
                    #9

                    пытаюсь проверить работу netXMS с брокером mqtt. При старте агента сообщение:
                    Error loading subagent module mqtt.nsm": ?? ??????? ????????? ?????????.
                    файл mqtt.nsm есть, по другим нет ошибок.
                    Версия 2.2.4 под windows 7. Подскажите пожалуйста, что может быть не так?

                    1 Reply Last reply
                    0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    Powered by NodeBB Contributors
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups