Skip to content

TSDB: metrics for queries#1981

Merged
pracucci merged 7 commits intocortexproject:masterfrom
pstibrany:tsdb-metrics
Jan 15, 2020
Merged

TSDB: metrics for queries#1981
pracucci merged 7 commits intocortexproject:masterfrom
pstibrany:tsdb-metrics

Conversation

@pstibrany
Copy link
Copy Markdown
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

@pstibrany pstibrany requested a review from pracucci January 15, 2020 10:23
Copy link
Copy Markdown
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ý <[email protected]>
Copy link
Copy Markdown
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

@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
Copy Markdown
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