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

Export account resource metrics and configuration #322

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MattiasAng
Copy link

@MattiasAng MattiasAng commented Dec 10, 2024

Adds four new metrics that collects configured reserved memory and storage along with how many bytes are currently used of each.
This will allow users to monitor resource consumption based on set maximum.

I've decided to name the configured reserved metrics as max to align with configuration file rather than what the API response attribute is named (reserved).

Example response:

# HELP jetstream_account_max_memory JetStream Account Max Memory in bytes
# TYPE jetstream_account_max_memory gauge
jetstream_account_max_memory{account="test",account_id="test",cluster="",domain="",is_meta_leader="true",meta_leader="",server_id="http://localhost:8222",server_name="test"} 1.048576e+07
# HELP jetstream_account_max_storage JetStream Account Max Storage in bytes
# TYPE jetstream_account_max_storage gauge
jetstream_account_max_storage{account="test",account_id="test",cluster="",domain="",is_meta_leader="true",meta_leader="",server_id="http://localhost:8222",server_name="test"} 1.048576e+06
# HELP jetstream_account_memory_used Total number of bytes used by JetStream memory
# TYPE jetstream_account_memory_used gauge
jetstream_account_memory_used{account="test",account_id="test",cluster="",domain="",is_meta_leader="true",meta_leader="",server_id="http://localhost:8222",server_name="test"} 0
# HELP jetstream_account_storage_used Total number of bytes used by JetStream storage
# TYPE jetstream_account_storage_used gauge
jetstream_account_storage_used{account="test",account_id="test",cluster="",domain="",is_meta_leader="true",meta_leader="",server_id="http://localhost:8222",server_name="test"} 448245

Adds three new metrics that collects configured reserved memory and storage along with how many bytes are currently used.
@MattiasAng MattiasAng force-pushed the account-resource-metrics branch from e6f55c3 to 27340d1 Compare December 10, 2024 12:47
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.

1 participant