Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADDED] In/Out Msgs/Bytes in /serverz monitoring endpoint #976

Merged
merged 1 commit into from
Nov 25, 2019
Merged

Conversation

kozlovic
Copy link
Member

Unlike total_msgs/bytes that represent the total number of messages
stored, in_msgs/bytes and out_msgs/bytes are the messages received
by the server and sent to clients.
The in_msgs counter is updated when processing inbound client
messages.
The out_msgs counter is updated when sending a message to a subscription,
either as a new or redelivered message.

Note that the size for in_bytes/out_bytes is different because these
values represent the bytes received (a PubMsg protobuf) and sent
(a MsgProto protobuf) that have different overhead.

Resolves #974

Signed-off-by: Ivan Kozlovic ivan@synadia.com

Unlike total_msgs/bytes that represent the total number of messages
stored, in_msgs/bytes and out_msgs/bytes are the messages received
by the server and sent to clients.
The `in_msgs` counter is updated when processing inbound client
messages.
The `out_msgs` counter is updated when sending a message to a subscription,
either as a new or redelivered message.

Note that the size for in_bytes/out_bytes is different because these
values represent the bytes received (a PubMsg protobuf) and sent
(a MsgProto protobuf) that have different overhead.

Resolves #974

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic
Copy link
Member Author

@ColinSullivan1 As requested from user in issue #974, I am adding in_msgs/in_bytes and out_msgs/out_bytes in streaming/serverz endpoint. This is similar to NATS core in/out msgs/bytes. Since the user is using the nats-exporter, I think that once this is merged, changes would have to be made in the nats-exporter to take advantage of those 4 new fields, right?

Copy link

@renanberto renanberto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works beautifully. 👏

{
  "cluster_id": "local-nats",
  "server_id": "ptYgAQzCehetUfawkQqinl",
  "version": "0.16.2",
  "go": "go1.11.13",
  "state": "STANDALONE",
  "now": "2019-11-21T14:38:22.010618307Z",
  "start_time": "2019-11-21T14:35:08.744925427Z",
  "uptime": "3m13s",
  "clients": 1,
  "subscriptions": 47,
  "channels": 4255,
  "total_msgs": 500738,
  "total_bytes": 55940901,
  "in_msgs": 500738,
  "in_bytes": 64455885,
  "out_msgs": 0,
  "out_bytes": 0,
  "open_fds": 52,
  "max_fds": 1048576
}

@ColinSullivan1 As requested from user in issue #974, I am adding in_msgs/in_bytes and out_msgs/out_bytes in streaming/serverz endpoint. This is similar to NATS core in/out msgs/bytes. Since the user is using the nats-exporter, I think that once this is merged, changes would have to be made in the nats-exporter to take advantage of those 4 new fields, right?

@kozlovic @ColinSullivan1 Can you validate: nats-io/prometheus-nats-exporter#109 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API] field total_msgs (streaming/serverz) is directly affected by the deletion.
2 participants