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

Exported JetStream disabled metric from /jsz #182

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

mfaizanse
Copy link
Contributor

@mfaizanse mfaizanse commented Aug 2, 2022

Exported JetStream disabled metric from /jsz

If JetStream is disabled, then we get resp.disabled in the response of /jsz endpoint.

{
   "server_id":"NBKAYBIGPZ73E4LYEY64FU2BWTCGO53TTEYLJ5NVCP3DTM4H2DNQZFL6",
   "now":"2022-08-01T14:57:56.528474816Z",
   "disabled":true,
   "config":{
      "max_memory":0,
      "max_storage":0
   },
   "memory":0,
   "storage":0,
   "reserved_memory":0,
   "reserved_storage":0,
   "accounts":0,
   "ha_assets":0,
   "api":{
      "total":0,
      "errors":0
   },
   "streams":0,
   "consumers":0,
   "messages":0,
   "bytes":0
}

This PR exports that variable as nats_server_jetstream_disabled.

# HELP nats_server_jetstream_disabled JetStream disabled or not
# TYPE nats_server_jetstream_disabled gauge
nats_server_jetstream_disabled{cluster="xxx-nats",domain="",is_meta_leader="false",meta_leader="xxx-nats-1",server_id="NBUCPIJXXPLYEEKPF6C7EBZDFX3QCDHLEO2II4YMU5JEJXEAMOJ7AHJZ",server_name="xxx-nats-2"} 0

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

@nsurfer nsurfer self-requested a review August 2, 2022 16:15
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.

3 participants