Skip to content

How can I track connected clients if my system account misses a connection event? #5768

Discussion options

You must be logged in to vote

It looks like I can use $SYS.REQ.SERVER.<server ID>.CONNZ.

serverID := client.ConnectedServerId()
msg, _ = client.Request(fmt.Sprintf("$SYS.REQ.SERVER.%s.CONNZ", serverID), nil, 5*time.Second)
fmt.Println(subject, "message:", string(msg.Subject), string(msg.Data))

My two follow up questions to this are:

  1. How can I paginate this request response?
  2. Is the server ID in $SYS.REQ.SERVER.<server ID>.CONNZ for a single server or does it monitor the entire cluster for a multi-server setup?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@brettinternet
Comment options

Answer selected by brettinternet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant