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

Suppress varz jetstream output if not enabled #2009

Merged
merged 1 commit into from
Mar 15, 2021
Merged

Conversation

matthiashanel
Copy link
Contributor

Signed-off-by: Matthias Hanel [email protected]

What it used to look like:

  "jetstream": {
    "config": {
      "max_memory": 0,
      "max_storage": 0
    },
    "stats": null
  },

What this will be now

"jetstream": {},

Test

> nats-server -m 5222 &
[1] 84077
[84077] 2021/03/15 16:02:38.676376 [INF] Starting nats-server
[84077] 2021/03/15 16:02:38.676616 [INF]   Version:  2.2.0
[84077] 2021/03/15 16:02:38.676627 [INF]   Git:      [not set]
[84077] 2021/03/15 16:02:38.676737 [INF]   Name:     NDQKXZJBFFVO3XUIWIEXVBI3CWTDIIT3PP7DORBGNCG5Y5UZQB4FHQQN
[84077] 2021/03/15 16:02:38.676747 [INF]   ID:       NDQKXZJBFFVO3XUIWIEXVBI3CWTDIIT3PP7DORBGNCG5Y5UZQB4FHQQN
[84077] 2021/03/15 16:02:38.678096 [INF] Starting http monitor on 0.0.0.0:5222
[84077] 2021/03/15 16:02:38.678295 [INF] Listening for client connections on 0.0.0.0:4222
[84077] 2021/03/15 16:02:38.679013 [INF] Server is ready
> curl http://localhost:5222/varz | grep jetstream
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
100  1219  100  1219    0     0  87071      0 --:--:-- --:--:-- --:--:-- 87071
 "jetstream": {},
>

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks.

@matthiashanel matthiashanel merged commit d7403ea into master Mar 15, 2021
@matthiashanel matthiashanel deleted the js-disabled-varz branch March 15, 2021 21:41
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.

2 participants