nats-server icon indicating copy to clipboard operation
nats-server copied to clipboard

leafz --subscriptions monitor should show queue group detail

Open tbeets opened this issue 1 year ago • 1 comments

leafz monitor when including subscription detail should show queue group (if any) of the transferred subject interest. In current release, the monitor reflects a sub entry for each unique queue group, but does not show the queue group. Note foo transferred interest in example.

Accessing the monitor either through NATS or HTTP it is the same output. nats server request leafz --subscriptions http://vbox7.tinghus.net:8222/leafz?subs=1

Create two subscriptions on leaf (hub or spoke): nats sub foo --queue bar nats sub foo --queue baz

Run monitor on the opposite side of leaf connection. Note two foo entries but since no queue group is shown they can't be distinguished making some debugging scenarios difficult.

{
  "server": {
    "name": "vbox1",
    "host": "vbox1.tinghus.net",
    "id": "NAI3OKMQG3CWBBYYYU5FTCX4LFQUNWAOFSOUHBD5TA5I7GUPUMI6WV5N",
    "cluster": "cluster1",
    "domain": "hub1",
    "ver": "2.10.0-beta.42",
    "seq": 23764,
    "jetstream": true,
    "time": "2023-06-30T15:48:51.748426742Z"
  },
  "data": {
    "server_id": "NAI3OKMQG3CWBBYYYU5FTCX4LFQUNWAOFSOUHBD5TA5I7GUPUMI6WV5N",
    "now": "2023-06-30T15:48:51.748415541Z",
    "leafnodes": 1,
    "leafs": [
      {
        "name": "nats-leaf1",
        "is_spoke": false,
        "account": "ABCU2XVB6ODGJ3XAX3HYUII7CBKRTIQWDGWAIZLUE4FGAWLRISTTCTBY",
        "ip": "192.168.86.45",
        "port": 47608,
        "rtt": "730µs",
        "in_msgs": 27,
        "out_msgs": 107364,
        "in_bytes": 4525,
        "out_bytes": 8170705,
        "subscriptions": 17,
        "subscriptions_list": [
          "$JS.leaf1.API.STREAM.>",
          "$JS.leaf1.API.CONSUMER.>",
          "$SYS.REQ.SERVER.PING.CONNZ",
          "$SYS.REQ.USER.INFO",
          "$SYS.REQ.ACCOUNT.PING.CONNZ",
          "$JS.leaf1.API.INFO",
          "$JS.leaf1.API.META.>",
          "$LDS.bqrVMZ1bExI18u4kgWfC5B",
          "foo",
          "$JS.M.hEcbJR2V",
          "$JS.leaf1.API.$KV.>",
          "$SYS.REQ.ACCOUNT.PING.STATZ",
          "foo",
          "$JS.leaf1.API.DIRECT.>",
          "$JS.leaf1.API.SERVER.>",
          "$JS.leaf1.API.ACCOUNT.>",
          "$JS.leaf1.API.$OBJ.>"
        ],
        "compression": "s2_uncompressed"
      }
    ]
  }
}

tbeets avatar Jun 30 '23 16:06 tbeets

Do we have a detailed mode option for leafz? Can't change what we have, meaning list of strings for subjects, but if we have sub details (I think we have that in subz) we could do that here as well.

derekcollison avatar Jun 30 '23 16:06 derekcollison