Skip to content

Commit

Permalink
Include comments
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Pracucci <[email protected]>
  • Loading branch information
dimitarvdimitrov and pracucci authored Oct 17, 2024
1 parent 6dd02d8 commit 75a1e2e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions operations/mimir-mixin/alerts/ingest-storage.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
'for': '5m',
expr: |||
sum by (%(alert_aggregation_labels)s, %(per_instance_label)s) (
# This is the old metric name. We're keeping support for backward compatibility.
rate(cortex_ingest_storage_reader_records_failed_total{cause="server"}[1m])
or
rate(cortex_ingest_storage_reader_requests_failed_total{cause="server"}[1m])
Expand All @@ -144,6 +145,7 @@
expr: |||
# Alert if the reader is not processing any records, but there buffered records to process in the Kafka client.
(sum by (%(alert_aggregation_labels)s, %(per_instance_label)s) (
# This is the old metric name. We're keeping support for backward compatibility.
rate(cortex_ingest_storage_reader_records_total[5m])
or
rate(cortex_ingest_storage_reader_requests_total[5m])
Expand Down
6 changes: 5 additions & 1 deletion operations/mimir-mixin/dashboards/writes.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -251,23 +251,27 @@ local filename = 'mimir-writes.json';
[
|||
sum(
# This is the old metric name. We're keeping support for backward compatibility.
rate(cortex_ingest_storage_reader_records_total{%s}[$__rate_interval])
or
rate(cortex_ingest_storage_reader_requests_total{%s}[$__rate_interval])
)
-
sum(
# This is the old metric name. We're keeping support for backward compatibility.
rate(cortex_ingest_storage_reader_records_failed_total{%s}[$__rate_interval])
or
rate(cortex_ingest_storage_reader_requests_failed_total{%s}[$__rate_interval])
)
||| % [$.jobMatcher($._config.job_names.ingester), $.jobMatcher($._config.job_names.ingester), $.jobMatcher($._config.job_names.ingester), $.jobMatcher($._config.job_names.ingester)],
'sum (
rate(cortex_ingest_storage_reader_records_failed_total{%s, cause="client"}[$__rate_interval])
# This is the old metric name. We're keeping support for backward compatibility.
rate(cortex_ingest_storage_reader_records_failed_total{%s, cause="client"}[$__rate_interval])
or
rate(cortex_ingest_storage_reader_requests_failed_total{%s, cause="client"}[$__rate_interval])
)' % [$.jobMatcher($._config.job_names.ingester), $.jobMatcher($._config.job_names.ingester)],
'sum (
# This is the old metric name. We're keeping support for backward compatibility.
rate(cortex_ingest_storage_reader_records_failed_total{%s, cause="server"}[$__rate_interval])
or
rate(cortex_ingest_storage_reader_requests_failed_total{%s, cause="server"}[$__rate_interval])
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/ingest/pusher_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func newStoragePusherMetrics(reg prometheus.Registerer) *storagePusherMetrics {
serverErrRequests: errRequestsCounter.WithLabelValues("server"),
totalRequests: promauto.With(reg).NewCounter(prometheus.CounterOpts{
Name: "cortex_ingest_storage_reader_requests_total",
Help: "Number of attempted write requests.",
Help: "Number of attempted write requests ingested from Kafka.",
}),
}
}
Expand Down

0 comments on commit 75a1e2e

Please sign in to comment.