Skip to content

TSDB: metrics for queries #1981

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

Merged
merged 7 commits into from
Jan 15, 2020
Merged

TSDB: metrics for queries #1981

merged 7 commits into from
Jan 15, 2020

Conversation

pstibrany
Copy link
Contributor

@pstibrany pstibrany commented Jan 15, 2020

This PR updates some existing ingester metrics from blocks code. Specifically:

We already update ingestion metrics from blocks code (cortex_ingester_ingested_samples_total, cortex_ingester_ingested_samples_failures_total)

Querying:

  • cortex_ingester_queries_total (this was already tracked before this PR)
  • cortex_ingester_queried_samples (added by this PR)
  • cortex_ingester_queried_series (added by this PR)
  • Ignored metric: cortex_ingester_queried_chunks – chunks-specific

User state:

  • cortex_ingester_memory_users (added by this PR [update: now removed again, in favor of PR Fix ingester_memory_series/users metrics for TSDB storage #1982), basically equals to number of open TSDB databases in Cortex)
  • Ignored: cortex_ingester_memory_series – cannot see easy way to get this, not even in TSDB metrics
  • Ignored: cortex_ingester_memory_series_created_total, cortex_ingester_memory_series_removed_total (these are per-user) – again, no obvious/easy way to get this from TSDB

There are some more metrics that are updated when flushing chunks. This PR doesn't update these metrics and there seems to be no obvious way how we could do that:

  • cortex_ingester_chunk_age_seconds
  • cortex_ingester_chunk_length
  • cortex_ingester_chunk_size_bytes
  • cortex_ingester_chunk_utilization
  • cortex_ingester_chunks_created_total
  • cortex_ingester_dropped_chunks_total
  • cortex_ingester_memory_chunks (total chunks in memory)

Additional cortex_ingester metrics are related to transfer of data between ingesters. This PR doesn't change them, but for completeness, here they are:

  • cortex_ingester_received_bytes_total, cortex_ingester_received_files, cortex_ingester_sent_bytes_total, cortex_ingester_sent_files - updated when transferring TSDB's between ingesters
  • cortex_ingester_received_chunks, cortex_ingester_sent_chunks - updated when transferring chunks between ingesters

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
@pstibrany pstibrany requested a review from pracucci January 15, 2020 10:23
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Thanks Peter! Could you also add a changelog entry, please (we prefix them with TSDB:)?

Ignored: cortex_ingester_memory_series – cannot see easy way to get this, not even in TSDB metrics

I have a working solution for this (I will submit a PR):
master...pracucci:fix-ingester-memory-series-for-blocks-storage

Ignored: cortex_ingester_memory_series_created_total, cortex_ingester_memory_series_removed_total (these are per-user) – again, no obvious/easy way to get this from TSDB

I agree it's quite complicated. I'm crashing my head against it since several hours and trying different approaches. I'm currently work on it.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Copy link
Contributor

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

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

LGTM with nit

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
@gouthamve gouthamve changed the title Tsdb metrics TSDB: metrics for queries Jan 15, 2020
@pracucci pracucci merged commit dd511dd into cortexproject:master Jan 15, 2020
@thorfour
Copy link
Contributor

Thanks for doing that!

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.

5 participants