diff --git a/jvm-mixin/.lint b/jvm-mixin/.lint index 91f57653f..eabfdd70e 100644 --- a/jvm-mixin/.lint +++ b/jvm-mixin/.lint @@ -1,13 +1,8 @@ exclusions: - panel-title-description-rule: - reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion" + panel-datasource-rule: + entries: + - panel: GC duration + - panel: Allocated/promoted panel-units-rule: - reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion" - template-datasource-rule: - reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion" - template-instance-rule: - reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion" - template-job-rule: - reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion" - template-on-time-change-reload-rule: - reason: "mixtool upgrade made this rule stricter. TODO: Fix errors and remove the warning exclusion" + entries: + - panel: Process files open diff --git a/jvm-mixin/config.libsonnet b/jvm-mixin/config.libsonnet index 6521f7fe9..cacfffd9b 100644 --- a/jvm-mixin/config.libsonnet +++ b/jvm-mixin/config.libsonnet @@ -1,5 +1,5 @@ { - filteringSelector: 'job!=""', + filteringSelector: '', groupLabels: ['job'], instanceLabels: ['instance'], uid: 'jvm', diff --git a/jvm-observ-lib/config.libsonnet b/jvm-observ-lib/config.libsonnet index c16a36581..5f265a1f1 100644 --- a/jvm-observ-lib/config.libsonnet +++ b/jvm-observ-lib/config.libsonnet @@ -1,6 +1,6 @@ { local this = self, - filteringSelector: 'job!=""', + filteringSelector: '', // set to apply static filters to all queries and alerts, i.e. job="bar" groupLabels: ['job'], instanceLabels: ['instance'], uid: 'jvm', diff --git a/kafka-observ-lib/config.libsonnet b/kafka-observ-lib/config.libsonnet index d6c0e07e1..1b1bbadf0 100644 --- a/kafka-observ-lib/config.libsonnet +++ b/kafka-observ-lib/config.libsonnet @@ -1,6 +1,6 @@ { local this = self, - filteringSelector: 'job!=""', + filteringSelector: '', // set to apply static filters to all queries and alerts, i.e. job="integrations/kafka" zookeeperfilteringSelector: this.filteringSelector, groupLabels: ['kafka_cluster'], // label(s) that defines kafka cluster instanceLabels: ['instance'], // label(s) that defines single broker diff --git a/kafka-observ-lib/signals/consumerGroup.libsonnet b/kafka-observ-lib/signals/consumerGroup.libsonnet index 950999533..8141b5cbd 100644 --- a/kafka-observ-lib/signals/consumerGroup.libsonnet +++ b/kafka-observ-lib/signals/consumerGroup.libsonnet @@ -2,7 +2,7 @@ local commonlib = import 'common-lib/common/main.libsonnet'; function(this) { - filteringSelector: std.join(',', [this.filteringSelector, this.topicsFilteringSelector, this.consumerGroupFilteringSelector]), + filteringSelector: std.join(',', [this.topicsFilteringSelector, this.consumerGroupFilteringSelector, this.filteringSelector]), groupLabels: this.groupLabels, instanceLabels: ['topic', 'consumergroup'], // this.instanceLabels is ommitted, as it would point to kafka_exporter instance. aggLevel: 'group', diff --git a/kafka-observ-lib/signals/topic.libsonnet b/kafka-observ-lib/signals/topic.libsonnet index 01c92b3ad..53562f454 100644 --- a/kafka-observ-lib/signals/topic.libsonnet +++ b/kafka-observ-lib/signals/topic.libsonnet @@ -2,7 +2,7 @@ local commonlib = import 'common-lib/common/main.libsonnet'; function(this) { - filteringSelector: std.join(',', [this.filteringSelector, this.topicsFilteringSelector]), + filteringSelector: std.join(',', [this.topicsFilteringSelector, this.filteringSelector]), groupLabels: this.groupLabels, instanceLabels: ['topic'], // this.instanceLabels is ommitted, as it would point to kafka_exporter instance. aggLevel: 'group', diff --git a/kafka-observ-lib/signals/totalTime.libsonnet b/kafka-observ-lib/signals/totalTime.libsonnet index 3cd481a8f..8155d3738 100644 --- a/kafka-observ-lib/signals/totalTime.libsonnet +++ b/kafka-observ-lib/signals/totalTime.libsonnet @@ -3,7 +3,7 @@ local commonlib = import 'common-lib/common/main.libsonnet'; // TotalTimeMs metric function(this) { - filteringSelector: this.filteringSelector + ', quantile="%s"' % this.totalTimeMsQuantile, + filteringSelector: ('quantile="%s"' % this.totalTimeMsQuantile) + ',' + this.filteringSelector, groupLabels: this.groupLabels, instanceLabels: this.instanceLabels, aggLevel: if this.totalTimeMetricsRepeat then 'instance' else 'group', diff --git a/kafka-observ-lib/signals/zookeeperClient.libsonnet b/kafka-observ-lib/signals/zookeeperClient.libsonnet index f90a1ae9f..a37289f2b 100644 --- a/kafka-observ-lib/signals/zookeeperClient.libsonnet +++ b/kafka-observ-lib/signals/zookeeperClient.libsonnet @@ -2,7 +2,7 @@ local commonlib = import 'common-lib/common/main.libsonnet'; function(this) { - filteringSelector: this.filteringSelector + ', quantile="%s"' % this.zookeeperClientQuantile, + filteringSelector: ('quantile="%s"' % this.zookeeperClientQuantile) + ',' + this.filteringSelector, groupLabels: this.groupLabels, instanceLabels: this.instanceLabels, aggLevel: 'instance', diff --git a/process-observ-lib/config.libsonnet b/process-observ-lib/config.libsonnet index d353e9b55..8e6a08b38 100644 --- a/process-observ-lib/config.libsonnet +++ b/process-observ-lib/config.libsonnet @@ -6,7 +6,7 @@ // 'instanceLabels' - one or more labels that can be used to identify single entity of instances. In simple cases, can be 'instance' or 'pod'. // 'uid' - UID to prefix all dashboards original uids local this = self, - filteringSelector: 'job!=""', + filteringSelector: '', // set to apply static filters to all queries and alerts, i.e. job="bar" groupLabels: ['job'], instanceLabels: ['instance'], dashboardTags: [self.uid], diff --git a/windows-mixin/config.libsonnet b/windows-mixin/config.libsonnet index 5af187a1a..5d9a74d6f 100644 --- a/windows-mixin/config.libsonnet +++ b/windows-mixin/config.libsonnet @@ -5,7 +5,7 @@ // labels to identify single windows host: instanceLabels: ['instance'], // selector to include in all queries(including alerts) - filteringSelector: 'job=~".*windows.*"', + filteringSelector: '', // prefix all dashboards uids and alert groups uid: 'windows', // prefix dashboards titles diff --git a/windows-observ-lib/alerts.libsonnet b/windows-observ-lib/alerts.libsonnet index d6774b19a..7ed3e4238 100644 --- a/windows-observ-lib/alerts.libsonnet +++ b/windows-observ-lib/alerts.libsonnet @@ -80,7 +80,7 @@ { alert: 'WindowsCPUHighUsage', expr: ||| - 100 - (avg without (mode, core) (rate(windows_cpu_time_total{%(filteringSelector)s, mode="idle"}[2m])) * 100) > %(alertsCPUThresholdWarning)s + 100 - (avg without (mode, core) (rate(windows_cpu_time_total{mode="idle", %(filteringSelector)s}[2m])) * 100) > %(alertsCPUThresholdWarning)s ||| % this.config, 'for': '15m', keep_firing_for: '5m', @@ -133,7 +133,7 @@ { alert: 'WindowsServiceNotHealthy', expr: ||| - windows_service_status{%(filteringSelector)s, status!~"starting|stopping|ok"} > 0 + windows_service_status{status!~"starting|stopping|ok", %(filteringSelector)s} > 0 ||| % this.config, 'for': '5m', labels: { @@ -150,7 +150,7 @@ { alert: 'WindowsDiskDriveNotHealthy', expr: ||| - windows_disk_drive_status{%(filteringSelector)s, status="OK"} != 1 + windows_disk_drive_status{status="OK", %(filteringSelector)s} != 1 ||| % this.config, 'for': '5m', labels: { diff --git a/windows-observ-lib/config.libsonnet b/windows-observ-lib/config.libsonnet index 8ff0a6e0b..cd603b7ed 100644 --- a/windows-observ-lib/config.libsonnet +++ b/windows-observ-lib/config.libsonnet @@ -7,7 +7,7 @@ // 'uid' - UID to prefix all dashboards original uids groupLabels: ['job'], instanceLabels: ['instance'], - filteringSelector: 'job=~".*windows.*"', + filteringSelector: '', // set to apply static filters to all queries and alerts, i.e. job="windows" dashboardTags: ['windows'], uid: 'windows', dashboardNamePrefix: '', diff --git a/zookeeper-observ-lib/config.libsonnet b/zookeeper-observ-lib/config.libsonnet index 0e65a2ca1..7249516dc 100644 --- a/zookeeper-observ-lib/config.libsonnet +++ b/zookeeper-observ-lib/config.libsonnet @@ -1,6 +1,6 @@ { local this = self, - filteringSelector: 'job!=""', + filteringSelector: '', // set to apply static filters to all queries and alerts, i.e. job="bar" groupLabels: ['job'], instanceLabels: ['instance'], uid: 'zookeeper',