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. MQTT SubAgent subscribing to more than one MQTT Publisher

MQTT SubAgent subscribing to more than one MQTT Publisher

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 23.0k 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.
  • U
    U
    [email protected]
    wrote on last edited by
    #1

    Hi All,

    I have 2 PI devices where Mosquitto is running and I want to use one Windows machine with NetXMS agent, SubAgent MQTT to subscribe and collect the data.

    In both PI devices, i can see in Mosquitto logs that NetXMS agent is logging succesfully. The nxagentd.conf file is configured to connect to 2 MQTT brokers and collect few Metrix..

    The problem is that successful collection is happening only to one broker: if I put connection/Metrics of any of the brokers, everything goes fine. When I put connection/Metrics of both brokers, successful collection of DCI values is on the first one only, second shows errors.
    In documentation it shows that you can subscribe to more than one broker, on same agent. Any idea how to do this?

    MasterServers = <IP address of NetXMS server>
    ConfigIncludeDir = C:\NetXMS\etc\nxagentd.conf.d
    LogFile = {syslog}
    FileStore = C:\NetXMS\var
    SubAgent = mqtt

    [MQTT/Brokers/pi_cz_gen]
    Hostname = <here I'm putting IP address of MQTT broker>
    Port = 1883
    Login = admin
    Password = *******

    [MQTT/Brokers/pi_cz_gen/Metrics]
    CZ_GEN.Telemetry.Battery = "tele/cz-gen/Battery"
    CZ_GEN.Telemetry.Status = "tele/cz-gen/Status"

    [MQTT/Brokers/pi_cf_gen]
    Hostname = <here I'm putting IP address of MQTT broker>
    Port = 1883
    Login = admin
    Password = ******

    [MQTT/Brokers/pi_cf_gen/Metrics]
    CF_GEN_3.Telemetry.GEN_CF_3_Battery = "tele/cf-gen/GEN_CF_3_Battery"
    CF_GEN_3.Telemetry.GEN_CF_3_Frequency = "tele/cf-gen/GEN_CF_3_Frequency"
    CF_GEN_3.Telemetry.GEN_CF_3_TotalPower = "tele/baa352c08d7f501c/GEN_CF_3_TotalPower"

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

      Configuration is correct, so it looks like a bug in agent (or libmosquitto). I will try to reproduce it in the lab.

      Best regards,
      Victor

      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