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

mixin, docs: Rename Compact -> Compactor #2065

Merged
merged 3 commits into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/components/compact.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Compact
title: Compactor
type: docs
menu: components
---

# Compact
# Compactor

The compactor component of Thanos applies the compaction procedure of the Prometheus 2.0 storage engine to block data stored in object storage.
It is generally not semantically concurrency safe and must be deployed as a singleton against a bucket.
Expand Down
12 changes: 6 additions & 6 deletions examples/alerts/alerts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ name: thanos-compactor.rules
rules:
- alert: ThanosCompactorMultipleCompactsAreRunning
annotations:
message: You should never run more than one Thanos Compact at once. You have {{
$value }}
message: You should never run more than one Thanos Compactor at once. You have
{{ $value }}
expr: sum(up{job=~"thanos-compactor.*"}) > 1
for: 5m
labels:
severity: warning
- alert: ThanosCompactorHalted
annotations:
message: Thanos Compact {{$labels.job}} has failed to run and now is halted.
message: Thanos Compactor {{$labels.job}} has failed to run and now is halted.
expr: thanos_compactor_halted{job=~"thanos-compactor.*"} == 1
for: 5m
labels:
severity: warning
- alert: ThanosCompactorHighCompactionFailures
annotations:
message: Thanos Compact {{$labels.job}} is failing to execute {{ $value | humanize
message: Thanos Compactor {{$labels.job}} is failing to execute {{ $value | humanize
}}% of compactions.
expr: |
(
Expand All @@ -39,7 +39,7 @@ rules:
severity: warning
- alert: ThanosCompactorBucketHighOperationFailures
annotations:
message: Thanos Compact {{$labels.job}} Bucket is failing to execute {{ $value
message: Thanos Compactor {{$labels.job}} Bucket is failing to execute {{ $value
| humanize }}% of operations.
expr: |
(
Expand All @@ -53,7 +53,7 @@ rules:
severity: warning
- alert: ThanosCompactorHasNotRun
annotations:
message: Thanos Compact {{$labels.job}} has not uploaded anything for 24 hours.
message: Thanos Compactor {{$labels.job}} has not uploaded anything for 24 hours.
expr: (time() - max(thanos_objstore_bucket_last_successful_upload_time{job=~"thanos-compactor.*"}))
/ 60 / 60 > 24
labels:
Expand Down
12 changes: 6 additions & 6 deletions examples/alerts/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ groups:
rules:
- alert: ThanosCompactorMultipleCompactsAreRunning
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it better to use ThanosCompactorMultipleCompactorsAreRunning

annotations:
message: You should never run more than one Thanos Compact at once. You have
message: You should never run more than one Thanos Compactor at once. You have
{{ $value }}
expr: sum(up{job=~"thanos-compactor.*"}) > 1
for: 5m
labels:
severity: warning
- alert: ThanosCompactorHalted
annotations:
message: Thanos Compact {{$labels.job}} has failed to run and now is halted.
message: Thanos Compactor {{$labels.job}} has failed to run and now is halted.
expr: thanos_compactor_halted{job=~"thanos-compactor.*"} == 1
for: 5m
labels:
severity: warning
- alert: ThanosCompactorHighCompactionFailures
annotations:
message: Thanos Compact {{$labels.job}} is failing to execute {{ $value | humanize
}}% of compactions.
message: Thanos Compactor {{$labels.job}} is failing to execute {{ $value |
humanize }}% of compactions.
expr: |
(
sum by (job) (rate(thanos_compact_group_compactions_failures_total{job=~"thanos-compactor.*"}[5m]))
Expand All @@ -32,7 +32,7 @@ groups:
severity: warning
- alert: ThanosCompactorBucketHighOperationFailures
annotations:
message: Thanos Compact {{$labels.job}} Bucket is failing to execute {{ $value
message: Thanos Compactor {{$labels.job}} Bucket is failing to execute {{ $value
| humanize }}% of operations.
expr: |
(
Expand All @@ -46,7 +46,7 @@ groups:
severity: warning
- alert: ThanosCompactorHasNotRun
annotations:
message: Thanos Compact {{$labels.job}} has not uploaded anything for 24 hours.
message: Thanos Compactor {{$labels.job}} has not uploaded anything for 24 hours.
expr: (time() - max(thanos_objstore_bucket_last_successful_upload_time{job=~"thanos-compactor.*"}))
/ 60 / 60 > 24
labels:
Expand Down
2 changes: 1 addition & 1 deletion examples/dashboards/overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@
"repeatIteration": null,
"repeatRowId": null,
"showTitle": true,
"title": "Compact",
"title": "Compactor",
"titleSize": "h6"
}
],
Expand Down
14 changes: 7 additions & 7 deletions mixin/thanos/alerts/compactor.libsonnet
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
local thanos = self,
compactor+:: {
jobPrefix: error 'must provide job prefix for Thanos Compact alerts',
selector: error 'must provide selector for Thanos Compact alerts',
jobPrefix: error 'must provide job prefix for Thanos Compactor alerts',
selector: error 'must provide selector for Thanos Compactor alerts',
},
prometheusAlerts+:: {
groups+: [
Expand All @@ -12,7 +12,7 @@
{
alert: 'ThanosCompactorMultipleCompactsAreRunning',
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

annotations: {
message: 'You should never run more than one Thanos Compact at once. You have {{ $value }}',
message: 'You should never run more than one Thanos Compactor at once. You have {{ $value }}',
},
expr: 'sum(up{%(selector)s}) > 1' % thanos.compactor,
'for': '5m',
Expand All @@ -23,7 +23,7 @@
{
alert: 'ThanosCompactorHalted',
annotations: {
message: 'Thanos Compact {{$labels.job}} has failed to run and now is halted.',
message: 'Thanos Compactor {{$labels.job}} has failed to run and now is halted.',
},
expr: 'thanos_compactor_halted{%(selector)s} == 1' % thanos.compactor,
'for': '5m',
Expand All @@ -34,7 +34,7 @@
{
alert: 'ThanosCompactorHighCompactionFailures',
annotations: {
message: 'Thanos Compact {{$labels.job}} is failing to execute {{ $value | humanize }}% of compactions.',
message: 'Thanos Compactor {{$labels.job}} is failing to execute {{ $value | humanize }}% of compactions.',
},
expr: |||
(
Expand All @@ -52,7 +52,7 @@
{
alert: 'ThanosCompactorBucketHighOperationFailures',
annotations: {
message: 'Thanos Compact {{$labels.job}} Bucket is failing to execute {{ $value | humanize }}% of operations.',
message: 'Thanos Compactor {{$labels.job}} Bucket is failing to execute {{ $value | humanize }}% of operations.',
},
expr: |||
(
Expand All @@ -70,7 +70,7 @@
{
alert: 'ThanosCompactorHasNotRun',
annotations: {
message: 'Thanos Compact {{$labels.job}} has not uploaded anything for 24 hours.',
message: 'Thanos Compactor {{$labels.job}} has not uploaded anything for 24 hours.',
},
expr: '(time() - max(thanos_objstore_bucket_last_successful_upload_time{%(selector)s})) / 60 / 60 > 24' % thanos.compactor,
labels: {
Expand Down
8 changes: 4 additions & 4 deletions mixin/thanos/dashboards/compactor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet';
{
local thanos = self,
compactor+:: {
jobPrefix: error 'must provide job prefix for Thanos Compact dashboard',
selector: error 'must provide selector for Thanos Compact dashboard',
title: error 'must provide title for Thanos Compact dashboard',
jobPrefix: error 'must provide job prefix for Thanos Compactor dashboard',
selector: error 'must provide selector for Thanos Compactor dashboard',
title: error 'must provide title for Thanos Compactor dashboard',
},
grafanaDashboards+:: {
'compactor.json':
Expand Down Expand Up @@ -135,7 +135,7 @@ local g = import '../lib/thanos-grafana-builder/builder.libsonnet';
g.template('pod', 'kube_pod_info', 'namespace="$namespace",created_by_name=~"%(jobPrefix)s.*"' % thanos.compactor, true, '.*'),

__overviewRows__+:: [
g.row('Compact')
g.row('Compactor')
.addPanel(
g.panel(
'Compaction Rate',
Expand Down