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

Ensure exported NATS Server metrics have the correct TYPE information for the origin data #71

Open
bwerthmann opened this issue Feb 11, 2022 · 0 comments
Assignees
Labels
enhancement Enhancement to existing functionality

Comments

@bwerthmann
Copy link
Contributor

bwerthmann commented Feb 11, 2022

Presently, all metrics exported matching metric name nats_core* have TYPE gauge. A subset of these are actually other types of metrics.

The distinction between counter and gauge is significant. On the consumer side, different approaches are needed in PromQL.

Example counter metric: nats_core_total_connection_count

This is a counter because it 'increases forever' (until the process restarts).

# HELP nats_core_total_connection_count Total number of client connections serviced gauge
# TYPE nats_core_total_connection_count gauge
nats_core_total_connection_count{server_cluster="...",server_id="...",server_name="..."} 6345789

Example gaugue metric: nats_core_connection_count

# HELP nats_core_connection_count Current number of client connections gauge
# TYPE nats_core_connection_count gauge
nats_core_connection_count{server_cluster="...",server_id="...",server_name="..."} 1

NOTE: Some non-gauge metrics are present in the scrape

There are all associated with the surveyor process, not any NATS Server.

# TYPE go_gc_duration_seconds summary
# TYPE go_memstats_alloc_bytes_total counter
# TYPE go_memstats_frees_total counter
# TYPE go_memstats_lookups_total counter
# TYPE go_memstats_mallocs_total counter
# TYPE nats_survey_duration_seconds summary
# TYPE nats_survey_late_replies_count counter
# TYPE nats_survey_nats_reconnects counter
# TYPE nats_survey_no_replies_count counter
# TYPE process_cpu_seconds_total counter
# TYPE promhttp_metric_handler_requests_total counter
@bwerthmann bwerthmann changed the title Ensure exported metrics have the correct TYPE information for the origin data Ensure exported NATS Servetr metrics have the correct TYPE information for the origin data Feb 11, 2022
@bwerthmann bwerthmann changed the title Ensure exported NATS Servetr metrics have the correct TYPE information for the origin data Ensure exported NATS Server metrics have the correct TYPE information for the origin data Feb 11, 2022
@bwerthmann bwerthmann added the enhancement Enhancement to existing functionality label Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants