From b989b25b51f483a3a8261144db805514fc89607c Mon Sep 17 00:00:00 2001 From: rlaisqls Date: Fri, 1 Dec 2023 19:29:39 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=80=20::=20loki=20chart=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/loki-stack/Chart.yaml | 4 +- apps/loki-stack/values.yaml | 12 +- charts/loki/.gitignore | 1 - charts/loki/.helmignore | 32 - charts/loki/CHANGELOG.md | 392 -- charts/loki/Chart.yaml | 26 - charts/loki/Makefile | 7 - charts/loki/README.md | 20 - charts/loki/README.md.gotmpl | 11 - charts/loki/ci/default-values.yaml | 18 - charts/loki/ci/enterprise.yaml | 35 - charts/loki/ci/ingress-values.yaml | 26 - charts/loki/docs/examples/README.md | 4 - .../loki/docs/examples/enterprise/README.md | 28 - .../enterprise/enterprise-secrets.yaml | 12 - .../enterprise/overrides-enterprise-gcs.yaml | 83 - charts/loki/docs/examples/oss/README.md | 20 - .../loki/docs/examples/oss/oss-secrets.yaml | 10 - .../docs/examples/oss/overrides-oss-gcs.yaml | 77 - charts/loki/reference.md.gotmpl | 49 - charts/loki/src/.yamllint.yaml | 4 - charts/loki/src/alerts.yaml.tpl | 68 - charts/loki/src/dashboards/loki-chunks.json | 1336 ---- charts/loki/src/dashboards/loki-deletion.json | 632 -- charts/loki/src/dashboards/loki-logs.json | 1073 --- .../loki-mixin-recording-rules.json | 657 -- .../loki/src/dashboards/loki-operational.json | 6173 ----------------- .../src/dashboards/loki-reads-resources.json | 964 --- charts/loki/src/dashboards/loki-reads.json | 504 -- .../loki/src/dashboards/loki-retention.json | 1537 ---- .../src/dashboards/loki-writes-resources.json | 700 -- charts/loki/src/dashboards/loki-writes.json | 504 -- charts/loki/src/helm-test/Dockerfile | 13 - charts/loki/src/helm-test/README.md | 7 - charts/loki/src/helm-test/canary_test.go | 105 - charts/loki/src/helm-test/default.nix | 27 - charts/loki/src/rules.yaml.tpl | 86 - charts/loki/templates/NOTES.txt | 25 - charts/loki/templates/_helpers.tpl | 808 --- .../templates/backend/_helpers-backend.tpl | 32 - .../loki/templates/backend/clusterrole.yaml | 20 - .../templates/backend/clusterrolebinding.yaml | 24 - charts/loki/templates/backend/hpa.yaml | 50 - .../backend/poddisruptionbudget-backend.yaml | 15 - .../backend/query-scheduler-discovery.yaml | 26 - .../backend/service-backend-headless.yaml | 40 - .../templates/backend/service-backend.yaml | 37 - .../backend/statefulset-backend.yaml | 276 - charts/loki/templates/config.yaml | 21 - charts/loki/templates/extra-manifests.yaml | 4 - .../templates/gateway/_helpers-gateway.tpl | 47 - .../templates/gateway/configmap-gateway.yaml | 12 - .../templates/gateway/deployment-gateway.yaml | 131 - charts/loki/templates/gateway/hpa.yaml | 50 - .../templates/gateway/ingress-gateway.yaml | 59 - .../gateway/poddisruptionbudget-gateway.yaml | 19 - .../templates/gateway/secret-gateway.yaml | 14 - .../templates/gateway/service-gateway.yaml | 40 - charts/loki/templates/ingress.yaml | 40 - .../loki/templates/loki-canary/_helpers.tpl | 40 - .../loki/templates/loki-canary/daemonset.yaml | 111 - .../loki/templates/loki-canary/service.yaml | 34 - .../templates/loki-canary/serviceaccount.yaml | 21 - .../monitoring/_helpers-monitoring.tpl | 47 - .../dashboards/_helpers-dashboards.tpl | 6 - .../monitoring/dashboards/configmap-1.yaml | 31 - .../monitoring/dashboards/configmap-2.yaml | 31 - .../templates/monitoring/grafana-agent.yaml | 91 - .../templates/monitoring/logs-instance.yaml | 29 - .../templates/monitoring/loki-alerts.yaml | 22 - .../loki/templates/monitoring/loki-rules.yaml | 23 - .../monitoring/metrics-instance.yaml | 30 - .../loki/templates/monitoring/pod-logs.yaml | 56 - .../templates/monitoring/servicemonitor.yaml | 60 - charts/loki/templates/networkpolicy.yaml | 205 - charts/loki/templates/podsecuritypolicy.yaml | 41 - .../loki/templates/provisioner/_helpers.yaml | 32 - .../provisioner/job-provisioner.yaml | 137 - .../provisioner/role-provisioner.yaml | 21 - .../provisioner/rolebinding-provisioner.yaml | 26 - .../serviceaccount-provisioner.yaml | 18 - charts/loki/templates/read/_helpers-read.tpl | 32 - .../loki/templates/read/deployment-read.yaml | 161 - charts/loki/templates/read/hpa.yaml | 55 - .../read/poddisruptionbudget-read.yaml | 15 - .../templates/read/service-read-headless.yaml | 41 - charts/loki/templates/read/service-read.yaml | 37 - .../loki/templates/read/statefulset-read.yaml | 186 - charts/loki/templates/role.yaml | 36 - charts/loki/templates/rolebinding.yaml | 17 - charts/loki/templates/runtime-configmap.yaml | 10 - charts/loki/templates/secret-license.yaml | 11 - .../templates/securitycontextconstraints.yaml | 40 - charts/loki/templates/service-memberlist.yaml | 22 - charts/loki/templates/serviceaccount.yaml | 21 - .../single-binary/_helpers-single-binary.tpl | 34 - charts/loki/templates/single-binary/hpa.yaml | 51 - charts/loki/templates/single-binary/pdb.yaml | 16 - .../single-binary/service-headless.yaml | 35 - .../loki/templates/single-binary/service.yaml | 40 - .../templates/single-binary/statefulset.yaml | 195 - .../table-manager/_helpers-table-manager.tpl | 32 - .../deployment-table-manager.yaml | 118 - .../table-manager/service-table-manager.yaml | 36 - .../servicemonitor-table-manager.yaml | 57 - charts/loki/templates/tests/_helpers.tpl | 16 - charts/loki/templates/tests/test-canary.yaml | 34 - charts/loki/templates/tokengen/_helpers.yaml | 22 - .../tokengen/clusterrole-tokengen.yaml | 21 - .../tokengen/clusterrolebinding-tokengen.yaml | 25 - .../loki/templates/tokengen/job-tokengen.yaml | 141 - .../tokengen/serviceaccount-tokengen.yaml | 18 - charts/loki/templates/validate.yaml | 27 - .../loki/templates/write/_helpers-write.tpl | 32 - charts/loki/templates/write/hpa.yaml | 50 - .../write/poddisruptionbudget-write.yaml | 14 - .../write/service-write-headless.yaml | 40 - .../loki/templates/write/service-write.yaml | 36 - .../templates/write/statefulset-write.yaml | 204 - charts/loki/values.yaml | 1556 ----- 120 files changed, 11 insertions(+), 21682 deletions(-) delete mode 100644 charts/loki/.gitignore delete mode 100644 charts/loki/.helmignore delete mode 100644 charts/loki/CHANGELOG.md delete mode 100644 charts/loki/Chart.yaml delete mode 100644 charts/loki/Makefile delete mode 100644 charts/loki/README.md delete mode 100644 charts/loki/README.md.gotmpl delete mode 100644 charts/loki/ci/default-values.yaml delete mode 100644 charts/loki/ci/enterprise.yaml delete mode 100644 charts/loki/ci/ingress-values.yaml delete mode 100644 charts/loki/docs/examples/README.md delete mode 100644 charts/loki/docs/examples/enterprise/README.md delete mode 100644 charts/loki/docs/examples/enterprise/enterprise-secrets.yaml delete mode 100644 charts/loki/docs/examples/enterprise/overrides-enterprise-gcs.yaml delete mode 100644 charts/loki/docs/examples/oss/README.md delete mode 100644 charts/loki/docs/examples/oss/oss-secrets.yaml delete mode 100644 charts/loki/docs/examples/oss/overrides-oss-gcs.yaml delete mode 100644 charts/loki/reference.md.gotmpl delete mode 100644 charts/loki/src/.yamllint.yaml delete mode 100644 charts/loki/src/alerts.yaml.tpl delete mode 100644 charts/loki/src/dashboards/loki-chunks.json delete mode 100644 charts/loki/src/dashboards/loki-deletion.json delete mode 100644 charts/loki/src/dashboards/loki-logs.json delete mode 100644 charts/loki/src/dashboards/loki-mixin-recording-rules.json delete mode 100644 charts/loki/src/dashboards/loki-operational.json delete mode 100644 charts/loki/src/dashboards/loki-reads-resources.json delete mode 100644 charts/loki/src/dashboards/loki-reads.json delete mode 100644 charts/loki/src/dashboards/loki-retention.json delete mode 100644 charts/loki/src/dashboards/loki-writes-resources.json delete mode 100644 charts/loki/src/dashboards/loki-writes.json delete mode 100644 charts/loki/src/helm-test/Dockerfile delete mode 100644 charts/loki/src/helm-test/README.md delete mode 100644 charts/loki/src/helm-test/canary_test.go delete mode 100644 charts/loki/src/helm-test/default.nix delete mode 100644 charts/loki/src/rules.yaml.tpl delete mode 100644 charts/loki/templates/NOTES.txt delete mode 100644 charts/loki/templates/_helpers.tpl delete mode 100644 charts/loki/templates/backend/_helpers-backend.tpl delete mode 100644 charts/loki/templates/backend/clusterrole.yaml delete mode 100644 charts/loki/templates/backend/clusterrolebinding.yaml delete mode 100644 charts/loki/templates/backend/hpa.yaml delete mode 100644 charts/loki/templates/backend/poddisruptionbudget-backend.yaml delete mode 100644 charts/loki/templates/backend/query-scheduler-discovery.yaml delete mode 100644 charts/loki/templates/backend/service-backend-headless.yaml delete mode 100644 charts/loki/templates/backend/service-backend.yaml delete mode 100644 charts/loki/templates/backend/statefulset-backend.yaml delete mode 100644 charts/loki/templates/config.yaml delete mode 100644 charts/loki/templates/extra-manifests.yaml delete mode 100644 charts/loki/templates/gateway/_helpers-gateway.tpl delete mode 100644 charts/loki/templates/gateway/configmap-gateway.yaml delete mode 100644 charts/loki/templates/gateway/deployment-gateway.yaml delete mode 100644 charts/loki/templates/gateway/hpa.yaml delete mode 100644 charts/loki/templates/gateway/ingress-gateway.yaml delete mode 100644 charts/loki/templates/gateway/poddisruptionbudget-gateway.yaml delete mode 100644 charts/loki/templates/gateway/secret-gateway.yaml delete mode 100644 charts/loki/templates/gateway/service-gateway.yaml delete mode 100644 charts/loki/templates/ingress.yaml delete mode 100644 charts/loki/templates/loki-canary/_helpers.tpl delete mode 100644 charts/loki/templates/loki-canary/daemonset.yaml delete mode 100644 charts/loki/templates/loki-canary/service.yaml delete mode 100644 charts/loki/templates/loki-canary/serviceaccount.yaml delete mode 100644 charts/loki/templates/monitoring/_helpers-monitoring.tpl delete mode 100644 charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl delete mode 100644 charts/loki/templates/monitoring/dashboards/configmap-1.yaml delete mode 100644 charts/loki/templates/monitoring/dashboards/configmap-2.yaml delete mode 100644 charts/loki/templates/monitoring/grafana-agent.yaml delete mode 100644 charts/loki/templates/monitoring/logs-instance.yaml delete mode 100644 charts/loki/templates/monitoring/loki-alerts.yaml delete mode 100644 charts/loki/templates/monitoring/loki-rules.yaml delete mode 100644 charts/loki/templates/monitoring/metrics-instance.yaml delete mode 100644 charts/loki/templates/monitoring/pod-logs.yaml delete mode 100644 charts/loki/templates/monitoring/servicemonitor.yaml delete mode 100644 charts/loki/templates/networkpolicy.yaml delete mode 100644 charts/loki/templates/podsecuritypolicy.yaml delete mode 100644 charts/loki/templates/provisioner/_helpers.yaml delete mode 100644 charts/loki/templates/provisioner/job-provisioner.yaml delete mode 100644 charts/loki/templates/provisioner/role-provisioner.yaml delete mode 100644 charts/loki/templates/provisioner/rolebinding-provisioner.yaml delete mode 100644 charts/loki/templates/provisioner/serviceaccount-provisioner.yaml delete mode 100644 charts/loki/templates/read/_helpers-read.tpl delete mode 100644 charts/loki/templates/read/deployment-read.yaml delete mode 100644 charts/loki/templates/read/hpa.yaml delete mode 100644 charts/loki/templates/read/poddisruptionbudget-read.yaml delete mode 100644 charts/loki/templates/read/service-read-headless.yaml delete mode 100644 charts/loki/templates/read/service-read.yaml delete mode 100644 charts/loki/templates/read/statefulset-read.yaml delete mode 100644 charts/loki/templates/role.yaml delete mode 100644 charts/loki/templates/rolebinding.yaml delete mode 100644 charts/loki/templates/runtime-configmap.yaml delete mode 100644 charts/loki/templates/secret-license.yaml delete mode 100644 charts/loki/templates/securitycontextconstraints.yaml delete mode 100644 charts/loki/templates/service-memberlist.yaml delete mode 100644 charts/loki/templates/serviceaccount.yaml delete mode 100644 charts/loki/templates/single-binary/_helpers-single-binary.tpl delete mode 100644 charts/loki/templates/single-binary/hpa.yaml delete mode 100644 charts/loki/templates/single-binary/pdb.yaml delete mode 100644 charts/loki/templates/single-binary/service-headless.yaml delete mode 100644 charts/loki/templates/single-binary/service.yaml delete mode 100644 charts/loki/templates/single-binary/statefulset.yaml delete mode 100644 charts/loki/templates/table-manager/_helpers-table-manager.tpl delete mode 100644 charts/loki/templates/table-manager/deployment-table-manager.yaml delete mode 100644 charts/loki/templates/table-manager/service-table-manager.yaml delete mode 100644 charts/loki/templates/table-manager/servicemonitor-table-manager.yaml delete mode 100644 charts/loki/templates/tests/_helpers.tpl delete mode 100644 charts/loki/templates/tests/test-canary.yaml delete mode 100644 charts/loki/templates/tokengen/_helpers.yaml delete mode 100644 charts/loki/templates/tokengen/clusterrole-tokengen.yaml delete mode 100644 charts/loki/templates/tokengen/clusterrolebinding-tokengen.yaml delete mode 100644 charts/loki/templates/tokengen/job-tokengen.yaml delete mode 100644 charts/loki/templates/tokengen/serviceaccount-tokengen.yaml delete mode 100644 charts/loki/templates/validate.yaml delete mode 100644 charts/loki/templates/write/_helpers-write.tpl delete mode 100644 charts/loki/templates/write/hpa.yaml delete mode 100644 charts/loki/templates/write/poddisruptionbudget-write.yaml delete mode 100644 charts/loki/templates/write/service-write-headless.yaml delete mode 100644 charts/loki/templates/write/service-write.yaml delete mode 100644 charts/loki/templates/write/statefulset-write.yaml delete mode 100644 charts/loki/values.yaml diff --git a/apps/loki-stack/Chart.yaml b/apps/loki-stack/Chart.yaml index f036643b..73573634 100644 --- a/apps/loki-stack/Chart.yaml +++ b/apps/loki-stack/Chart.yaml @@ -7,8 +7,8 @@ description: A Helm chart for loki-stack home: https://github.com/grafana dependencies: - name: "loki" - repository: "https://team-xquare.github.io/k8s-resource" - version: "5.20.3" + repository: "https://grafana.github.io/helm-charts" + version: "5.26.0" - name: "promtail" repository: "https://grafana.github.io/helm-charts" version: "6.15.1" \ No newline at end of file diff --git a/apps/loki-stack/values.yaml b/apps/loki-stack/values.yaml index dc3cc6bd..cc2f3713 100644 --- a/apps/loki-stack/values.yaml +++ b/apps/loki-stack/values.yaml @@ -37,7 +37,9 @@ loki: backend: replicas: 3 persistence: - enabled: false + volumeClaimsEnabled: false + dataVolumeParameters: + emptyDir: {} resources: requests: cpu: 10m @@ -48,10 +50,14 @@ loki: requests: cpu: 10m memory: 64Mi + persistence: + volumeClaimsEnabled: false + dataVolumeParameters: + emptyDir: {} + deployment: + isScalable: true read: replicas: 3 - persistence: - enabled: false resources: requests: cpu: 10m diff --git a/charts/loki/.gitignore b/charts/loki/.gitignore deleted file mode 100644 index ee3892e8..00000000 --- a/charts/loki/.gitignore +++ /dev/null @@ -1 +0,0 @@ -charts/ diff --git a/charts/loki/.helmignore b/charts/loki/.helmignore deleted file mode 100644 index 6d907238..00000000 --- a/charts/loki/.helmignore +++ /dev/null @@ -1,32 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ - -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ - -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ - -# Other -doc.yaml -README.tpl -README.md.gotmpl -ci -CHANGELOG.md diff --git a/charts/loki/CHANGELOG.md b/charts/loki/CHANGELOG.md deleted file mode 100644 index 5383d2d2..00000000 --- a/charts/loki/CHANGELOG.md +++ /dev/null @@ -1,392 +0,0 @@ -# Changelog - -All notable changes to this library will be documented in this file. - -Entries should be ordered as follows: - -- [CHANGE] -- [FEATURE] -- [ENHANCEMENT] -- [BUGFIX] - -Entries should include a reference to the pull request that introduced the change. - -[//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) - -## 5.20.0 - -- [CHANGE] Changed version of Grafana Enterprise Logs to v1.8.0 - - -## 5.19.0 - -- [FEATURE] Add optional sidecard to load rules from ConfigMaps and Secrets. - -## 5.18.1 - -- [ENHANCEMENT] #8627 Add service labels and annotations for all services. -- [CHANGE] #8627 Move read, write and table manager labels from #component.serviceLabels to #component.service.labels to improve consistency. - -## 5.18.0 - -- [CHANGE] Changed version of Loki to 2.9.0 - - -## 5.17.0 - -- [CHANGE] Changed version of Loki to 2.9.0 - -## 5.16.1 - -- [BUGFIX] Increase default minReplicas to 2 and maxReplicas to 6 - -## 5.16.0 - -- [ENHANCEMENT] Add dnsConfig to values - -## 5.15.0 - -- [ENHANCEMENT] Add rbac.pspAnnotations to define PSP annotations - -## 5.14.1 - -- [BUGFIX] Use the correct name of the service inside the ingress. - -## 5.14.0 - -- [ENHANCEMENT] Make table_manager configuration toggle. - -## 5.13.0 - -- [ENHANCEMENT] Use "loki.clusterLabel" template for PodLogs cluster label - -## 5.12.0 - -- [ENHANCEMENT] Use tpl function in ingress and gateway-ingress for hosts - -## 5.11.0 - -- [CHANGE] Changed version of Loki to 2.8.4 - -## 5.10.0 - -- [CHANGE] Changed version of Grafana Enterprise Logs to v1.7.3 - -## 5.9.2 - -- [ENHANCEMENT] Add custom labels value for loki ingress - -## 5.9.1 - -- [BUGFIX] Fix loki helm chart helper function for loki.host to explicitly include gateway port - -## 5.9.0 - -- [CHANGE] Changed version of Loki to 2.8.3 - -## 5.8.11 - -- [BUGFIX] Fix gateway: Add `/config` proxy_pass to nginx configuration - -## 5.8.10 - -- [ENHANCEMENT] Canary labelname can now be configured via monitoring.lokiCanary.labelname - -## 5.8.9 - -- [BUGFIX] Fix loki/logs dashboard: allow querying multiple log level at once - -## 5.8.8 - -- [ENHANCEMENT] Add loki.storage.azure.endpointSuffix to support Azure private endpoint - -## 5.8.7 - -- [BUGFIX] Remove persistentVolumeClaimRetentionPolicy from single-binary StatefulSet when persistence is disabled - -## 5.8.6 - -- [ENHANCEMENT] Add serviceMonitor.metricRelabelings to support metric relabelings - -## 5.8.4 - -- [ENHANCEMENT] Add loki.lokiCanary.updateStrategy configuration - -## 5.8.3 - -- [ENHANCEMENT] Add priorityClassName for Grafana Agent and Loki Canary - -## 5.8.2 - -- [BUGFIX] Reference the correct configmap name for table manager - -## 5.8.1 - -- [BUGFIX] Fix config as a secret mount for single binary statefulset - -## 5.8.0 - -- [ENHANCEMENT] Add loki.memberlistConfig to fully control the memberlist configuration - -## 5.7.1 - -- [FEATURE] Add support for additional labels on loki-canary pods - -## 5.6.4 - -- [FEATURE] Make table manager retention options configurable in values - -## 5.6.3 - -- [BUGFIX] Fix configmap checksum in read statefulset template - -## 5.6.2 - -- [BUGFIX] Fix configmap checksum in table manager deployment template - -## 5.6.1 - -- [BUGFIX] Fix HPA for single binary deployment - -## 5.6.0 - -- [ENHANCEMENT] Add `gateway.ingress.labels` to values and ingress-gateway in helm chart. - -## 5.5.12 - -- [BUGFIX] Fix checksum annotation for config in single binary - -## 5.5.11 - -- [BUGFIX] Add missing metrics section in backend hpa template - -## 5.5.10 - -- [CHANGE] Make the gateway listen on IPv6 as well as IPv4 - -## 5.5.9 - -- [FEATURE] Add `loki.configStorageType` & `loki.externalConfigSecretName` values to chart and templates. - -## 5.5.8 - -- [CHANGE] Add support for annotations on all Deployments and StatefulSets - -## 5.5.7 - -- [BUGFIX] Fix breaking helm upgrade by changing sts podManagementPolicy from Parallel to OrderedReady which fails since that field cannot be modified on sts. - -## 5.5.6 - -- [FEATURE] Add hpa templates for read, write and backend. - -## 5.5.5 - -- [BUGFIX] Quote tenantId value in logsInstance - -## 5.5.4 - -- [CHANGE] Add extraVolumeClaimTemplates for StatefulSet of the write component. - -## 5.5.3 - -- [BUGFIX] Fix issue in distribution of queries to available read pods by using k8s service for discovering query-scheduler replicas - -## 5.5.2 - -- [BUGFIX] Use $.Release.Namespace consistently -- [CHANGE] Add clusterLabelOverride for alert label overrides. -- [BUGFIX] Use $.Release.Namespace consistently - -## 5.5.1 - -- [FEATURE] Added ability to reference images by digest - -## 5.5.0 - -- [CHANGE] Changed version of Grafana Enterprise Logs to v1.7.2 - - -## 5.4.0 - -- [CHANGE] Changed version of Loki to 2.8.2 - - -- [CHANGE] Change default GEL and Loki versions to 1.7.1 and 2.8.1 respectively -- [BUGFIX] Fix dns port in network-policy - -## 4.10.0 - -- [CHANGE] Changed version of Grafana Enterprise Logs to v1.6.3 - -- [BUGFIX] Add projected volume type to psp - - -## 4.9.0 - -- [CHANGE] Changed version of Loki to 2.7.5 - - -- [BUGFIX] Fix role/PSP mapping - -- [BUGFIX] Fix service/ingress mapping - -## 4.8.0 - -- [CHANGE] Changed version of Grafana Enterprise Logs to v1.6.2 - -## 4.7 - -- [CHANGE] **BREAKING** Rename `gel-license.jwt` property of secret `gel-secrets` to `license.jwt` on enterprise-logs chart. - -## 4.6.2 - -- [BUGFIX] Fix tokengen and provisioner secrets creation on enterprise-logs chart. - -## 4.6.1 - -- [FEATURE] Add `gateway.nginxConfig.customReadUrl`, `gateway.nginxConfig.customWriteUrl` and `gateway.nginxConfig.customBackendUrl` to override read/write/backend paths. -- [BUGFIX] Remove unreleased setting `useFederatedToken` from Azure configuration block. - -## 4.6 - -- [Change] Bump Loki version to 2.7.3. Revert to 2 target simple scalable mode as default until third target ships in minor release. - -## 4.5.1 - -- [BUGFIX] Fix rendering of namespace in provisioner job. -- [ENHANCEMENT] Allow to configure `publishNotReadyAddresses` on memberlist service. -- [BUGFIX] Correctly set `compactor_address` for 3 target scalable configuration. - -## 4.5 - -- [ENHANCEMENT] Single binary mode is now possible for more than 1 replica, with a gateway and object storage backend. - -## 4.4.2 - -- [CHANGE] Bump Loki version to 2.7.2 and GEL version to 1.6.1 - -## 4.4.1 - -- [BUGFIX] Fix a few problems with the included dashboards and allow the rules to be created in a different namespace (which may be necessary based on how your Prometheus Operator is deployed). - -## 4.1.1 - -- [FEATURE] Added `loki.runtimeConfig` helm values to provide a reloadable runtime configuration. - -## 4.1 - -- [BUGFIX] Fix bug in provisioner job that caused the self-monitoring tenant secret to be created with an empty token. - -## 4.0 - -- [FEATURE] Added `enterprise.adminToken.additionalNamespaces` which are a list of additional namespaces to create secrets containing the GEL admin token in. This is especially useful if your Grafana instance is in another namespace. -- [CHANGE] **BREAKING** Remove `enterprise.nginxConfig.file`. Both enterprise and gateway configurations now share the same nginx config, use `gateway.nginxConfig.file` for both. Admin routes will 404 on OSS deployments. -- [CHANGE] **BREAKING** Default simple deployment mode to new, 3 target configuration (read, write, and backend). This new configuration allows the `read` target to be run as a deployment and auto-scaled. To go back to the legacy, 2 target configuration, set `read.legacyReadTraget` to `true`. -- [CHANGE] **BREAKING** Change how tenants are defined -- [CHANGE] **BREKAING** Remove `enterprise.adminTokenSecret`. This is now defined under `enterprise.adminToken.secret`. -- [CHANGE] **BREKAING** Rename and change format of `enterprise.provisioner.tenants`. Property has been renamed to `enterprise.provisioner.additionalTenants`, and is now an array of objects rather than string. Each object must contain a `name` and a `secretNamespace` field, where `name` is the name of the tenant and `secretNamespace` is the namespace to create the secret with the tenant's read and write token. -- [CHANGE] **BREAKING** Change the structure of `monitoring.selfMonitoring.tenant` from a string to an object. The new object must have a `name` and a `secretNamespace` field, where `name` is the name of the self-monitoring tenant and `secretNamespace` is the namespace to create an additional secret with the tenant's token. A secret will still also be created in the release namespace as it's needed by the Loki canary. -- [CHANGE] **BREAKING** Remove ability to create self-monitoring resources in different namespaces (with the exception of dashboard configmaps). - -## 3.10.0 - -- [CHANGE] Deprecate `enterprise.nginxConfig.file`. Both enterprise and gateway configurations now share the same nginx config. Admin routes will 404 on OSS deployments. Will be removed in version 4 of the chart, please use `gateway.nginxConfig.file` for both OSS and Enterprise gateways. -- [FEATURE] Added new simple deployment target `backend`. Running 3 targets for simple deployment will soon be the default in Loki. This new target allows the `read` target to be run as a deployment and auto-scaled. - -## 3.9.0 - -- [BUGFIX] Fix race condition between minio create bucket job and enterprise tokengen job - -## 3.8.2 - -- [BUGFIX] Fix autoscaling/v2 template -- [FEATURE] Added `extraObjects` helm values to extra manifests. - -## 3.8.1 - -- [ENHANCEMENT] Add the ability to specify container lifecycle - -## 3.8.0 - -- [BUGFIX] Added `helm-weight` annotations to the tokengen and provisioner jobs to make sure tokengen always runs before provisioner - -## 3.7.0 - -**BREAKING**: Configuration values for Loki Canary moved from `monitoring.selfMonitoring.lokiCanary` to `monitoring.lokiCanary` - -- [ENHANCEMENT] Decouple the Loki Canary from the self-monitoring setup, which adds an unnecessary dependency on the Grafana Agent Operator. - -## 3.6.1 - -- [BUGFIX] Fix regression that produced empty PrometheusRule alerts resource - -## 3.6.0 - -- [CHANGE] Bump Loki version to 2.7.0 and GEL version to 1.6.0 - -## 3.5.0 - -- [FEATURE] Add support for azure blob storage - -## 3.4.3 - -- [ENHANCEMENT] Allow to change Loki `-target` argument -- [ENHANCEMENT] Add toggle for persistence disk in single-binary mode - -## 3.4.2 - -- [BUGFIX] Fix read-only /tmp in single-binary mode - -## 3.4.1 - -- [BUGFIX] Remove extra `/` in image name if `registry` or `repository` is empty - -## 3.4.0 - -- [ENHANCEMENT] Allow to add some selector for Loki persistent volume - -## 3.3.3 - -- [BUGFIX] Add missing label `prometheus.io/service-monitor: "false"` to single-binary headless service - -## 3.3.2 - -- [BUGFIX] Fixed indentation in single-binary pdb template - -## 3.3.1 - -- [BUGFIX] Fix invalid ruler config when filesystem storage is being used -- [BUGFIX] Fix ingress template to work with both deployment types (scalable and single binary) - -## 3.3.0 - -- [CHANGE] Remove ServiceMonitor and PrometheusRule CRD - -## 3.2.2 - -- [CHANGE] Add envFrom section to the tokengen job - -## 3.2.1 - -- [BUGFIX] Fixed k8s selectors in k8s Service for single-binary mode. - -## 3.2.0 - -- [CHANGE] Bump Grafana Enterprise Logs version to v1.5.2 - -## 3.1.0 - -- [FEATURE] Loki canary and GEL token provisioner added. The GEL token provisioner will provision a tenant and token to be used by the self-monitoring features (including the canary), as well as any additional tenants specified. A k8s secret will be created with a read and write token for each additional tenant specified. - -## 3.0.4 - -- [CHANGE] Default minio replicas to 1 node with 2 drives. The old config used the default, which was 16 nodes with 1 drive each. -- [BUGFIX] Minio subchart values `accessKey` and `secretKey` were removed in the new chart and replaced with `rootUser` and `rootPassword`. -- [CHANGE] The tokengen job no longer creates a `grafana-token`, as the base64 encoding was not working in a Grafana Enterprise GEL plugin installation. - -## 3.0.0 - -- [CHANGE] Loki helm chart was moved to this location in the Loki repo. The chart now supports both -[single binary](https://github.com/grafana/helm-charts/tree/main/charts/loki) and [simple scalable](https://github.com/grafana/helm-charts/tree/main/charts/loki-simple-scalable) deployment modes. For changes prior to version 3.0.0, please -look in the respective deprectated [single binary](https://github.com/grafana/helm-charts/tree/main/charts/loki) and [simple scalable](https://github.com/grafana/helm-charts/blob/main/charts/loki-simple-scalable/CHANGELOG.md) charts. diff --git a/charts/loki/Chart.yaml b/charts/loki/Chart.yaml deleted file mode 100644 index 11d88244..00000000 --- a/charts/loki/Chart.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v2 -name: loki -description: Helm chart for Grafana Loki in simple, scalable mode -type: application -appVersion: 2.9.0 -version: 5.20.3 -home: https://grafana.github.io/helm-charts -sources: - - https://github.com/grafana/loki - - https://grafana.com/oss/loki/ - - https://grafana.com/docs/loki/latest/ -icon: https://grafana.com/docs/loki/latest/logo_and_name.png -dependencies: - - name: minio - alias: minio - version: 4.0.12 - repository: https://charts.min.io/ - condition: minio.enabled - - name: grafana-agent-operator - alias: grafana-agent-operator - version: 0.2.16 - repository: https://grafana.github.io/helm-charts - condition: monitoring.selfMonitoring.grafanaAgent.installOperator -maintainers: - - name: trevorwhitney - - name: jeschkies diff --git a/charts/loki/Makefile b/charts/loki/Makefile deleted file mode 100644 index 4b56414d..00000000 --- a/charts/loki/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -.DEFAULT_GOAL := all -.PHONY: lint lint-yaml - -lint: lint-yaml - -lint-yaml: - yamllint -c $(CURDIR)/src/.yamllint.yaml $(CURDIR)/src diff --git a/charts/loki/README.md b/charts/loki/README.md deleted file mode 100644 index 003b4ccf..00000000 --- a/charts/loki/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# loki - -![Version: 5.20.0](https://img.shields.io/badge/Version-5.20.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.0](https://img.shields.io/badge/AppVersion-2.9.0-informational?style=flat-square) - -Helm chart for Grafana Loki in simple, scalable mode - -## Source Code - -* -* -* - -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://charts.min.io/ | minio(minio) | 4.0.12 | -| https://grafana.github.io/helm-charts | grafana-agent-operator(grafana-agent-operator) | 0.2.16 | - -Find more information in the Loki Helm Chart [documentation](https://grafana.com/docs/loki/next/installation/helm). diff --git a/charts/loki/README.md.gotmpl b/charts/loki/README.md.gotmpl deleted file mode 100644 index dcd57784..00000000 --- a/charts/loki/README.md.gotmpl +++ /dev/null @@ -1,11 +0,0 @@ -{{ template "chart.header" . }} - -{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} - -{{ template "chart.description" . }} - -{{ template "chart.sourcesSection" . }} - -{{ template "chart.requirementsSection" . }} - -Find more information in the Loki Helm Chart [documentation](https://grafana.com/docs/loki/next/installation/helm). diff --git a/charts/loki/ci/default-values.yaml b/charts/loki/ci/default-values.yaml deleted file mode 100644 index c143b416..00000000 --- a/charts/loki/ci/default-values.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -loki: - commonConfig: - replication_factor: 1 - image: - tag: "main-5e53303" -read: - replicas: 1 -write: - replicas: 1 -backend: - replicas: 1 -monitoring: - serviceMonitor: - labels: - release: "prometheus" -test: - prometheusAddress: "http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local.:9090" diff --git a/charts/loki/ci/enterprise.yaml b/charts/loki/ci/enterprise.yaml deleted file mode 100644 index 95f24946..00000000 --- a/charts/loki/ci/enterprise.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -enterprise: - enabled: true - config: | - auth: - type: trust - auth_enabled: false - cluster_name: {{ .Release.Name }} - license: - path: /etc/loki/license/license.jwt -loki: - commonConfig: - replication_factor: 1 - image: - tag: "main-5e53303" -storage: - type: local -read: - replicas: 1 -write: - replicas: 1 - persistence: - enabled: true - size: 100Mi -backend: - replicas: 1 - persistence: - enabled: true - size: 100Mi -monitoring: - serviceMonitor: - labels: - release: "prometheus" -test: - prometheusAddress: "http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local.:9090" diff --git a/charts/loki/ci/ingress-values.yaml b/charts/loki/ci/ingress-values.yaml deleted file mode 100644 index adff7851..00000000 --- a/charts/loki/ci/ingress-values.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -gateway: - ingress: - enabled: true - annotations: {} - hosts: - - host: gateway.loki.example.com - paths: - - path: / - pathType: Prefix -loki: - commonConfig: - replication_factor: 1 - image: - tag: "main-5e53303" -read: - replicas: 1 -write: - replicas: 1 -backend: - replicas: 1 -monitoring: - lokiCanary: - enabled: false -test: - enabled: false diff --git a/charts/loki/docs/examples/README.md b/charts/loki/docs/examples/README.md deleted file mode 100644 index 84cbae3e..00000000 --- a/charts/loki/docs/examples/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Introduction -The Helm Charts found under the examples directory are getting started examples which you can use to deploy Loki using the Simple Scalable architecture quickly. Currently, the examples include: -- [Deploying Grafana Enterprise Logs (Loki in Enterprise mode)](https://github.com/grafana/loki/tree/main/production/helm/loki/docs/examples/enterprise) -- [Deploying Loki OSS](https://github.com/grafana/loki/tree/main/production/helm/loki/docs/examples/oss) diff --git a/charts/loki/docs/examples/enterprise/README.md b/charts/loki/docs/examples/enterprise/README.md deleted file mode 100644 index d28b48ed..00000000 --- a/charts/loki/docs/examples/enterprise/README.md +++ /dev/null @@ -1,28 +0,0 @@ -## Introduction -This example gives you an example or getting started overrides value file for deploying Loki (Enterprise Licensed) using the Simple Scalable architecture in GKE and using GCS. - -## Installation of Helm Chart -These instructions assume you already have access to a Kubernetes cluster, GCS Bucket and GCP Service Account which has read/write permissions to that GCS Bucket. - -### Populate Secret Values -Populate the [enterprise-secrets.yaml](./enterprise-secrets.yaml) so that: -- The `gcp_service_account.json` secret has the contents of your GCP Service Account JSON key. -- The `license.jwt` secret has the contents of your Grafana Enterprise Logs license key given to your by Grafana Labs. - -Deploy the secrets file to your k8s cluster with the command: - -`kubectl apply -f enterprise-secrets.yaml` - -### Configure the Helm Chart -Open [overrides-enterprise-gcs.yaml](./overrides-enterprise-gcs.yaml) and replace `{YOUR_GCS_BUCKET}` with the name of your GCS bucket. If there are other things you'd like to configure, view the core [Values.yaml file](https://github.com/grafana/helm-charts/blob/main/charts/loki-simple-scalable/values.yaml) and override anything else you need to within the overrides-enterprise-gcs.yaml file. - -### Install the Helm chart - -`helm upgrade --install --values {PATH_TO_YOUR_OVERRIDES_YAML_FILE} {YOUR_RELEASE_NAME} grafana/loki-simple-scalable --namespace {KUBERNETES_NAMESPACE}` - -### Get the Token for Grafana to connect -`export POD_NAME=$(kubectl get pods --namespace {KUBERNETES_NAMESPACE} -l "job-name=enterprise-logs-tokengen" -o jsonpath="{.items[0].metadata.name}")` - -`kubectl --namespace {KUBERNETES_NAMESPACE} logs $POD_NAME loki | grep Token` - -Take note of this token, you will need it when connecting Grafana Enterprise Logs to Grafana. diff --git a/charts/loki/docs/examples/enterprise/enterprise-secrets.yaml b/charts/loki/docs/examples/enterprise/enterprise-secrets.yaml deleted file mode 100644 index 698e94b4..00000000 --- a/charts/loki/docs/examples/enterprise/enterprise-secrets.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: gel-secrets -type: Opaque -stringData: - gcp_service_account.json: | - { - GCP_SERVICE_ACCOUNT_JSON_HERE - } - - license.jwt: LICENSE_HERE diff --git a/charts/loki/docs/examples/enterprise/overrides-enterprise-gcs.yaml b/charts/loki/docs/examples/enterprise/overrides-enterprise-gcs.yaml deleted file mode 100644 index 01210d30..00000000 --- a/charts/loki/docs/examples/enterprise/overrides-enterprise-gcs.yaml +++ /dev/null @@ -1,83 +0,0 @@ -enterprise: - enabled: true - useExternalLicense: true - externalLicenseName: gel-secrets - tokengen: - env: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/gel_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: gel-secrets - mountPath: "/etc/gel_secrets" - extraVolumes: - - name: gel-secrets - secret: - secretName: gel-secrets - items: - - key: license.jwt - path: license.jwt - - key: gcp_service_account.json - path: gcp_service_account.json -loki: - auth_enabled: true - - storage: - type: gcs - bucketNames: - chunks: {YOUR_GCS_BUCKET} - ruler: {YOUR_GCS_BUCKET} - admin: {YOUR_GCS_BUCKET} - -minio: - enabled: false - -write: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/gel_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: gel-secrets - mountPath: "/etc/gel_secrets" - extraVolumes: - - name: gel-secrets - secret: - secretName: gel-secrets - items: - - key: license.jwt - path: license.jwt - - key: gcp_service_account.json - path: gcp_service_account.json - -read: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/gel_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: gel-secrets - mountPath: "/etc/gel_secrets" - extraVolumes: - - name: gel-secrets - secret: - secretName: gel-secrets - items: - - key: license.jwt - path: license.jwt - - key: gcp_service_account.json - path: gcp_service_account.json - -gateway: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/gel_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: gel-secrets - mountPath: "/etc/gel_secrets" - extraVolumes: - - name: gel-secrets - secret: - secretName: gel-secrets - items: - - key: license.jwt - path: license.jwt - - key: gcp_service_account.json - path: gcp_service_account.json diff --git a/charts/loki/docs/examples/oss/README.md b/charts/loki/docs/examples/oss/README.md deleted file mode 100644 index 0326de3f..00000000 --- a/charts/loki/docs/examples/oss/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## Introduction -This example gives you an example or getting started overrides value file for deploying Loki (OSS) using the Simple Scalable architecture in GKE and using GCS - -## Installation of Helm Chart -These instructions assume you have already have access to a Kubernetes cluster, GCS Bucket and GCP Service Account which has read/write permissions to that GCS Bucket. - -### Populate Secret Values -Populate the examples/enterprise/enterprise-secrets.yaml so that: -- The gcp_service_account.json secret has the contents of your GCP Service Account JSON key - -Deploy the secrets file to your k8s cluster. - -`kubectl apply -f loki-secrets.yaml` - -### Configure the Helm Chart -Open examples/enterprise/overides-oss-gcs.yaml and replace `{YOUR_GCS_BUCKET}` with the name of your GCS bucket. If there are other things you'd like to configure, view the core [Values.yaml file](https://github.com/grafana/helm-charts/blob/main/charts/loki-simple-scalable/values.yaml) and override anything else you need to within the overrides-enterprise-gcs.yaml file. - -### Install the Helm chart - -`helm upgrade --install --values {PATH_TO_YOUR_OVERRIDES_YAML_FILE} {YOUR_RELEASE_NAME} grafana/loki-simple-scalable --namespace {KUBERNETES_NAMESPACE}` diff --git a/charts/loki/docs/examples/oss/oss-secrets.yaml b/charts/loki/docs/examples/oss/oss-secrets.yaml deleted file mode 100644 index 4fbf5e70..00000000 --- a/charts/loki/docs/examples/oss/oss-secrets.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: loki-secrets -type: Opaque -stringData: - gcp_service_account.json: | - { - GCP_SERVICE_ACCOUNT_JSON_HERE - } \ No newline at end of file diff --git a/charts/loki/docs/examples/oss/overrides-oss-gcs.yaml b/charts/loki/docs/examples/oss/overrides-oss-gcs.yaml deleted file mode 100644 index 3e94f849..00000000 --- a/charts/loki/docs/examples/oss/overrides-oss-gcs.yaml +++ /dev/null @@ -1,77 +0,0 @@ -enterprise: - enabled: false - adminApi: - enabled: false - useExternalLicense: false - - config: | - admin_client: - storage: - gcs: - bucket_name: {YOUR_GCS_BUCKET} - auth: - type: trust - auth_enabled: false - cluster_name: loki-logs - -loki: - auth_enabled: false - - commonConfig: - path_prefix: /var/loki - replication_factor: 3 - - storage: - type: gcs - bucketNames: - chunks: {YOUR_GCS_BUCKET} - ruler: {YOUR_GCS_BUCKET} - admin: {YOUR_GCS_BUCKET} - -minio: - enabled: false - -write: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/loki_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: loki-secrets - mountPath: "/etc/loki_secrets" - extraVolumes: - - name: loki-secrets - secret: - secretName: loki-secrets - items: - - key: gcp_service_account.json - path: gcp_service_account.json - -read: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/loki_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: loki-secrets - mountPath: "/etc/loki_secrets" - extraVolumes: - - name: loki-secrets - secret: - secretName: loki-secrets - items: - - key: gcp_service_account.json - path: gcp_service_account.json - -gateway: - extraEnv: - - name: GOOGLE_APPLICATION_CREDENTIALS - value: "/etc/loki_secrets/gcp_service_account.json" - extraVolumeMounts: - - name: loki-secrets - mountPath: "/etc/loki_secrets" - extraVolumes: - - name: loki-secrets - secret: - secretName: loki-secrets - items: - - key: gcp_service_account.json - path: gcp_service_account.json diff --git a/charts/loki/reference.md.gotmpl b/charts/loki/reference.md.gotmpl deleted file mode 100644 index 0efc4927..00000000 --- a/charts/loki/reference.md.gotmpl +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Helm Chart Values -menuTitle: Helm chart values -description: Reference for Helm Chart values. -aliases: - - ../../../installation/helm/reference/ -weight: 500 -keywords: [] ---- - - - -# Helm Chart Values - - - - -This is the generated reference for the Loki Helm Chart values. - -> **Note:** This reference is for the Loki Helm chart version 3.0 or greater. -> If you are using the `grafana/loki-stack` Helm chart from the community repo, -> please refer to the `values.yaml` of the respective Github repository -> [grafana/helm-charts](https://github.com/grafana/helm-charts/tree/main/charts/loki-stack). - - -{{ define "chart.valuesTableHtml" }} -{{ `{{< responsive-table >}}` }} - - - - - - - - - {{- range .Values }} - - - - - - - {{- end }} - -
KeyTypeDescriptionDefault
{{ .Key }}{{ .Type }}{{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }}{{ template "chart.valueDefaultColumnRender" . }}
-{{ `{{< /responsive-table >}}` }} -{{ end }} - -{{ template "chart.valuesTableHtml" . }} diff --git a/charts/loki/src/.yamllint.yaml b/charts/loki/src/.yamllint.yaml deleted file mode 100644 index 19e5933a..00000000 --- a/charts/loki/src/.yamllint.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -rules: - quoted-strings: - required: true diff --git a/charts/loki/src/alerts.yaml.tpl b/charts/loki/src/alerts.yaml.tpl deleted file mode 100644 index 2171c948..00000000 --- a/charts/loki/src/alerts.yaml.tpl +++ /dev/null @@ -1,68 +0,0 @@ ---- -groups: - - name: "loki_alerts" - rules: - - alert: "LokiRequestErrors" - annotations: - message: | - {{`{{`}} $labels.job {{`}}`}} {{`{{`}} $labels.route {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}% errors. - expr: | - 100 * sum(rate(loki_request_duration_seconds_count{status_code=~"5.."}[2m])) by (namespace, job, route) - / - sum(rate(loki_request_duration_seconds_count[2m])) by (namespace, job, route) - > 10 - for: "15m" - labels: - severity: "critical" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} - - alert: "LokiRequestPanics" - annotations: - message: | - {{`{{`}} $labels.job {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}% increase of panics. - expr: | - sum(increase(loki_panic_total[10m])) by (namespace, job) > 0 - labels: - severity: "critical" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} - - alert: "LokiRequestLatency" - annotations: - message: | - {{`{{`}} $labels.job {{`}}`}} {{`{{`}} $labels.route {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}s 99th percentile latency. - expr: | - namespace_job_route:loki_request_duration_seconds:99quantile{route!~"(?i).*tail.*"} > 1 - for: "15m" - labels: - severity: "critical" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} - - alert: "LokiTooManyCompactorsRunning" - annotations: - message: | - {{`{{`}} $labels.cluster {{`}}`}} {{`{{`}} $labels.namespace {{`}}`}} has had {{`{{`}} printf "%.0f" $value {{`}}`}} compactors running for more than 5m. Only one compactor should run at a time. - expr: | - sum(loki_boltdb_shipper_compactor_running) by (namespace, cluster) > 1 - for: "5m" - labels: - severity: "warning" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} - - name: "loki_canaries_alerts" - rules: - - alert: "LokiCanaryLatency" - annotations: - message: | - {{`{{`}} $labels.job {{`}}`}} is experiencing {{`{{`}} printf "%.2f" $value {{`}}`}}s 99th percentile latency. - expr: | - histogram_quantile(0.99, sum(rate(loki_canary_response_latency_seconds_bucket[5m])) by (le, namespace, job)) > 5 - for: "15m" - labels: - severity: "warning" -{{- if .Values.monitoring.rules.additionalRuleLabels }} -{{ toYaml .Values.monitoring.rules.additionalRuleLabels | indent 10 }} -{{- end }} diff --git a/charts/loki/src/dashboards/loki-chunks.json b/charts/loki/src/dashboards/loki-chunks.json deleted file mode 100644 index 8f30328b..00000000 --- a/charts/loki/src/dashboards/loki-chunks.json +++ /dev/null @@ -1,1336 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "refresh": "10s", - "rows": [ - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(loki_ingester_memory_chunks{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "series", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Series", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(loki_ingester_memory_chunks{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}) / sum(loki_ingester_memory_streams{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "chunks", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunks per series", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Active Series / Chunks", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_utilization_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_ingester_chunk_utilization_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_ingester_chunk_utilization_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) * 1 / sum(rate(loki_ingester_chunk_utilization_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Utilization", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_age_seconds_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_ingester_chunk_age_seconds_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_ingester_chunk_age_seconds_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) * 1e3 / sum(rate(loki_ingester_chunk_age_seconds_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Age", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Flush Stats", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_entries_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_ingester_chunk_entries_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)) * 1", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_ingester_chunk_entries_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) * 1 / sum(rate(loki_ingester_chunk_entries_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Log Entries Per Chunk", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_chunk_store_index_entries_per_chunk_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m])) / sum(rate(loki_chunk_store_index_entries_per_chunk_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Index Entries", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Index Entries Per Chunk", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Flush Stats", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "cortex_ingester_flush_queue_length{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Queue Length", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { - "1xx": "#EAB839", - "2xx": "#7EB26D", - "3xx": "#6ED0E0", - "4xx": "#EF843C", - "5xx": "#E24D42", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_ingester_chunk_age_seconds_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Flush Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Flush Stats", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 9, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_ingester_chunks_flushed_total{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunks Flushed/Second", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (reason) (rate(loki_ingester_chunks_flushed_total{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) / ignoring(reason) group_left sum(rate(loki_ingester_chunks_flushed_total{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{reason}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunk Flush Reason", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": 1, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": 1, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Flush Stats", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "cards": { - "cardPadding": null, - "cardRound": null - }, - "color": { - "cardColor": "#b4ff00", - "colorScale": "sqrt", - "colorScheme": "interpolateSpectral", - "exponent": 0.5, - "mode": "spectrum" - }, - "dataFormat": "tsbuckets", - "datasource": "$datasource", - "heatmap": { }, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 11, - "legend": { - "show": true - }, - "span": 12, - "targets": [ - { - "expr": "sum by (le) (rate(loki_ingester_chunk_utilization_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval]))", - "format": "heatmap", - "intervalFactor": 2, - "legendFormat": "{{le}}", - "refId": "A" - } - ], - "title": "Chunk Utilization", - "tooltip": { - "show": true, - "showHistogram": true - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "xBucketNumber": null, - "xBucketSize": null, - "yAxis": { - "decimals": 0, - "format": "percentunit", - "show": true, - "splitFactor": null - }, - "yBucketBound": "auto" - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Utilization", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "cards": { - "cardPadding": null, - "cardRound": null - }, - "color": { - "cardColor": "#b4ff00", - "colorScale": "sqrt", - "colorScheme": "interpolateSpectral", - "exponent": 0.5, - "mode": "spectrum" - }, - "dataFormat": "tsbuckets", - "datasource": "$datasource", - "heatmap": { }, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 12, - "legend": { - "show": true - }, - "span": 12, - "targets": [ - { - "expr": "sum(rate(loki_ingester_chunk_size_bytes_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[$__rate_interval])) by (le)", - "format": "heatmap", - "intervalFactor": 2, - "legendFormat": "{{le}}", - "refId": "A" - } - ], - "title": "Chunk Size Bytes", - "tooltip": { - "show": true, - "showHistogram": true - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "xBucketNumber": null, - "xBucketSize": null, - "yAxis": { - "decimals": 0, - "format": "bytes", - "show": true, - "splitFactor": null - }, - "yBucketBound": "auto" - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Utilization", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 13, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_size_bytes_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[1m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p99", - "legendLink": null, - "step": 10 - }, - { - "expr": "histogram_quantile(0.90, sum(rate(loki_ingester_chunk_size_bytes_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[1m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p90", - "legendLink": null, - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_ingester_chunk_size_bytes_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[1m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p50", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunk Size Quantiles", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Utilization", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.5, sum(rate(loki_ingester_chunk_bounds_hours_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p50", - "legendLink": null, - "step": 10 - }, - { - "expr": "histogram_quantile(0.99, sum(rate(loki_ingester_chunk_bounds_hours_bucket{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m])) by (le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p99", - "legendLink": null, - "step": 10 - }, - { - "expr": "sum(rate(loki_ingester_chunk_bounds_hours_sum{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m])) / sum(rate(loki_ingester_chunk_bounds_hours_count{cluster=\"$cluster\", job=~\"$namespace/(loki|enterprise-logs)-write\"}[5m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "avg", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Chunk Duration hours (end-start)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Duration", - "titleSize": "h6" - } - ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Chunks", - "uid": "chunks", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-deletion.json b/charts/loki/src/dashboards/loki-deletion.json deleted file mode 100644 index 84bfee68..00000000 --- a/charts/loki/src/dashboards/loki-deletion.json +++ /dev/null @@ -1,632 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "refresh": "10s", - "rows": [ - { - "collapse": false, - "height": "100px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "format": "none", - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(loki_compactor_pending_delete_requests_count{cluster=~\"$cluster\", namespace=~\"$namespace\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "70,80", - "timeFrom": null, - "timeShift": null, - "title": "Number of Pending Requests", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "singlestat", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "format": "dtdurations", - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max(loki_compactor_oldest_pending_delete_request_age_seconds{cluster=~\"$cluster\", namespace=~\"$namespace\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "70,80", - "timeFrom": null, - "timeShift": null, - "title": "Oldest Pending Request Age", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "singlestat", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Headlines", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(increase(loki_compactor_delete_requests_received_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[1d]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "received", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Delete Requests Received / Day", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(increase(loki_compactor_delete_requests_processed_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[1d]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "processed", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Delete Requests Processed / Day", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Churn", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(increase(loki_compactor_load_pending_requests_attempts_total{status=\"fail\", cluster=~\"$cluster\", namespace=~\"$namespace\"}[1h]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "failures", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Failures in Loading Delete Requests / Hour", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Failures", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_compactor_deleted_lines{cluster=~\"$cluster\",job=~\"$namespace/(loki|enterprise-logs)-read\"}[$__rate_interval])) by (user)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{user}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Lines Deleted / Sec", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Deleted lines", - "titleSize": "h6" - } - ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Deletion", - "uid": "deletion", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-logs.json b/charts/loki/src/dashboards/loki-logs.json deleted file mode 100644 index bde101d3..00000000 --- a/charts/loki/src/dashboards/loki-logs.json +++ /dev/null @@ -1,1073 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": 8, - "iteration": 1583185057230, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 0 - }, - "hiddenSeries": false, - "id": 35, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(go_goroutines{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"})", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "goroutines", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 0 - }, - "hiddenSeries": false, - "id": 41, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(go_gc_duration_seconds{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"}) by (quantile)", - "legendFormat": "{{quantile}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "gc duration", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 0 - }, - "hiddenSeries": false, - "id": 36, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", container=~\"$container\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "cpu", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 3, - "x": 9, - "y": 0 - }, - "hiddenSeries": false, - "id": 40, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", container=~\"$container\"})", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "working set", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "hiddenSeries": false, - "id": 38, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "tx", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "hiddenSeries": false, - "id": 39, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "rx", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 0 - }, - "hiddenSeries": false, - "id": 37, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "increase(kube_pod_container_status_last_terminated_reason{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", container=~\"$container\"}[30m]) > 0", - "legendFormat": "{{reason}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "restarts", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 3, - "x": 21, - "y": 0 - }, - "hiddenSeries": false, - "id": 42, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(promtail_custom_bad_words_total{cluster=\"$cluster\", exported_namespace=\"$namespace\", exported_pod=~\"$deployment.*\", exported_pod=~\"$pod\", container=~\"$container\"}[5m])) by (level)", - "legendFormat": "{{level}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "bad words", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$logs", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 4 - }, - "hiddenSeries": false, - "id": 31, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "warn", - "color": "#FF780A" - }, - { - "alias": "error", - "color": "#E02F44" - }, - { - "alias": "info", - "color": "#56A64B" - }, - { - "alias": "debug", - "color": "#3274D9" - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate({cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", container=~\"$container\" } |logfmt| level=~\"$level\" |= \"$filter\" [5m])) by (level)", - "intervalFactor": 3, - "legendFormat": "{{level}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Log Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": false, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": "$logs", - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 29, - "maxDataPoints": "", - "options": { - "showLabels": false, - "showTime": true, - "sortOrder": "Descending", - "wrapLogMessage": true - }, - "targets": [ - { - "expr": "{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\", container=~\"$container\"} | logfmt | level=~\"$level\" |= \"$filter\"", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Logs", - "type": "logs" - } - ], - "refresh": "10s", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "hide": 0, - "label": null, - "name": "logs", - "options": [ ], - "query": "loki", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "deployment", - "options": [ ], - "query": "label_values(kube_deployment_created{cluster=\"$cluster\", namespace=\"$namespace\"}, deployment)", - "refresh": 0, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "pod", - "options": [ ], - "query": "label_values(kube_pod_container_info{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\"}, pod)", - "refresh": 0, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "container", - "options": [ ], - "query": "label_values(kube_pod_container_info{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\", pod=~\"$deployment.*\"}, container)", - "refresh": 0, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": true, - "text": "", - "value": "" - }, - "hide": 0, - "includeAll": false, - "label": "", - "multi": true, - "name": "level", - "options": [ - { - "selected": false, - "text": "debug", - "value": "debug" - }, - { - "selected": false, - "text": "info", - "value": "info" - }, - { - "selected": false, - "text": "warn", - "value": "warn" - }, - { - "selected": false, - "text": "error", - "value": "error" - } - ], - "query": "debug,info,warn,error", - "refresh": 0, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "label": "LogQL Filter", - "name": "filter", - "query": "", - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Logs", - "uid": "logs", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-mixin-recording-rules.json b/charts/loki/src/dashboards/loki-mixin-recording-rules.json deleted file mode 100644 index fe49ec7c..00000000 --- a/charts/loki/src/dashboards/loki-mixin-recording-rules.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [ ], - "type": "dashboard" - }, - "type": "dashboard" - }, - { - "datasource": "${datasource}", - "enable": false, - "expr": "sum by (tenant) (changes(loki_ruler_wal_prometheus_tsdb_wal_truncations_total{tenant=~\"${tenant}\"}[$__rate_interval]))", - "iconColor": "red", - "name": "WAL Truncations", - "target": { - "queryType": "Azure Monitor", - "refId": "Anno" - }, - "titleFormat": "{{tenant}}" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1635347545534, - "links": [ ], - "liveNow": false, - "panels": [ - { - "datasource": "${datasource}", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ ], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 10, - "w": 2, - "x": 0, - "y": 0 - }, - "id": 2, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.0-38205pre", - "targets": [ - { - "datasource": "${datasource}", - "exemplar": false, - "expr": "sum(loki_ruler_wal_appender_ready) by (pod, tenant) == 0", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Appenders Not Ready", - "type": "stat" - }, - { - "datasource": "${datasource}", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 10, - "w": 11, - "x": 2, - "y": 0 - }, - "id": 4, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": "${datasource}", - "exemplar": true, - "expr": "sum(rate(loki_ruler_wal_samples_appended_total{tenant=~\"${tenant}\"}[$__rate_interval])) by (tenant) > 0", - "interval": "", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "title": "Samples Appended to WAL per Second", - "type": "timeseries" - }, - { - "datasource": "${datasource}", - "description": "Series are unique combinations of labels", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 10, - "w": 11, - "x": 13, - "y": 0 - }, - "id": 5, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": "${datasource}", - "exemplar": true, - "expr": "sum(rate(loki_ruler_wal_storage_created_series_total{tenant=~\"${tenant}\"}[$__rate_interval])) by (tenant) > 0", - "interval": "", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "title": "Series Created per Second", - "type": "timeseries" - }, - { - "datasource": "${datasource}", - "description": "Difference between highest timestamp appended to WAL and highest timestamp successfully written to remote storage", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 10 - }, - "id": 6, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": "${datasource}", - "exemplar": true, - "expr": "loki_ruler_wal_prometheus_remote_storage_highest_timestamp_in_seconds{tenant=~\"${tenant}\"}\n- on (tenant)\n (\n loki_ruler_wal_prometheus_remote_storage_queue_highest_sent_timestamp_seconds{tenant=~\"${tenant}\"}\n or vector(0)\n )", - "interval": "", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "title": "Write Behind", - "type": "timeseries" - }, - { - "datasource": "${datasource}", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 10 - }, - "id": 7, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": "${datasource}", - "exemplar": true, - "expr": "sum(rate(loki_ruler_wal_prometheus_remote_storage_samples_total{tenant=~\"${tenant}\"}[$__rate_interval])) by (tenant) > 0", - "interval": "", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "title": "Samples Sent per Second", - "type": "timeseries" - }, - { - "datasource": "${datasource}", - "description": "\n", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 20 - }, - "id": 8, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": "${datasource}", - "exemplar": true, - "expr": "sum by (tenant) (loki_ruler_wal_disk_size{tenant=~\"${tenant}\"})", - "interval": "", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "title": "WAL Disk Size", - "type": "timeseries" - }, - { - "datasource": "${datasource}", - "description": "Some number of pending samples is expected, but if remote-write is failing this value will remain high", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 20 - }, - "id": 9, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": "${datasource}", - "exemplar": true, - "expr": "max(loki_ruler_wal_prometheus_remote_storage_samples_pending{tenant=~\"${tenant}\"}) by (tenant,pod) > 0", - "interval": "", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "title": "Pending Samples", - "type": "timeseries" - } - ], - "schemaVersion": 31, - "style": "dark", - "tags": [ ], - "templating": { - "list": [ - { - "description": null, - "error": null, - "hide": 0, - "includeAll": false, - "label": "Datasource", - "multi": false, - "name": "datasource", - "options": [ ], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": null, - "datasource": "${datasource}", - "definition": "label_values(loki_ruler_wal_samples_appended_total, tenant)", - "description": null, - "error": null, - "hide": 0, - "includeAll": true, - "label": "Tenant", - "multi": true, - "name": "tenant", - "options": [ ], - "query": { - "query": "label_values(loki_ruler_wal_samples_appended_total, tenant)", - "refId": "StandardVariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { }, - "timezone": "", - "title": "Recording Rules", - "uid": "2xKA_ZK7k", - "version": 9, - "weekStart": "" - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-operational.json b/charts/loki/src/dashboards/loki-operational.json deleted file mode 100644 index b69db237..00000000 --- a/charts/loki/src/dashboards/loki-operational.json +++ /dev/null @@ -1,6173 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": 68, - "iteration": 1588704280892, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 17, - "panels": [ ], - "targets": [ ], - "title": "Main", - "type": "row" - }, - { - "aliasColors": { - "5xx": "red" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 4, - "x": 0, - "y": 1 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\nlabel_replace(\n label_replace(\n rate(loki_request_duration_seconds_count{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\"}[5m]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n\"status\", \"${1}\", \"status_code\", \"([a-z]+)\")\n)", - "legendFormat": "{{status}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Queries/Second", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 10, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { - "5xx": "red" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 4, - "x": 4, - "y": 1 - }, - "hiddenSeries": false, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\nlabel_replace(\n label_replace(\n rate(loki_request_duration_seconds_count{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push\"}[5m]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n\"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))", - "legendFormat": "{{status}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Pushes/Second", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 10, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 4, - "x": 12, - "y": 1 - }, - "hiddenSeries": false, - "id": 2, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "topk(10, sum(rate(loki_distributor_lines_received_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (tenant))", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Lines Per Tenant (top 10)", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 4, - "x": 16, - "y": 1 - }, - "hiddenSeries": false, - "id": 4, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "topk(10, sum(rate(loki_distributor_bytes_received_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (tenant)) / 1024 / 1024", - "legendFormat": "{{tenant}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MBs Per Tenant (Top 10)", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 4, - "x": 20, - "y": 1 - }, - "hiddenSeries": false, - "id": 24, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "increase(kube_pod_container_status_restarts_total{cluster=\"$cluster\", namespace=\"$namespace\"}[10m]) > 0", - "hide": false, - "interval": "", - "legendFormat": "{{container}}-{{pod}}", - "refId": "B" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Container Restarts", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 6 - }, - "hiddenSeries": false, - "id": 9, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.75, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".9", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Push Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 6, - "x": 12, - "y": 6 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".9", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Distributor Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 6, - "x": 18, - "y": 6 - }, - "hiddenSeries": false, - "id": 71, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", status_code!~\"5[0-9]{2}\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[5m])) by (route)", - "interval": "", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Distributor Success Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "decimals": null, - "format": "percentunit", - "label": "", - "logBase": 1, - "max": "1", - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 6, - "x": 12, - "y": 11 - }, - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=\"/logproto.Pusher/Push\", cluster=~\"$cluster\"})) * 1e3", - "legendFormat": ".99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=\"/logproto.Pusher/Push\", cluster=~\"$cluster\"})) * 1e3", - "hide": false, - "legendFormat": ".9", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=\"/logproto.Pusher/Push\", cluster=~\"$cluster\"})) * 1e3", - "hide": false, - "legendFormat": ".5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Ingester Latency Write", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 6, - "x": 18, - "y": 11 - }, - "hiddenSeries": false, - "id": 72, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", status_code!~\"5[0-9]{2}\", route=\"/logproto.Pusher/Push\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", route=\"/logproto.Pusher/Push\"}[5m])) by (route)", - "interval": "", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Ingester Success Rate Write", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "decimals": null, - "format": "percentunit", - "label": "", - "logBase": 1, - "max": "1", - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 16 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", cluster=\"$cluster\"}))", - "legendFormat": "{{route}}-.99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", cluster=\"$cluster\"}))", - "legendFormat": "{{route}}-.9", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", cluster=\"$cluster\"}))", - "legendFormat": "{{route}}-.5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Query Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 6, - "x": 12, - "y": 16 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".99-{{route}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".9-{{route}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"api_prom_query|api_prom_labels|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_label|loki_api_v1_label_name_values\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".5-{{route}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Querier Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 6, - "x": 18, - "y": 16 - }, - "hiddenSeries": false, - "id": 73, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\", status_code!~\"5[0-9]{2}\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\"}[5m])) by (route)", - "interval": "", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Querier Success Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "decimals": null, - "format": "percentunit", - "label": "", - "logBase": 1, - "max": "1", - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "description": "", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 6, - "x": 12, - "y": 21 - }, - "hiddenSeries": false, - "id": 15, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".99-{{route}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".9-{{route}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.5, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\", cluster=\"$cluster\"})) * 1e3", - "legendFormat": ".5-{{route}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Ingester Latency Read", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "custom": { } - }, - "overrides": [ ] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 6, - "x": 18, - "y": 21 - }, - "hiddenSeries": false, - "id": 74, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", status_code!~\"5[0-9]{2}\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"/logproto.Querier/Query|/logproto.Querier/Label|/logproto.Querier/Series|/logproto.Querier/QuerySample|/logproto.Querier/GetChunkIDs\"}[5m])) by (route)", - "interval": "", - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Ingester Success Rate Read", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "decimals": null, - "format": "percentunit", - "label": "", - "logBase": 1, - "max": "1", - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 110, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 27 - }, - "hiddenSeries": false, - "id": 112, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "topk(10,sum by (tenant, reason) (rate(loki_discarded_samples_total{cluster=\"$cluster\",namespace=\"$namespace\"}[1m])))", - "interval": "", - "legendFormat": "{{ tenant }} - {{ reason }}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Discarded Lines", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "columns": [ ], - "datasource": "$datasource", - "fontSize": "100%", - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 27 - }, - "id": 113, - "pageSize": null, - "panels": [ ], - "showHeader": true, - "sort": { - "col": 3, - "desc": true - }, - "styles": [ - { - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "hidden" - }, - { - "alias": "", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "tenant", - "thresholds": [ ], - "type": "string", - "unit": "short" - }, - { - "alias": "", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "reason", - "thresholds": [ ], - "type": "number", - "unit": "short" - }, - { - "alias": "", - "align": "right", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [ ], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "expr": "topk(10, sum by (tenant, reason) (sum_over_time(increase(loki_discarded_samples_total{cluster=\"$cluster\",namespace=\"$namespace\"}[1m])[$__range:1m])))", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "{{ tenant }} - {{ reason }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Discarded Lines Per Interval", - "transform": "table", - "type": "table-old" - } - ], - "targets": [ ], - "title": "Limits", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 23, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 28 - }, - "hiddenSeries": false, - "id": 26, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": true, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"(loki|enterprise-logs)-write.*\"}", - "intervalFactor": 3, - "legendFormat": "{{pod}}-{{container}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 28 - }, - "hiddenSeries": false, - "id": 27, - "legend": { - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": true, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "go_memstats_heap_inuse_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"(loki|enterprise-logs)-write.*\"}", - "instant": false, - "intervalFactor": 3, - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Memory Usage", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$logs", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 4, - "w": 12, - "x": 12, - "y": 28 - }, - "hiddenSeries": false, - "id": 31, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "{}", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate({cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\"} | logfmt | level=\"error\"[1m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Error Log Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": false, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": "$logs", - "gridPos": { - "h": 18, - "w": 12, - "x": 12, - "y": 32 - }, - "id": 29, - "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": true - }, - "panels": [ ], - "targets": [ - { - "expr": "{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\"} | logfmt | level=\"error\"", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Logs", - "type": "logs" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 35 - }, - "hiddenSeries": false, - "id": 33, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\", status_code!~\"5[0-9]{2}\"}[5m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[5m])) by (route)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Success Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 35 - }, - "hiddenSeries": false, - "id": 32, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_distributor_ingester_append_failures_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (ingester)", - "intervalFactor": 1, - "legendFormat": "{{ingester}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Append Failures By Ingester", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 42 - }, - "hiddenSeries": false, - "id": 34, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_distributor_bytes_received_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (pod)", - "intervalFactor": 1, - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Bytes Received/Second", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 42 - }, - "hiddenSeries": false, - "id": 35, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_distributor_lines_received_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (pod)", - "intervalFactor": 1, - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Lines Received/Second", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "Write Path", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 29 - }, - "id": 104, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 30 - }, - "hiddenSeries": false, - "id": 106, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "topk(10,sum by (tenant) (loki_ingester_memory_streams{cluster=\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\"}))", - "interval": "", - "legendFormat": "{{ tenant }}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Active Streams", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 30 - }, - "hiddenSeries": false, - "id": 108, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "topk(10, sum by (tenant) (rate(loki_ingester_streams_created_total{cluster=\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m]) > 0))", - "interval": "", - "legendFormat": "{{ tenant }}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Streams Created/Sec", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "Streams", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 94, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 31 - }, - "hiddenSeries": false, - "id": 102, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "De-Dupe Ratio", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_ingester_chunks_flushed_total{cluster=\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m]))", - "interval": "", - "legendFormat": "Chunks", - "refId": "A" - }, - { - "expr": "sum(increase(loki_chunk_store_deduped_chunks_total{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m]))/sum(increase(loki_ingester_chunks_flushed_total{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m])) < 1", - "interval": "", - "legendFormat": "De-Dupe Ratio", - "refId": "B" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Chunks Flushed/Sec", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "cards": { - "cardPadding": null, - "cardRound": null - }, - "color": { - "cardColor": "#b4ff00", - "colorScale": "sqrt", - "colorScheme": "interpolateSpectral", - "exponent": 0.5, - "mode": "spectrum" - }, - "dataFormat": "tsbuckets", - "datasource": "$datasource", - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 31 - }, - "heatmap": { }, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 100, - "legend": { - "show": true - }, - "panels": [ ], - "reverseYBuckets": false, - "targets": [ - { - "expr": "sum(rate(loki_ingester_chunk_size_bytes_bucket{cluster=\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m])) by (le)", - "format": "heatmap", - "instant": false, - "interval": "", - "legendFormat": "{{ le }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Chunk Size Bytes", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "xBucketNumber": null, - "xBucketSize": null, - "yAxis": { - "decimals": 0, - "format": "bytes", - "logBase": 1, - "max": null, - "min": null, - "show": true, - "splitFactor": null - }, - "yBucketBound": "auto", - "yBucketNumber": null, - "yBucketSize": null - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 7, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 39 - }, - "hiddenSeries": false, - "id": 96, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(reason) (rate(loki_ingester_chunks_flushed_total{cluster=~\"$cluster\",job=~\"$namespace/ingester\", namespace=~\"$namespace\"}[$__rate_interval])) / ignoring(reason) group_left sum(rate(loki_ingester_chunks_flushed_total{cluster=~\"$cluster\",job=~\"$namespace/ingester\", namespace=~\"$namespace\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "{{ reason }}" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Chunk Flush Reason %", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": "1", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "cards": { - "cardPadding": null, - "cardRound": null - }, - "color": { - "cardColor": "#b4ff00", - "colorScale": "sqrt", - "colorScheme": "interpolateSpectral", - "exponent": 0.5, - "max": null, - "min": null, - "mode": "spectrum" - }, - "dataFormat": "tsbuckets", - "datasource": "$datasource", - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 39 - }, - "heatmap": { }, - "hideZeroBuckets": true, - "highlightCards": true, - "id": 98, - "legend": { - "show": true - }, - "panels": [ ], - "reverseYBuckets": false, - "targets": [ - { - "expr": "sum by (le) (rate(loki_ingester_chunk_utilization_bucket{cluster=\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"}[1m]))", - "format": "heatmap", - "instant": false, - "interval": "", - "legendFormat": "{{ le }}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Chunk Utilization", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "xBucketNumber": null, - "xBucketSize": null, - "yAxis": { - "decimals": 0, - "format": "percentunit", - "logBase": 1, - "max": null, - "min": null, - "show": true, - "splitFactor": null - }, - "yBucketBound": "auto", - "yBucketNumber": null, - "yBucketSize": null - } - ], - "targets": [ ], - "title": "Chunks", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 31 - }, - "id": 64, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 32 - }, - "hiddenSeries": false, - "id": 68, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": true, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"(loki|enterprise-logs)-read.*\"}", - "intervalFactor": 3, - "legendFormat": "{{pod}}-{{container}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 39 - }, - "hiddenSeries": false, - "id": 69, - "legend": { - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": true, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "go_memstats_heap_inuse_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"(loki|enterprise-logs)-read.*\"}", - "instant": false, - "intervalFactor": 3, - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Memory Usage", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$logs", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 3, - "w": 18, - "x": 12, - "y": 32 - }, - "hiddenSeries": false, - "id": 65, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "{}", - "color": "#F2495C" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate({cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\"} | logfmt | level=\"error\"[1m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Error Log Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": false, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": "$logs", - "gridPos": { - "h": 18, - "w": 18, - "x": 12, - "y": 35 - }, - "id": 66, - "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": true - }, - "panels": [ ], - "targets": [ - { - "expr": "{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\"} | logfmt | level=\"error\"", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Logs", - "type": "logs" - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 46 - }, - "hiddenSeries": false, - "id": 70, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\", status_code!~\"5[0-9]{2}\"}[1m])) by (route)\n/\nsum(rate(loki_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", job=~\"($namespace)/(loki|enterprise-logs)-read\"}[1m])) by (route)", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{route}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Success Rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "Read Path", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 52, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 30 - }, - "hiddenSeries": false, - "id": 53, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_memcache_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (method, name, le, container))", - "intervalFactor": 1, - "legendFormat": "{{container}}: .99-{{method}}-{{name}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_memcache_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (method, name, le, container))", - "hide": false, - "legendFormat": "{{container}}: .9-{{method}}-{{name}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_memcache_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (method, name, le, container))", - "hide": false, - "legendFormat": "{{container}}: .5-{{method}}-{{name}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Latency By Method", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 38 - }, - "hiddenSeries": false, - "id": 54, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_memcache_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (status_code, method, name, container)", - "intervalFactor": 1, - "legendFormat": "{{container}}: {{status_code}}-{{method}}-{{name}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Status By Method", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "Memcached", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 33 - }, - "id": 57, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 31 - }, - "hiddenSeries": false, - "id": 55, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_consul_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_consul_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_consul_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".5-{{operation}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Latency By Operation", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 39 - }, - "hiddenSeries": false, - "id": 58, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_consul_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, status_code, method)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}-{{operation}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Status By Operation", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "Consul", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 34 - }, - "id": 43, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 41, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".9", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[5m])) by (operation, le))", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[5m])) by (operation, le))", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MutateRows Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 9 - }, - "hiddenSeries": false, - "id": 46, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[5m])) by (operation, le))", - "interval": "", - "intervalFactor": 1, - "legendFormat": "99%", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[5m])) by (operation, le))", - "interval": "", - "legendFormat": "90%", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[5m])) by (operation, le))", - "interval": "", - "legendFormat": "50%", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "ReadRows Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 9 - }, - "hiddenSeries": false, - "id": 44, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[5m])) by (operation, le))", - "interval": "", - "intervalFactor": 1, - "legendFormat": "99%", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[5m])) by (operation, le))", - "interval": "", - "legendFormat": "90%", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[5m])) by (operation, le))", - "interval": "", - "legendFormat": "50%", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "GetTable Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 9 - }, - "hiddenSeries": false, - "id": 45, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".9", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[5m])) by (operation, le))", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_bigtable_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[5m])) by (operation, le))", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "ListTables Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 16 - }, - "hiddenSeries": false, - "id": 47, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_bigtable_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/MutateRows\"}[5m])) by (status_code)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "MutateRows Status", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 16 - }, - "hiddenSeries": false, - "id": 50, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_bigtable_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.v2.Bigtable/ReadRows\"}[5m])) by (status_code)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "ReadRows Status", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 16 - }, - "hiddenSeries": false, - "id": 48, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_bigtable_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/GetTable\"}[5m])) by (status_code)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "GetTable Status", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 16 - }, - "hiddenSeries": false, - "id": 49, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_bigtable_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\", operation=\"/google.bigtable.admin.v2.BigtableTableAdmin/ListTables\"}[5m])) by (status_code)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "ListTables Status", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "Big Table", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 35 - }, - "id": 60, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 33 - }, - "hiddenSeries": false, - "id": 61, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_gcs_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_gcs_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_gcs_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".5-{{operation}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Latency By Operation", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 41 - }, - "hiddenSeries": false, - "id": 62, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_gcs_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (status_code, operation)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}-{{operation}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Status By Method", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "GCS", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 36 - }, - "id": 76, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 9 - }, - "id": 82, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(cortex_dynamo_failures_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Failure Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 83, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(cortex_dynamo_consumed_capacity_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Consumed Capacity Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 9 - }, - "id": 84, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(cortex_dynamo_throttled_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Throttled Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 9 - }, - "id": 85, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(cortex_dynamo_dropped_requests_total{cluster=\"$cluster\", namespace=\"$namespace\"}[5m]))", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Dropped Rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 15 - }, - "id": 86, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(cortex_dynamo_query_pages_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])))", - "legendFormat": ".99", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(cortex_dynamo_query_pages_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])))", - "legendFormat": ".9", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(cortex_dynamo_query_pages_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])))", - "legendFormat": ".5", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Query Pages", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 9, - "x": 6, - "y": 15 - }, - "id": 87, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(cortex_dynamo_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(cortex_dynamo_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(cortex_dynamo_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".5-{{operation}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Latency By Operation", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 9, - "x": 15, - "y": 15 - }, - "id": 88, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(cortex_dynamo_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (status_code, operation)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}-{{operation}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Status By Method", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "Dynamo", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 37 - }, - "id": 78, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 79, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_s3_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_s3_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_s3_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".5-{{operation}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Latency By Operation", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 80, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_s3_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (status_code, operation)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}-{{operation}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Status By Method", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "S3", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 37 - }, - "id": 78, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 79, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_azure_blob_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_azure_blob_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_azure_blob_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".5-{{operation}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Latency By Operation", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 80, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_azure_blob_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (status_code, operation)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}-{{operation}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Status By Method", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "Azure Blob", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 37 - }, - "id": 114, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 115, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "intervalFactor": 1, - "legendFormat": ".99-{{operation}}", - "refId": "A" - }, - { - "expr": "histogram_quantile(.9, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".9-{{operation}}", - "refId": "B" - }, - { - "expr": "histogram_quantile(.5, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (operation, le))", - "hide": false, - "legendFormat": ".5-{{operation}}", - "refId": "C" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Latency By Operation", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 116, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [ ] - }, - "panels": [ ], - "percentage": false, - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=\"$cluster\", namespace=\"$namespace\"}[5m])) by (status_code, operation)", - "intervalFactor": 1, - "legendFormat": "{{status_code}}-{{operation}}", - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeRegions": [ ], - "timeShift": null, - "title": "Status By Method", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "targets": [ ], - "title": "BoltDB Shipper", - "type": "row" - } - ], - "refresh": "10s", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "hide": 0, - "label": null, - "name": "logs", - "options": [ ], - "query": "loki", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Operational", - "uid": "operational", - "version": 0 - } diff --git a/charts/loki/src/dashboards/loki-reads-resources.json b/charts/loki/src/dashboards/loki-reads-resources.json deleted file mode 100644 index 6fa166f4..00000000 --- a/charts/loki/src/dashboards/loki-reads-resources.json +++ /dev/null @@ -1,964 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "refresh": "10s", - "rows": [ - { - "collapse": false, - "collapsed": false, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_cpu_quota{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"} / container_spec_cpu_period{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_memory_limit_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (workingset)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-read\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (go heap inuse)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "gridPos": { }, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(instance, pod, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}} - {{device}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Writes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "gridPos": { }, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(instance, pod, device) (rate(node_disk_read_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}} - {{device}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Reads", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"} / kubelet_volume_stats_capacity_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"}) and count by(persistentvolumeclaim) (kube_persistentvolumeclaim_labels{cluster=~\"$cluster\", namespace=~\"$namespace\",label_name=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{persistentvolumeclaim}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Space Utilization", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "loki_boltdb_shipper_query_readiness_duration_seconds{cluster=~\"$cluster\", namespace=~\"$namespace\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "duration", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Query Readiness Duration", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Read path", - "titleSize": "h6", - "type": "row" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_cpu_quota{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"} / container_spec_cpu_period{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 9, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_memory_limit_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (workingset)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (go heap inuse)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Ingester", - "titleSize": "h6" - } - ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Reads Resources", - "uid": "reads-resources", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-reads.json b/charts/loki/src/dashboards/loki-reads.json deleted file mode 100644 index 6cae30f0..00000000 --- a/charts/loki/src/dashboards/loki-reads.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "refresh": "10s", - "rows": [ - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { - "1xx": "#EAB839", - "2xx": "#7EB26D", - "3xx": "#6ED0E0", - "4xx": "#EF843C", - "5xx": "#E24D42", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "QPS", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\", cluster=~\"$cluster\"})) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ route }} 99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum by (le,route) (job_route:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\", cluster=~\"$cluster\"})) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ route }} 50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "1e3 * sum(job_route:loki_request_duration_seconds_sum:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\", cluster=~\"$cluster\"}) by (route) / sum(job_route:loki_request_duration_seconds_count:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-read\", route=~\"loki_api_v1_series|api_prom_series|api_prom_query|api_prom_label|api_prom_label_name_values|loki_api_v1_query|loki_api_v1_query_range|loki_api_v1_labels|loki_api_v1_label_name_values\", cluster=~\"$cluster\"}) by (route) ", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ route }} Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Read Path", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { - "1xx": "#EAB839", - "2xx": "#7EB26D", - "3xx": "#6ED0E0", - "4xx": "#EF843C", - "5xx": "#E24D42", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "QPS", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_boltdb_shipper_request_duration_seconds_sum{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-read\", operation=\"Shipper.Query\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "BoltDB Shipper", - "titleSize": "h6" - } - ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Reads", - "uid": "reads", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-retention.json b/charts/loki/src/dashboards/loki-retention.json deleted file mode 100644 index 7fc99eca..00000000 --- a/charts/loki/src/dashboards/loki-retention.json +++ /dev/null @@ -1,1537 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "refresh": "10s", - "rows": [ - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_cpu_quota{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"} / container_spec_cpu_period{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_memory_limit_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-read.*\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (workingset)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-read\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (go heap inuse)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Resource Usage", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "fixed" - }, - "custom": { }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "dateTimeFromNow" - } - }, - "fill": 1, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": { }, - "textMode": "auto" - }, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "loki_boltdb_shipper_compact_tables_operation_last_successful_run_timestamp_seconds{cluster=~\"$cluster\", namespace=~\"$namespace\"} * 1e3", - "format": "time_series", - "instant": true, - "refId": "A" - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Last Compact and Mark Operation Success", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "stat", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "loki_boltdb_shipper_compact_tables_operation_duration_seconds{cluster=~\"$cluster\", namespace=~\"$namespace\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "duration", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Compact and Mark Operations Duration", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status)(rate(loki_boltdb_shipper_compact_tables_operation_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{success}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Compact and Mark Operations Per Status", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Compact and Mark", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "count by(action)(loki_boltdb_shipper_retention_marker_table_processed_total{cluster=~\"$cluster\", namespace=~\"$namespace\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{action}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Processed Tables Per Action", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "count by(table,action)(loki_boltdb_shipper_retention_marker_table_processed_total{cluster=~\"$cluster\", namespace=~\"$namespace\" , action=~\"modified|deleted\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{table}}-{{action}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Modified Tables", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 9, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (table)(rate(loki_boltdb_shipper_retention_marker_count_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) >0", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{table}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Marks Creation Rate Per Table", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Per Table Marker", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "format": "short", - "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (increase(loki_boltdb_shipper_retention_marker_count_total{cluster=~\"$cluster\", namespace=~\"$namespace\"}[24h]))", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "70,80", - "timeFrom": null, - "timeShift": null, - "title": "Marked Chunks (24h)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "singlestat", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_bucket{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_bucket{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_sum{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_retention_marker_table_processed_duration_seconds_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Mark Table Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "format": "short", - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (increase(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[24h]))", - "format": "time_series", - "instant": true, - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "70,80", - "timeFrom": null, - "timeShift": null, - "title": "Delete Chunks (24h)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "singlestat", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 13, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_bucket{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_bucket{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_sum{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Delete Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Sweeper", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "time() - (loki_boltdb_shipper_retention_sweeper_marker_file_processing_current_time{cluster=~\"$cluster\", namespace=~\"$namespace\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "lag", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Sweeper Lag", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 15, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(loki_boltdb_shipper_retention_sweeper_marker_files_current{cluster=~\"$cluster\", namespace=~\"$namespace\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "count", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Marks Files to Process", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 16, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 4, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status)(rate(loki_boltdb_shipper_retention_sweeper_chunk_deleted_duration_seconds_count{cluster=~\"$cluster\", namespace=~\"$namespace\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Delete Rate Per Status", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "datasource": "$logs", - "id": 17, - "span": 12, - "targets": [ - { - "expr": "{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-read\"}", - "refId": "A" - } - ], - "title": "Compactor Logs", - "type": "logs" - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Logs", - "titleSize": "h6" - } - ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "hide": 0, - "label": null, - "name": "logs", - "options": [ ], - "query": "loki", - "refresh": 1, - "regex": "", - "type": "datasource" - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Retention", - "uid": "retention", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-writes-resources.json b/charts/loki/src/dashboards/loki-writes-resources.json deleted file mode 100644 index 1b68bd34..00000000 --- a/charts/loki/src/dashboards/loki-writes-resources.json +++ /dev/null @@ -1,700 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "refresh": "10s", - "rows": [ - { - "collapse": false, - "collapsed": false, - "panels": [ - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (loki_ingester_memory_streams{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "In-memory streams", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_cpu_quota{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"} / container_spec_cpu_period{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "limit", - "color": "#E02F44", - "fill": 0 - } - ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(pod) (container_memory_working_set_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - }, - { - "expr": "min(container_spec_memory_limit_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\"} > 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "limit", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (workingset)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(pod) (go_memstats_heap_inuse_bytes{cluster=~\"$cluster\", job=~\"($namespace)/(loki|enterprise-logs)-write\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Memory (go heap inuse)", - "tooltip": { - "sort": 2 - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "gridPos": { }, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(instance, pod, device) (rate(node_disk_written_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}} - {{device}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Writes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "gridPos": { }, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(instance, pod, device) (rate(node_disk_read_bytes_total[$__rate_interval])) + ignoring(pod) group_right() (label_replace(count by(instance, pod, device) (container_fs_writes_bytes_total{cluster=~\"$cluster\", namespace=~\"$namespace\", container=\"loki\", pod=~\"(loki|enterprise-logs)-write.*\", device!~\".*sda.*\"}), \"device\", \"$1\", \"device\", \"/dev/(.*)\") * 0)\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{pod}} - {{device}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Reads", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { }, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_used_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"} / kubelet_volume_stats_capacity_bytes{cluster=~\"$cluster\", namespace=~\"$namespace\"}) and count by(persistentvolumeclaim) (kube_persistentvolumeclaim_labels{cluster=~\"$cluster\", namespace=~\"$namespace\",label_name=~\"(loki|enterprise-logs)-write.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{persistentvolumeclaim}}", - "legendLink": null, - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Disk Space Utilization", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Write path", - "titleSize": "h6", - "type": "row" - } - ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Writes Resources", - "uid": "writes-resources", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/dashboards/loki-writes.json b/charts/loki/src/dashboards/loki-writes.json deleted file mode 100644 index ebaf33ea..00000000 --- a/charts/loki/src/dashboards/loki-writes.json +++ /dev/null @@ -1,504 +0,0 @@ -{ - "annotations": { - "list": [ ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": true, - "keepTime": true, - "tags": [ - "loki" - ], - "targetBlank": false, - "title": "Loki Dashboards", - "type": "dashboards" - } - ], - "refresh": "10s", - "rows": [ - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { - "1xx": "#EAB839", - "2xx": "#7EB26D", - "3xx": "#6ED0E0", - "4xx": "#EF843C", - "5xx": "#E24D42", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 1, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", route=~\"api_prom_push|loki_api_v1_push|/httpgrpc.HTTP/Handle\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "QPS", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum by (le) (job:loki_request_duration_seconds_bucket:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "1e3 * sum(job:loki_request_duration_seconds_sum:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"}) / sum(job:loki_request_duration_seconds_count:sum_rate{job=~\"($namespace)/(loki|enterprise-logs)-write\", cluster=~\"$cluster\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Write Path", - "titleSize": "h6" - }, - { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": { - "1xx": "#EAB839", - "2xx": "#7EB26D", - "3xx": "#6ED0E0", - "4xx": "#EF843C", - "5xx": "#E24D42", - "error": "#E24D42", - "success": "#7EB26D" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 10, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 0, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (status) (\n label_replace(label_replace(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval]),\n \"status\", \"${1}xx\", \"status_code\", \"([0-9])..\"),\n \"status\", \"${1}\", \"status_code\", \"([a-z]+)\"))\n", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{status}}", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "QPS", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null as zero", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ ], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "99th Percentile", - "refId": "A", - "step": 10 - }, - { - "expr": "histogram_quantile(0.50, sum(rate(loki_boltdb_shipper_request_duration_seconds_bucket{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval])) by (le)) * 1e3", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "50th Percentile", - "refId": "B", - "step": 10 - }, - { - "expr": "sum(rate(loki_boltdb_shipper_request_duration_seconds_sum{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval])) * 1e3 / sum(rate(loki_boltdb_shipper_request_duration_seconds_count{cluster=~\"$cluster\",job=~\"($namespace)/(loki|enterprise-logs)-write\", operation=\"WRITE\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Average", - "refId": "C", - "step": 10 - } - ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "BoltDB Shipper", - "titleSize": "h6" - } - ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "loki" - ], - "templating": { - "list": [ - { - "current": { - "text": "default", - "value": "default" - }, - "hide": 0, - "label": "Data Source", - "name": "datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "cluster", - "multi": false, - "name": "cluster", - "options": [ ], - "query": "label_values(loki_build_info, cluster)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "prod", - "value": "prod" - }, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": "namespace", - "multi": false, - "name": "namespace", - "options": [ ], - "query": "label_values(loki_build_info{cluster=~\"$cluster\"}, namespace)", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "utc", - "title": "Loki / Writes", - "uid": "writes", - "version": 0 - } \ No newline at end of file diff --git a/charts/loki/src/helm-test/Dockerfile b/charts/loki/src/helm-test/Dockerfile deleted file mode 100644 index 253a10fd..00000000 --- a/charts/loki/src/helm-test/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM golang:1.20.4 as build - -# build via Makefile target helm-test-image in root -# Makefile. Building from this directory will not be -# able to access source needed in rest of repo. -COPY . /src/loki -WORKDIR /src/loki -RUN make clean && make BUILD_IN_CONTAINER=false helm-test - -FROM alpine:3.16.7 -RUN apk add --update --no-cache ca-certificates=20230506-r0 -COPY --from=build /src/loki/production/helm/loki/src/helm-test/helm-test /usr/bin/helm-test -ENTRYPOINT [ "/usr/bin/helm-test" ] diff --git a/charts/loki/src/helm-test/README.md b/charts/loki/src/helm-test/README.md deleted file mode 100644 index 68c9bfd9..00000000 --- a/charts/loki/src/helm-test/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Loki Helm Test - -This folder contains a collection of go tests that test if a Loki canary is running correctly. It's primary use it to test that the helm chart is working correctly by using metrics from the Loki canary. In the helm chart, the template for this test is only available if you are running both the Loki canary and have self monitoring enabled (as the Loki canary's logs need to be in Loki for it to work). However, the tests in this folder can be run against any running Loki canary using `go test`. - -## Instructions - -Run `go test .` from this directory, or use the Docker image published at `grafana/loki-helm-test`. diff --git a/charts/loki/src/helm-test/canary_test.go b/charts/loki/src/helm-test/canary_test.go deleted file mode 100644 index 24e9d6d0..00000000 --- a/charts/loki/src/helm-test/canary_test.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build helm_test -// +build helm_test - -package test - -import ( - "context" - "errors" - "fmt" - "os" - "testing" - "time" - - "github.com/prometheus/client_golang/api" - v1 "github.com/prometheus/client_golang/api/prometheus/v1" - "github.com/prometheus/common/model" - "github.com/stretchr/testify/require" -) - -func TestCanary(t *testing.T) { - totalEntriesQuery := "sum(loki_canary_entries_total)" - totalEntriesMissingQuery := "sum(loki_canary_missing_entries_total)" - - timeout := getEnv("CANARY_TEST_TIMEOUT", "1m") - timeoutDuration, err := time.ParseDuration(timeout) - require.NoError(t, err, "Failed to parse timeout. Please set CANARY_TEST_TIMEOUT to a valid duration.") - - ctx, cancel := context.WithTimeout(context.Background(), timeoutDuration) - - t.Cleanup(func() { - cancel() - }) - - t.Run("Canary should have entries", func(t *testing.T) { - client := newClient(t) - - eventually(t, func() error { - result, _, err := client.Query(ctx, totalEntriesQuery, time.Now(), v1.WithTimeout(timeoutDuration)) - if err != nil { - return err - } - return testResult(t, result, totalEntriesQuery, func(v model.SampleValue) bool { - return v > 0 - }, fmt.Sprintf("Expected %s to be greater than 0", totalEntriesQuery)) - }, timeoutDuration, "Expected Loki Canary to have entries") - }) - - t.Run("Canary should not have missed any entries", func(t *testing.T) { - client := newClient(t) - - eventually(t, func() error { - result, _, err := client.Query(ctx, totalEntriesMissingQuery, time.Now(), v1.WithTimeout(timeoutDuration)) - if err != nil { - return err - } - return testResult(t, result, totalEntriesMissingQuery, func(v model.SampleValue) bool { - return v == 0 - }, fmt.Sprintf("Expected %s to equal 0", totalEntriesMissingQuery)) - }, timeoutDuration, "Expected Loki Canary to not have any missing entries") - }) -} - -func getEnv(key, fallback string) string { - if value, ok := os.LookupEnv(key); ok { - return value - } - return fallback -} - -func testResult(t *testing.T, result model.Value, query string, test func(model.SampleValue) bool, msg string) error { - if v, ok := result.(model.Vector); ok { - for _, s := range v { - t.Logf("%s => %v\n", query, s.Value) - if !test(s.Value) { - return errors.New(msg) - } - } - - return nil - } - - return fmt.Errorf("unexpected Prometheus result type: %v ", result.Type()) -} - -func newClient(t *testing.T) v1.API { - address := os.Getenv("CANARY_PROMETHEUS_ADDRESS") - require.NotEmpty(t, address, "CANARY_PROMETHEUS_ADDRESS must be set to a valid prometheus address") - - client, err := api.NewClient(api.Config{ - Address: address, - }) - require.NoError(t, err, "Failed to create Loki Canary client") - - return v1.NewAPI(client) -} - -func eventually(t *testing.T, test func() error, timeoutDuration time.Duration, msg string) { - require.Eventually(t, func() bool { - queryError := test() - if queryError != nil { - t.Logf("Query failed\n%+v\n", queryError) - } - return queryError == nil - }, timeoutDuration, 1*time.Second, msg) -} diff --git a/charts/loki/src/helm-test/default.nix b/charts/loki/src/helm-test/default.nix deleted file mode 100644 index 5ebfa3e4..00000000 --- a/charts/loki/src/helm-test/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, lib, buildGoModule, dockerTools, rev }: -rec { - loki-helm-test = buildGoModule rec { - pname = "loki-helm-test"; - version = "0.1.0"; - - src = ./../../../../..; - vendorSha256 = null; - - buildPhase = '' - runHook preBuild - go test --tags=helm_test -c -o $out/bin/helm-test ./production/helm/loki/src/helm-test - runHook postBuild - ''; - - doCheck = false; - }; - - # by default, uses the nix hash as the tag, which can be retrieved with: - # basename "$(readlink result)" | cut -d - -f 1 - loki-helm-test-docker = dockerTools.buildImage { - name = "grafana/loki-helm-test"; - config = { - Entrypoint = [ "${loki-helm-test}/bin/helm-test" ]; - }; - }; -} diff --git a/charts/loki/src/rules.yaml.tpl b/charts/loki/src/rules.yaml.tpl deleted file mode 100644 index 840401dc..00000000 --- a/charts/loki/src/rules.yaml.tpl +++ /dev/null @@ -1,86 +0,0 @@ ---- -groups: - - name: "loki_rules" - rules: - - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, job)) - record: job:loki_request_duration_seconds:99quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, job)) - record: job:loki_request_duration_seconds:50quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (job) / sum(rate(loki_request_duration_seconds_count[1m])) - by (job) - record: job:loki_request_duration_seconds:avg - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job) - record: job:loki_request_duration_seconds_bucket:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (job) - record: job:loki_request_duration_seconds_sum:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_count[1m])) by (job) - record: job:loki_request_duration_seconds_count:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, job, route)) - record: job_route:loki_request_duration_seconds:99quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, job, route)) - record: job_route:loki_request_duration_seconds:50quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (job, route) / sum(rate(loki_request_duration_seconds_count[1m])) - by (job, route) - record: job_route:loki_request_duration_seconds:avg - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job, route) - record: job_route:loki_request_duration_seconds_bucket:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (job, route) - record: job_route:loki_request_duration_seconds_sum:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_count[1m])) by (job, route) - record: job_route:loki_request_duration_seconds_count:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.99, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, namespace, job, route)) - record: namespace_job_route:loki_request_duration_seconds:99quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: histogram_quantile(0.50, sum(rate(loki_request_duration_seconds_bucket[1m])) - by (le, namespace, job, route)) - record: namespace_job_route:loki_request_duration_seconds:50quantile - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (namespace, job, route) - / sum(rate(loki_request_duration_seconds_count[1m])) by (namespace, job, route) - record: namespace_job_route:loki_request_duration_seconds:avg - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, namespace, job, - route) - record: namespace_job_route:loki_request_duration_seconds_bucket:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_sum[1m])) by (namespace, job, route) - record: namespace_job_route:loki_request_duration_seconds_sum:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" - - expr: sum(rate(loki_request_duration_seconds_count[1m])) by (namespace, job, route) - record: namespace_job_route:loki_request_duration_seconds_count:sum_rate - labels: - cluster: "{{ include "loki.clusterLabel" $ }}" diff --git a/charts/loki/templates/NOTES.txt b/charts/loki/templates/NOTES.txt deleted file mode 100644 index ad192e76..00000000 --- a/charts/loki/templates/NOTES.txt +++ /dev/null @@ -1,25 +0,0 @@ -*********************************************************************** - Welcome to Grafana Loki - Chart version: {{ .Chart.Version }} - Loki version: {{ .Chart.AppVersion }} -*********************************************************************** - -Installed components: -{{- if .Values.monitoring.selfMonitoring.enabled }} -* grafana-agent-operator -{{- end }} -{{- if eq (include "loki.deployment.isSingleBinary" .) "true" }} -* loki -{{- else -}} -{{- if .Values.gateway.enabled }} -* gateway -{{- end }} -{{- if .Values.minio.enabled }} -* minio -{{- end }} -* read -* write -{{- if not .Values.read.legacyReadTarget }} -* backend -{{- end }} -{{- end }} diff --git a/charts/loki/templates/_helpers.tpl b/charts/loki/templates/_helpers.tpl deleted file mode 100644 index 638fe842..00000000 --- a/charts/loki/templates/_helpers.tpl +++ /dev/null @@ -1,808 +0,0 @@ -{{/* -Enforce valid label value. -See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set -*/}} -{{- define "loki.validLabelValue" -}} -{{- (regexReplaceAllLiteral "[^a-zA-Z0-9._-]" . "-") | trunc 63 | trimSuffix "-" | trimSuffix "_" | trimSuffix "." }} -{{- end }} - -{{/* -Expand the name of the chart. -*/}} -{{- define "loki.name" -}} -{{- $default := ternary "enterprise-logs" "loki" .Values.enterprise.enabled }} -{{- coalesce .Values.nameOverride $default | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -singleBinary fullname -*/}} -{{- define "loki.singleBinaryFullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Resource name template -Params: - ctx = . context - component = component name (optional) - rolloutZoneName = rollout zone name (optional) -*/}} -{{- define "loki.resourceName" -}} -{{- $resourceName := include "loki.fullname" .ctx -}} -{{- if .component -}}{{- $resourceName = printf "%s-%s" $resourceName .component -}}{{- end -}} -{{- if and (not .component) .rolloutZoneName -}}{{- printf "Component name cannot be empty if rolloutZoneName (%s) is set" .rolloutZoneName | fail -}}{{- end -}} -{{- if .rolloutZoneName -}}{{- $resourceName = printf "%s-%s" $resourceName .rolloutZoneName -}}{{- end -}} -{{- if gt (len $resourceName) 253 -}}{{- printf "Resource name (%s) exceeds kubernetes limit of 253 character. To fix: shorten release name if this will be a fresh install or shorten zone names (e.g. \"a\" instead of \"zone-a\") if using zone-awareness." $resourceName | fail -}}{{- end -}} -{{- $resourceName -}} -{{- end -}} - -{{/* -Return if deployment mode is simple scalable -*/}} -{{- define "loki.deployment.isScalable" -}} - {{- and (eq (include "loki.isUsingObjectStorage" . ) "true") (eq (int .Values.singleBinary.replicas) 0) }} -{{- end -}} - -{{/* -Return if deployment mode is single binary -*/}} -{{- define "loki.deployment.isSingleBinary" -}} - {{- $nonZeroReplicas := gt (int .Values.singleBinary.replicas) 0 }} - {{- or (eq (include "loki.isUsingObjectStorage" . ) "false") ($nonZeroReplicas) }} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "loki.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := include "loki.name" . }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Cluster label for rules and alerts. -*/}} -{{- define "loki.clusterLabel" -}} -{{- if .Values.clusterLabelOverride }} -{{- .Values.clusterLabelOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := include "loki.name" . }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Create a default storage config that uses filesystem storage -This is required for CI, but Loki will not be queryable with this default -applied, thus it is encouraged that users override this. -*/}} -{{- define "loki.storageConfig" -}} -{{- if .Values.loki.storageConfig -}} -{{- .Values.loki.storageConfig | toYaml | nindent 4 -}} -{{- else }} -{{- .Values.loki.defaultStorageConfig | toYaml | nindent 4 }} -{{- end}} -{{- end}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "loki.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "loki.labels" -}} -helm.sh/chart: {{ include "loki.chart" . }} -{{ include "loki.selectorLabels" . }} -{{- if or (.Chart.AppVersion) (.Values.loki.image.tag) }} -app.kubernetes.io/version: {{ include "loki.validLabelValue" (.Values.loki.image.tag | default .Chart.AppVersion) | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "loki.selectorLabels" -}} -app.kubernetes.io/name: {{ include "loki.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "loki.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "loki.name" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Base template for building docker image reference -*/}} -{{- define "loki.baseImage" }} -{{- $registry := .global.registry | default .service.registry | default "" -}} -{{- $repository := .service.repository | default "" -}} -{{- $ref := ternary (printf ":%s" (.service.tag | default .defaultVersion | toString)) (printf "@%s" .service.digest) (empty .service.digest) -}} -{{- if and $registry $repository -}} - {{- printf "%s/%s%s" $registry $repository $ref -}} -{{- else -}} - {{- printf "%s%s%s" $registry $repository $ref -}} -{{- end -}} -{{- end -}} - -{{/* -Docker image name for Loki -*/}} -{{- define "loki.lokiImage" -}} -{{- $dict := dict "service" .Values.loki.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - -{{/* -Docker image name for enterprise logs -*/}} -{{- define "loki.enterpriseImage" -}} -{{- $dict := dict "service" .Values.enterprise.image "global" .Values.global.image "defaultVersion" .Values.enterprise.version -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - -{{/* -Docker image name -*/}} -{{- define "loki.image" -}} -{{- if .Values.enterprise.enabled -}}{{- include "loki.enterpriseImage" . -}}{{- else -}}{{- include "loki.lokiImage" . -}}{{- end -}} -{{- end -}} - -{{/* -Docker image name for kubectl container -*/}} -{{- define "loki.kubectlImage" -}} -{{- $dict := dict "service" .Values.kubectlImage "global" .Values.global.image "defaultVersion" "latest" -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - -{{/* -Generated storage config for loki common config -*/}} -{{- define "loki.commonStorageConfig" -}} -{{- if .Values.minio.enabled -}} -s3: - endpoint: {{ include "loki.minio" $ }} - bucketnames: {{ $.Values.loki.storage.bucketNames.chunks }} - secret_access_key: {{ $.Values.minio.rootPassword }} - access_key_id: {{ $.Values.minio.rootUser }} - s3forcepathstyle: true - insecure: true -{{- else if eq .Values.loki.storage.type "s3" -}} -{{- with .Values.loki.storage.s3 }} -s3: - {{- with .s3 }} - s3: {{ . }} - {{- end }} - {{- with .endpoint }} - endpoint: {{ . }} - {{- end }} - {{- with .region }} - region: {{ . }} - {{- end}} - bucketnames: {{ $.Values.loki.storage.bucketNames.chunks }} - {{- with .secretAccessKey }} - secret_access_key: {{ . }} - {{- end }} - {{- with .accessKeyId }} - access_key_id: {{ . }} - {{- end }} - {{- with .signatureVersion }} - signature_version: {{ . }} - {{- end }} - s3forcepathstyle: {{ .s3ForcePathStyle }} - insecure: {{ .insecure }} - {{- with .http_config}} - http_config: - {{- with .idle_conn_timeout }} - idle_conn_timeout: {{ . }} - {{- end}} - {{- with .response_header_timeout }} - response_header_timeout: {{ . }} - {{- end}} - {{- with .insecure_skip_verify }} - insecure_skip_verify: {{ . }} - {{- end}} - {{- with .ca_file}} - ca_file: {{ . }} - {{- end}} - {{- end }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "gcs" -}} -{{- with .Values.loki.storage.gcs }} -gcs: - bucket_name: {{ $.Values.loki.storage.bucketNames.chunks }} - chunk_buffer_size: {{ .chunkBufferSize }} - request_timeout: {{ .requestTimeout }} - enable_http2: {{ .enableHttp2 }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "azure" -}} -{{- with .Values.loki.storage.azure }} -azure: - account_name: {{ .accountName }} - {{- with .accountKey }} - account_key: {{ . }} - {{- end }} - container_name: {{ $.Values.loki.storage.bucketNames.chunks }} - use_managed_identity: {{ .useManagedIdentity }} - use_federated_token: {{ .useFederatedToken }} - {{- with .userAssignedId }} - user_assigned_id: {{ . }} - {{- end }} - {{- with .requestTimeout }} - request_timeout: {{ . }} - {{- end }} - {{- with .endpointSuffix }} - endpoint_suffix: {{ . }} - {{- end }} -{{- end -}} -{{- else -}} -{{- with .Values.loki.storage.filesystem }} -filesystem: - chunks_directory: {{ .chunks_directory }} - rules_directory: {{ .rules_directory }} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Storage config for ruler -*/}} -{{- define "loki.rulerStorageConfig" -}} -{{- if .Values.minio.enabled -}} -type: "s3" -s3: - bucketnames: {{ $.Values.loki.storage.bucketNames.ruler }} -{{- else if eq .Values.loki.storage.type "s3" -}} -{{- with .Values.loki.storage.s3 }} -type: "s3" -s3: - {{- with .s3 }} - s3: {{ . }} - {{- end }} - {{- with .endpoint }} - endpoint: {{ . }} - {{- end }} - {{- with .region }} - region: {{ . }} - {{- end}} - bucketnames: {{ $.Values.loki.storage.bucketNames.ruler }} - {{- with .secretAccessKey }} - secret_access_key: {{ . }} - {{- end }} - {{- with .accessKeyId }} - access_key_id: {{ . }} - {{- end }} - s3forcepathstyle: {{ .s3ForcePathStyle }} - insecure: {{ .insecure }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "gcs" -}} -{{- with .Values.loki.storage.gcs }} -type: "gcs" -gcs: - bucket_name: {{ $.Values.loki.storage.bucketNames.ruler }} - chunk_buffer_size: {{ .chunkBufferSize }} - request_timeout: {{ .requestTimeout }} - enable_http2: {{ .enableHttp2 }} -{{- end -}} -{{- else if eq .Values.loki.storage.type "azure" -}} -{{- with .Values.loki.storage.azure }} -type: "azure" -azure: - account_name: {{ .accountName }} - {{- with .accountKey }} - account_key: {{ . }} - {{- end }} - container_name: {{ $.Values.loki.storage.bucketNames.ruler }} - use_managed_identity: {{ .useManagedIdentity }} - use_federated_token: {{ .useFederatedToken }} - {{- with .userAssignedId }} - user_assigned_id: {{ . }} - {{- end }} - {{- with .requestTimeout }} - request_timeout: {{ . }} - {{- end }} - {{- with .endpointSuffix }} - endpoint_suffix: {{ . }} - {{- end }} -{{- end -}} -{{- else }} -type: "local" -{{- end -}} -{{- end -}} - -{{/* Loki ruler config */}} -{{- define "loki.rulerConfig" }} -ruler: - storage: - {{- include "loki.rulerStorageConfig" . | nindent 4}} -{{- if (not (empty .Values.loki.rulerConfig)) }} -{{- toYaml .Values.loki.rulerConfig | nindent 2}} -{{- end }} -{{- end }} - -{{/* -Calculate the config from structured and unstructred text input -*/}} -{{- define "loki.calculatedConfig" -}} -{{ tpl (mergeOverwrite (tpl .Values.loki.config . | fromYaml) .Values.loki.structuredConfig | toYaml) . }} -{{- end }} - -{{/* -The volume to mount for loki configuration -*/}} -{{- define "loki.configVolume" -}} -{{- if eq .Values.loki.configStorageType "Secret" -}} -secret: - secretName: {{ tpl .Values.loki.externalConfigSecretName . }} -{{- else if eq .Values.loki.configStorageType "ConfigMap" -}} -configMap: - name: {{ tpl .Values.loki.externalConfigSecretName . }} - items: - - key: "config.yaml" - path: "config.yaml" -{{- end -}} -{{- end -}} - -{{/* -Memcached Docker image -*/}} -{{- define "loki.memcachedImage" -}} -{{- $dict := dict "service" .Values.memcached.image "global" .Values.global.image -}} -{{- include "loki.image" $dict -}} -{{- end }} - -{{/* -Memcached Exporter Docker image -*/}} -{{- define "loki.memcachedExporterImage" -}} -{{- $dict := dict "service" .Values.memcachedExporter.image "global" .Values.global.image -}} -{{- include "loki.image" $dict -}} -{{- end }} - -{{/* -Return the appropriate apiVersion for ingress. -*/}} -{{- define "loki.ingress.apiVersion" -}} - {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version) -}} - {{- print "networking.k8s.io/v1" -}} - {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}} - {{- print "networking.k8s.io/v1beta1" -}} - {{- else -}} - {{- print "extensions/v1beta1" -}} - {{- end -}} -{{- end -}} - -{{/* -Return if ingress is stable. -*/}} -{{- define "loki.ingress.isStable" -}} - {{- eq (include "loki.ingress.apiVersion" .) "networking.k8s.io/v1" -}} -{{- end -}} - -{{/* -Return if ingress supports ingressClassName. -*/}} -{{- define "loki.ingress.supportsIngressClassName" -}} - {{- or (eq (include "loki.ingress.isStable" .) "true") (and (eq (include "loki.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) -}} -{{- end -}} - -{{/* -Return if ingress supports pathType. -*/}} -{{- define "loki.ingress.supportsPathType" -}} - {{- or (eq (include "loki.ingress.isStable" .) "true") (and (eq (include "loki.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) -}} -{{- end -}} - -{{/* -Generate list of ingress service paths based on deployment type -*/}} -{{- define "loki.ingress.servicePaths" -}} -{{- if (eq (include "loki.deployment.isScalable" .) "true") -}} -{{- include "loki.ingress.scalableServicePaths" . }} -{{- else -}} -{{- include "loki.ingress.singleBinaryServicePaths" . }} -{{- end -}} -{{- end -}} - -{{/* -Ingress service paths for scalable deployment -*/}} -{{- define "loki.ingress.scalableServicePaths" -}} -{{- include "loki.ingress.servicePath" (dict "ctx" . "svcName" "read" "paths" .Values.ingress.paths.read )}} -{{- include "loki.ingress.servicePath" (dict "ctx" . "svcName" "write" "paths" .Values.ingress.paths.write )}} -{{- end -}} - -{{/* -Ingress service paths for single binary deployment -*/}} -{{- define "loki.ingress.singleBinaryServicePaths" -}} -{{- include "loki.ingress.servicePath" (dict "ctx" . "svcName" "singleBinary" "paths" .Values.ingress.paths.singleBinary )}} -{{- end -}} - -{{/* -Ingress service path helper function -Params: - ctx = . context - svcName = service name without the "loki.fullname" part (ie. read, write) - paths = list of url paths to allow ingress for -*/}} -{{- define "loki.ingress.servicePath" -}} -{{- $ingressApiIsStable := eq (include "loki.ingress.isStable" .ctx) "true" -}} -{{- $ingressSupportsPathType := eq (include "loki.ingress.supportsPathType" .ctx) "true" -}} -{{- range .paths }} -- path: {{ . }} - {{- if $ingressSupportsPathType }} - pathType: Prefix - {{- end }} - backend: - {{- if $ingressApiIsStable }} - {{- $serviceName := include "loki.ingress.serviceName" (dict "ctx" $.ctx "svcName" $.svcName) }} - service: - name: {{ $serviceName }} - port: - number: 3100 - {{- else }} - serviceName: {{ $serviceName }} - servicePort: 3100 -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Ingress service name helper function -Params: - ctx = . context - svcName = service name without the "loki.fullname" part (ie. read, write) -*/}} -{{- define "loki.ingress.serviceName" -}} -{{- if (eq .svcName "singleBinary") }} -{{- printf "%s" (include "loki.singleBinaryFullname" .ctx) }} -{{- else }} -{{- printf "%s-%s" (include "loki.name" .ctx) .svcName }} -{{- end -}} -{{- end -}} - -{{/* -Create the service endpoint including port for MinIO. -*/}} -{{- define "loki.minio" -}} -{{- if .Values.minio.enabled -}} -{{- printf "%s-%s.%s.svc:%s" .Release.Name "minio" .Release.Namespace (.Values.minio.service.port | toString) -}} -{{- end -}} -{{- end -}} - -{{/* Determine if deployment is using object storage */}} -{{- define "loki.isUsingObjectStorage" -}} -{{- or (eq .Values.loki.storage.type "gcs") (eq .Values.loki.storage.type "s3") (eq .Values.loki.storage.type "azure") -}} -{{- end -}} - -{{/* Configure the correct name for the memberlist service */}} -{{- define "loki.memberlist" -}} -{{ include "loki.name" . }}-memberlist -{{- end -}} - -{{/* Determine the public host for the Loki cluster */}} -{{- define "loki.host" -}} -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- $url := printf "%s.%s.svc.%s.:%s" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain (.Values.gateway.service.port | toString) }} -{{- if and $isSingleBinary (not .Values.gateway.enabled) }} - {{- $url = printf "%s.%s.svc.%s.:3100" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain }} -{{- end }} -{{- printf "%s" $url -}} -{{- end -}} - -{{/* Determine the public endpoint for the Loki cluster */}} -{{- define "loki.address" -}} -{{- printf "http://%s" (include "loki.host" . ) -}} -{{- end -}} - -{{/* Name of the cluster */}} -{{- define "loki.clusterName" -}} -{{- $name := .Values.enterprise.cluster_name | default .Release.Name }} -{{- printf "%s" $name -}} -{{- end -}} - -{{/* Name of kubernetes secret to persist GEL admin token to */}} -{{- define "enterprise-logs.adminTokenSecret" }} -{{- .Values.enterprise.adminToken.secret | default (printf "%s-admin-token" (include "loki.name" . )) -}} -{{- end -}} - -{{/* Prefix for provisioned secrets created for each provisioned tenant */}} -{{- define "enterprise-logs.provisionedSecretPrefix" }} -{{- .Values.enterprise.provisioner.provisionedSecretPrefix | default (printf "%s-provisioned" (include "loki.name" . )) -}} -{{- end -}} - -{{/* Name of kubernetes secret to persist canary credentials in */}} -{{- define "enterprise-logs.selfMonitoringTenantSecret" }} -{{- .Values.enterprise.canarySecret | default (printf "%s-%s" (include "enterprise-logs.provisionedSecretPrefix" . ) .Values.monitoring.selfMonitoring.tenant.name) -}} -{{- end -}} - -{{/* Snippet for the nginx file used by gateway */}} -{{- define "loki.nginxFile" }} -worker_processes 5; ## Default: 1 -error_log /dev/stderr; -pid /tmp/nginx.pid; -worker_rlimit_nofile 8192; - -events { - worker_connections 4096; ## Default: 1024 -} - -http { - client_body_temp_path /tmp/client_temp; - proxy_temp_path /tmp/proxy_temp_path; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - - client_max_body_size 4M; - - proxy_read_timeout 600; ## 10 minutes - proxy_send_timeout 600; - proxy_connect_timeout 600; - - proxy_http_version 1.1; - - default_type application/octet-stream; - log_format {{ .Values.gateway.nginxConfig.logFormat }} - - {{- if .Values.gateway.verboseLogging }} - access_log /dev/stderr main; - {{- else }} - - map $status $loggable { - ~^[23] 0; - default 1; - } - access_log /dev/stderr main if=$loggable; - {{- end }} - - sendfile on; - tcp_nopush on; - resolver {{ .Values.global.dnsService }}.{{ .Values.global.dnsNamespace }}.svc.{{ .Values.global.clusterDomain }}.; - - {{- with .Values.gateway.nginxConfig.httpSnippet }} - {{- tpl . $ | nindent 2 }} - {{- end }} - - server { - listen 8080; - listen [::]:8080; - - {{- if .Values.gateway.basicAuth.enabled }} - auth_basic "Loki"; - auth_basic_user_file /etc/nginx/secrets/.htpasswd; - {{- end }} - - location = / { - return 200 'OK'; - auth_basic off; - } - - {{- $backendHost := include "loki.backendFullname" .}} - {{- $readHost := include "loki.readFullname" .}} - {{- $writeHost := include "loki.writeFullname" .}} - - {{- if .Values.read.legacyReadTarget }} - {{- $backendHost = include "loki.readFullname" . }} - {{- end }} - - {{- if gt (int .Values.singleBinary.replicas) 0 }} - {{- $backendHost = include "loki.singleBinaryFullname" . }} - {{- $readHost = include "loki.singleBinaryFullname" .}} - {{- $writeHost = include "loki.singleBinaryFullname" .}} - {{- end }} - - {{- $writeUrl := printf "http://%s.%s.svc.%s:3100" $writeHost .Release.Namespace .Values.global.clusterDomain }} - {{- $readUrl := printf "http://%s.%s.svc.%s:3100" $readHost .Release.Namespace .Values.global.clusterDomain }} - {{- $backendUrl := printf "http://%s.%s.svc.%s:3100" $backendHost .Release.Namespace .Values.global.clusterDomain }} - - {{- if .Values.gateway.nginxConfig.customWriteUrl }} - {{- $writeUrl = .Values.gateway.nginxConfig.customWriteUrl }} - {{- end }} - {{- if .Values.gateway.nginxConfig.customReadUrl }} - {{- $readUrl = .Values.gateway.nginxConfig.customReadUrl }} - {{- end }} - {{- if .Values.gateway.nginxConfig.customBackendUrl }} - {{- $backendUrl = .Values.gateway.nginxConfig.customBackendUrl }} - {{- end }} - - - # Distributor - location = /api/prom/push { - proxy_pass {{ $writeUrl }}$request_uri; - } - location = /loki/api/v1/push { - proxy_pass {{ $writeUrl }}$request_uri; - } - location = /distributor/ring { - proxy_pass {{ $writeUrl }}$request_uri; - } - - # Ingester - location = /flush { - proxy_pass {{ $writeUrl }}$request_uri; - } - location ^~ /ingester/ { - proxy_pass {{ $writeUrl }}$request_uri; - } - location = /ingester { - internal; # to suppress 301 - } - - # Ring - location = /ring { - proxy_pass {{ $writeUrl }}$request_uri; - } - - # MemberListKV - location = /memberlist { - proxy_pass {{ $writeUrl }}$request_uri; - } - - - # Ruler - location = /ruler/ring { - proxy_pass {{ $backendUrl }}$request_uri; - } - location = /api/prom/rules { - proxy_pass {{ $backendUrl }}$request_uri; - } - location ^~ /api/prom/rules/ { - proxy_pass {{ $backendUrl }}$request_uri; - } - location = /loki/api/v1/rules { - proxy_pass {{ $backendUrl }}$request_uri; - } - location ^~ /loki/api/v1/rules/ { - proxy_pass {{ $backendUrl }}$request_uri; - } - location = /prometheus/api/v1/alerts { - proxy_pass {{ $backendUrl }}$request_uri; - } - location = /prometheus/api/v1/rules { - proxy_pass {{ $backendUrl }}$request_uri; - } - - # Compactor - location = /compactor/ring { - proxy_pass {{ $backendUrl }}$request_uri; - } - location = /loki/api/v1/delete { - proxy_pass {{ $backendUrl }}$request_uri; - } - location = /loki/api/v1/cache/generation_numbers { - proxy_pass {{ $backendUrl }}$request_uri; - } - - # IndexGateway - location = /indexgateway/ring { - proxy_pass {{ $backendUrl }}$request_uri; - } - - # QueryScheduler - location = /scheduler/ring { - proxy_pass {{ $backendUrl }}$request_uri; - } - - # Config - location = /config { - proxy_pass {{ $backendUrl }}$request_uri; - } - - {{- if and .Values.enterprise.enabled .Values.enterprise.adminApi.enabled }} - # Admin API - location ^~ /admin/api/ { - proxy_pass {{ $backendUrl }}$request_uri; - } - location = /admin/api { - internal; # to suppress 301 - } - {{- end }} - - - # QueryFrontend, Querier - location = /api/prom/tail { - proxy_pass {{ $readUrl }}$request_uri; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - location = /loki/api/v1/tail { - proxy_pass {{ $readUrl }}$request_uri; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - location ^~ /api/prom/ { - proxy_pass {{ $readUrl }}$request_uri; - } - location = /api/prom { - internal; # to suppress 301 - } - location ^~ /loki/api/v1/ { - proxy_pass {{ $readUrl }}$request_uri; - } - location = /loki/api/v1 { - internal; # to suppress 301 - } - - - {{- with .Values.gateway.nginxConfig.serverSnippet }} - {{ . | nindent 4 }} - {{- end }} - } -} -{{- end }} - -{{/* Configure enableServiceLinks in pod */}} -{{- define "loki.enableServiceLinks" -}} -{{- if semverCompare ">=1.13-0" .Capabilities.KubeVersion.Version -}} -{{- if or (.Values.loki.enableServiceLinks) (ne .Values.loki.enableServiceLinks false) -}} -enableServiceLinks: true -{{- else -}} -enableServiceLinks: false -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* Determine compactor address based on target configuration */}} -{{- define "loki.compactorAddress" -}} -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- $compactorAddress := include "loki.backendFullname" . -}} -{{- if and $isSimpleScalable .Values.read.legacyReadTarget -}} -{{/* 2 target configuration */}} -{{- $compactorAddress = include "loki.readFullname" . -}} -{{- else if (not $isSimpleScalable) -}} -{{/* single binary */}} -{{- $compactorAddress = include "loki.singleBinaryFullname" . -}} -{{- end -}} -{{- printf "%s" $compactorAddress }} -{{- end }} - -{{/* Determine query-scheduler address */}} -{{- define "loki.querySchedulerAddress" -}} -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- $schedulerAddress := ""}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) -}} -{{- $schedulerAddress = printf "query-scheduler-discovery.%s.svc.%s.:9095" .Release.Namespace .Values.global.clusterDomain -}} -{{- end -}} -{{- printf "%s" $schedulerAddress }} -{{- end }} diff --git a/charts/loki/templates/backend/_helpers-backend.tpl b/charts/loki/templates/backend/_helpers-backend.tpl deleted file mode 100644 index 08f5f8f7..00000000 --- a/charts/loki/templates/backend/_helpers-backend.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -backend fullname -*/}} -{{- define "loki.backendFullname" -}} -{{ include "loki.name" . }}-backend -{{- end }} - -{{/* -backend common labels -*/}} -{{- define "loki.backendLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: backend -{{- end }} - -{{/* -backend selector labels -*/}} -{{- define "loki.backendSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: backend -{{- end }} - -{{/* -backend priority class name -*/}} -{{- define "loki.backendPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.backend.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/backend/clusterrole.yaml b/charts/loki/templates/backend/clusterrole.yaml deleted file mode 100644 index 176ada05..00000000 --- a/charts/loki/templates/backend/clusterrole.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and (not .Values.rbac.namespaced) (not .Values.rbac.useExistingRole) }} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - labels: - {{- include "loki.labels" . | nindent 4 }} -{{- with .Values.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} - name: {{ template "loki.fullname" . }}-clusterrole -{{- if .Values.sidecar.rules.enabled }} -rules: -- apiGroups: [""] # "" indicates the core API group - resources: ["configmaps", "secrets"] - verbs: ["get", "watch", "list"] -{{- else }} -rules: [] -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/loki/templates/backend/clusterrolebinding.yaml b/charts/loki/templates/backend/clusterrolebinding.yaml deleted file mode 100644 index 1021fd00..00000000 --- a/charts/loki/templates/backend/clusterrolebinding.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if and (not .Values.rbac.namespaced) }} -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "loki.fullname" . }}-clusterrolebinding - labels: - {{- include "loki.labels" . | nindent 4 }} -{{- with .Values.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -subjects: - - kind: ServiceAccount - name: {{ template "loki.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole -{{- if (not .Values.rbac.useExistingRole) }} - name: {{ template "loki.fullname" . }}-clusterrole -{{- else }} - name: {{ .Values.rbac.useExistingRole }} -{{- end }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} \ No newline at end of file diff --git a/charts/loki/templates/backend/hpa.yaml b/charts/loki/templates/backend/hpa.yaml deleted file mode 100644 index ea834d6e..00000000 --- a/charts/loki/templates/backend/hpa.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) ( .Values.backend.autoscaling.enabled ) }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.backendFullname" . }} - labels: - {{- include "loki.backendLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.backendFullname" . }} - minReplicas: {{ .Values.backend.autoscaling.minReplicas }} - maxReplicas: {{ .Values.backend.autoscaling.maxReplicas }} - {{- with .Values.backend.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.backend.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.backend.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/backend/poddisruptionbudget-backend.yaml b/charts/loki/templates/backend/poddisruptionbudget-backend.yaml deleted file mode 100644 index d8ce5b06..00000000 --- a/charts/loki/templates/backend/poddisruptionbudget-backend.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (gt (int .Values.backend.replicas) 1) (not .Values.read.legacyReadTarget ) }} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.backendFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.backendSelectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} diff --git a/charts/loki/templates/backend/query-scheduler-discovery.yaml b/charts/loki/templates/backend/query-scheduler-discovery.yaml deleted file mode 100644 index 01865863..00000000 --- a/charts/loki/templates/backend/query-scheduler-discovery.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: v1 -kind: Service -metadata: - name: query-scheduler-discovery - labels: - {{- include "loki.backendSelectorLabels" . | nindent 4 }} - prometheus.io/service-monitor: "false" -spec: - type: ClusterIP - clusterIP: None - publishNotReadyAddresses: true - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - selector: - {{- include "loki.backendSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/backend/service-backend-headless.yaml b/charts/loki/templates/backend/service-backend-headless.yaml deleted file mode 100644 index 2ed4a9ae..00000000 --- a/charts/loki/templates/backend/service-backend-headless.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.backendFullname" . }}-headless - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendSelectorLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.backend.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - variant: headless - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.backend.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - selector: - {{- include "loki.backendSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/backend/service-backend.yaml b/charts/loki/templates/backend/service-backend.yaml deleted file mode 100644 index 47af89e1..00000000 --- a/charts/loki/templates/backend/service-backend.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.backendFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.backend.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.backend.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - selector: - {{- include "loki.backendSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/backend/statefulset-backend.yaml b/charts/loki/templates/backend/statefulset-backend.yaml deleted file mode 100644 index 366faf62..00000000 --- a/charts/loki/templates/backend/statefulset-backend.yaml +++ /dev/null @@ -1,276 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.backendFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.backendLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.backend.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.backend.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: -{{- if not .Values.backend.autoscaling.enabled }} - replicas: {{ .Values.backend.replicas }} -{{- end }} - podManagementPolicy: {{ .Values.backend.podManagementPolicy }} - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.backendFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.backend.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the backend nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Delete - whenScaled: Delete - {{- end }} - selector: - matchLabels: - {{- include "loki.backendSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print .Template.BasePath "/config.yaml") . | sha256sum }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.backendSelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.backendPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.backend.terminationGracePeriodSeconds }} - {{- if .Values.backend.initContainers }} - initContainers: - {{- with .Values.backend.initContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - containers: - {{- if .Values.sidecar.rules.enabled }} - - name: loki-sc-rules - {{- if .Values.sidecar.image.sha }} - image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}" - {{- else }} - image: "{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}" - {{- end }} - imagePullPolicy: {{ .Values.sidecar.image.pullPolicy }} - env: - - name: METHOD - value: {{ .Values.sidecar.rules.watchMethod }} - - name: LABEL - value: "{{ .Values.sidecar.rules.label }}" - {{- if .Values.sidecar.rules.labelValue }} - - name: LABEL_VALUE - value: {{ quote .Values.sidecar.rules.labelValue }} - {{- end }} - - name: FOLDER - value: "{{ .Values.sidecar.rules.folder }}" - - name: RESOURCE - value: {{ quote .Values.sidecar.rules.resource }} - {{- if .Values.sidecar.enableUniqueFilenames }} - - name: UNIQUE_FILENAMES - value: "{{ .Values.sidecar.enableUniqueFilenames }}" - {{- end }} - {{- if .Values.sidecar.rules.searchNamespace }} - - name: NAMESPACE - value: "{{ .Values.sidecar.rules.searchNamespace | join "," }}" - {{- end }} - {{- if .Values.sidecar.skipTlsVerify }} - - name: SKIP_TLS_VERIFY - value: "{{ .Values.sidecar.skipTlsVerify }}" - {{- end }} - {{- if .Values.sidecar.rules.script }} - - name: SCRIPT - value: "{{ .Values.sidecar.rules.script }}" - {{- end }} - {{- if .Values.sidecar.rules.watchServerTimeout }} - - name: WATCH_SERVER_TIMEOUT - value: "{{ .Values.sidecar.rules.watchServerTimeout }}" - {{- end }} - {{- if .Values.sidecar.rules.watchClientTimeout }} - - name: WATCH_CLIENT_TIMEOUT - value: "{{ .Values.sidecar.rules.watchClientTimeout }}" - {{- end }} - {{- if .Values.sidecar.rules.logLevel }} - - name: LOG_LEVEL - value: "{{ .Values.sidecar.rules.logLevel }}" - {{- end }} - {{- if .Values.sidecar.livenessProbe }} - livenessProbe: - {{ toYaml .Values.livenessProbe | indent 6 }} - {{- end }} - {{- if .Values.sidecar.readinessProbe }} - readinessProbe: - {{ toYaml .Values.readinessProbe | indent 6 }} - {{- end }} - resources: - {{ toYaml .Values.sidecar.resources | indent 6 }} - {{- if .Values.sidecar.securityContext }} - securityContext: - {{- toYaml .Values.sidecar.securityContext | nindent 6 }} - {{- end }} - volumeMounts: - - name: sc-rules-volume - mountPath: {{ .Values.sidecar.rules.folder | quote }} - {{- end}} - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.backend.targetModule }} - - -legacy-read-mode=false - {{- with .Values.backend.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with .Values.backend.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.backend.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: tmp - mountPath: /tmp - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end}} - {{- if .Values.sidecar.rules.enabled }} - - name: sc-rules-volume - mountPath: {{ .Values.sidecar.rules.folder | quote }} - {{- end}} - {{- with .Values.backend.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.backend.resources | nindent 12 }} - {{- with .Values.backend.affinity }} - affinity: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.backend.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.backend.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.backend.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: tmp - emptyDir: {} - - name: config - {{- if .Values.loki.existingSecretForConfig }} - secret: - secretName: {{ .Values.loki.existingSecretForConfig }} - {{- else }} - {{- include "loki.configVolume" . | nindent 10 }} - {{- end }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if .Values.sidecar.rules.enabled }} - - name: sc-rules-volume - {{- if .Values.sidecar.rules.sizeLimit }} - emptyDir: - sizeLimit: {{ .Values.sidecar.rules.sizeLimit }} - {{- else }} - emptyDir: {} - {{- if not .Values.backend.persistence.enabled }} - - name: data - emptyDir: {} - {{- end }} - {{- end -}} - {{- end -}} - {{- with .Values.backend.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.backend.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.backend.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.backend.persistence.size | quote }} - {{- with .Values.backend.persistence.selector }} - selector: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/config.yaml b/charts/loki/templates/config.yaml deleted file mode 100644 index 101abc35..00000000 --- a/charts/loki/templates/config.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if not .Values.loki.existingSecretForConfig -}} -apiVersion: v1 -{{- if eq .Values.loki.configStorageType "Secret" }} -kind: Secret -{{- else }} -kind: ConfigMap -{{- end }} -metadata: - name: {{ tpl .Values.loki.externalConfigSecretName . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -{{- if eq .Values.loki.configStorageType "Secret" }} -data: - config.yaml: {{ include "loki.calculatedConfig" . | b64enc }} -{{- else }} -data: - config.yaml: | - {{ include "loki.calculatedConfig" . | nindent 4 }} -{{- end -}} -{{- end }} diff --git a/charts/loki/templates/extra-manifests.yaml b/charts/loki/templates/extra-manifests.yaml deleted file mode 100644 index a9bb3b6b..00000000 --- a/charts/loki/templates/extra-manifests.yaml +++ /dev/null @@ -1,4 +0,0 @@ -{{ range .Values.extraObjects }} ---- -{{ tpl (toYaml .) $ }} -{{ end }} diff --git a/charts/loki/templates/gateway/_helpers-gateway.tpl b/charts/loki/templates/gateway/_helpers-gateway.tpl deleted file mode 100644 index 272814b6..00000000 --- a/charts/loki/templates/gateway/_helpers-gateway.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{{/* -gateway fullname -*/}} -{{- define "loki.gatewayFullname" -}} -{{ include "loki.name" . }}-gateway -{{- end }} - -{{/* -gateway common labels -*/}} -{{- define "loki.gatewayLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: gateway -{{- end }} - -{{/* -gateway selector labels -*/}} -{{- define "loki.gatewaySelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: gateway -{{- end }} - -{{/* -gateway auth secret name -*/}} -{{- define "loki.gatewayAuthSecret" -}} -{{ .Values.gateway.basicAuth.existingSecret | default (include "loki.gatewayFullname" . ) }} -{{- end }} - -{{/* -gateway Docker image -*/}} -{{- define "loki.gatewayImage" -}} -{{- $dict := dict "service" .Values.gateway.image "global" .Values.global.image -}} -{{- include "loki.baseImage" $dict -}} -{{- end }} - -{{/* -gateway priority class name -*/}} -{{- define "loki.gatewayPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.gateway.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/configmap-gateway.yaml b/charts/loki/templates/gateway/configmap-gateway.yaml deleted file mode 100644 index fe98c73d..00000000 --- a/charts/loki/templates/gateway/configmap-gateway.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if and .Values.gateway.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} -data: - nginx.conf: | - {{- tpl .Values.gateway.nginxConfig.file . | indent 2 }} -{{- end }} diff --git a/charts/loki/templates/gateway/deployment-gateway.yaml b/charts/loki/templates/gateway/deployment-gateway.yaml deleted file mode 100644 index de6321b7..00000000 --- a/charts/loki/templates/gateway/deployment-gateway.yaml +++ /dev/null @@ -1,131 +0,0 @@ -{{- if .Values.gateway.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.backend.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.gateway.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: -{{- if not .Values.gateway.autoscaling.enabled }} - replicas: {{ .Values.gateway.replicas }} -{{- end }} -{{- with .Values.gateway.deploymentStrategy }} - strategy: -{{ toYaml . | trim | indent 4 }} -{{- end }} - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.gatewaySelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print .Template.BasePath "/gateway/configmap-gateway.yaml") . | sha256sum }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.gateway.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.gateway.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.gatewaySelectorLabels" . | nindent 8 }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{ include "loki.enableServiceLinks" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end -}} - {{- include "loki.gatewayPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.gateway.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.gateway.terminationGracePeriodSeconds }} - containers: - - name: nginx - image: {{ include "loki.gatewayImage" . }} - imagePullPolicy: {{ .Values.gateway.image.pullPolicy }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - {{- with .Values.gateway.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.gateway.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - readinessProbe: - {{- toYaml .Values.gateway.readinessProbe | nindent 12 }} - securityContext: - {{- toYaml .Values.gateway.containerSecurityContext | nindent 12 }} - {{- with .Values.gateway.lifecycle }} - lifecycle: - {{- toYaml . | nindent 12 }} - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/nginx - {{- if .Values.gateway.basicAuth.enabled }} - - name: auth - mountPath: /etc/nginx/secrets - {{- end }} - - name: tmp - mountPath: /tmp - - name: docker-entrypoint-d-override - mountPath: /docker-entrypoint.d - {{- if .Values.gateway.extraVolumeMounts }} - {{- toYaml .Values.gateway.extraVolumeMounts | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.gateway.resources | nindent 12 }} - {{- with .Values.gateway.affinity }} - affinity: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.gateway.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.gateway.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.gateway.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ include "loki.gatewayFullname" . }} - {{- if .Values.gateway.basicAuth.enabled }} - - name: auth - secret: - secretName: {{ include "loki.gatewayAuthSecret" . }} - {{- end }} - - name: tmp - emptyDir: {} - - name: docker-entrypoint-d-override - emptyDir: {} - {{- if .Values.gateway.extraVolumes }} - {{- toYaml .Values.gateway.extraVolumes | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/hpa.yaml b/charts/loki/templates/gateway/hpa.yaml deleted file mode 100644 index 3541ec69..00000000 --- a/charts/loki/templates/gateway/hpa.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if .Values.gateway.autoscaling.enabled }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "loki.gatewayFullname" . }} - minReplicas: {{ .Values.gateway.autoscaling.minReplicas }} - maxReplicas: {{ .Values.gateway.autoscaling.maxReplicas }} - {{- with .Values.gateway.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.gateway.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.gateway.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/ingress-gateway.yaml b/charts/loki/templates/gateway/ingress-gateway.yaml deleted file mode 100644 index 6f18e339..00000000 --- a/charts/loki/templates/gateway/ingress-gateway.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{{- if and .Values.gateway.enabled -}} -{{- if .Values.gateway.ingress.enabled -}} -{{- $ingressApiIsStable := eq (include "loki.ingress.isStable" .) "true" -}} -{{- $ingressSupportsIngressClassName := eq (include "loki.ingress.supportsIngressClassName" .) "true" -}} -{{- $ingressSupportsPathType := eq (include "loki.ingress.supportsPathType" .) "true" -}} -apiVersion: {{ include "loki.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} - {{- range $labelKey, $labelValue := .Values.gateway.ingress.labels }} - {{ $labelKey }}: {{ $labelValue | toYaml }} - {{- end }} - {{- with .Values.gateway.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and $ingressSupportsIngressClassName .Values.gateway.ingress.ingressClassName }} - ingressClassName: {{ .Values.gateway.ingress.ingressClassName }} - {{- end -}} - {{- if .Values.gateway.ingress.tls }} - tls: - {{- range .Values.gateway.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ tpl . $ | quote }} - {{- end }} - {{- with .secretName }} - secretName: {{ . }} - {{- end }} - {{- end }} - {{- end }} - rules: - {{- range .Values.gateway.ingress.hosts }} - - host: {{ tpl .host $ | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if $ingressSupportsPathType }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if $ingressApiIsStable }} - service: - name: {{ include "loki.gatewayFullname" $ }} - port: - number: {{ $.Values.gateway.service.port }} - {{- else }} - serviceName: {{ include "loki.gatewayFullname" $ }} - servicePort: {{ $.Values.gateway.service.port }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/poddisruptionbudget-gateway.yaml b/charts/loki/templates/gateway/poddisruptionbudget-gateway.yaml deleted file mode 100644 index 0057c565..00000000 --- a/charts/loki/templates/gateway/poddisruptionbudget-gateway.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.gateway.enabled }} -{{- if or - (and (not .Values.gateway.autoscaling.enabled) (gt (int .Values.gateway.replicas) 1)) - (and .Values.gateway.autoscaling.enabled (gt (int .Values.gateway.autoscaling.minReplicas) 1)) -}} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.gatewaySelectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/secret-gateway.yaml b/charts/loki/templates/gateway/secret-gateway.yaml deleted file mode 100644 index c3c5e9a2..00000000 --- a/charts/loki/templates/gateway/secret-gateway.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- with .Values.gateway }} -{{- if and .enabled .basicAuth.enabled (not .basicAuth.existingSecret) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "loki.gatewayFullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" $ | nindent 4 }} -stringData: - .htpasswd: | - {{- tpl .basicAuth.htpasswd $ | nindent 4 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/gateway/service-gateway.yaml b/charts/loki/templates/gateway/service-gateway.yaml deleted file mode 100644 index 5cb7a55c..00000000 --- a/charts/loki/templates/gateway/service-gateway.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.gateway.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.gatewayFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.gatewayLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.gateway.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.gateway.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: {{ .Values.gateway.service.type }} - {{- with .Values.gateway.service.clusterIP }} - clusterIP: {{ . }} - {{- end }} - {{- if and (eq "LoadBalancer" .Values.gateway.service.type) .Values.gateway.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.gateway.service.loadBalancerIP }} - {{- end }} - ports: - - name: http - port: {{ .Values.gateway.service.port }} - targetPort: http - {{- if and (eq "NodePort" .Values.gateway.service.type) .Values.gateway.service.nodePort }} - nodePort: {{ .Values.gateway.service.nodePort }} - {{- end }} - protocol: TCP - selector: - {{- include "loki.gatewaySelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/ingress.yaml b/charts/loki/templates/ingress.yaml deleted file mode 100644 index ddbcf7fd..00000000 --- a/charts/loki/templates/ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.ingress.enabled }} -{{- $ingressSupportsIngressClassName := eq (include "loki.ingress.supportsIngressClassName" .) "true" -}} -apiVersion: {{ include "loki.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ include "loki.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.ingress.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and $ingressSupportsIngressClassName .Values.ingress.ingressClassName }} - ingressClassName: {{ .Values.ingress.ingressClassName }} - {{- end -}} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ tpl . $ | quote }} - {{- end }} - {{- with .secretName }} - secretName: {{ . }} - {{- end }} - {{- end }} - {{- end }} - rules: - {{- range $.Values.ingress.hosts }} - - host: {{ tpl . $ | quote }} - http: - paths: - {{- include "loki.ingress.servicePaths" $ | indent 10}} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/loki-canary/_helpers.tpl b/charts/loki/templates/loki-canary/_helpers.tpl deleted file mode 100644 index 2ea8dd75..00000000 --- a/charts/loki/templates/loki-canary/_helpers.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* -canary fullname -*/}} -{{- define "loki-canary.fullname" -}} -{{ include "loki.name" . }}-canary -{{- end }} - -{{/* -canary common labels -*/}} -{{- define "loki-canary.labels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: canary -{{- end }} - -{{/* -canary selector labels -*/}} -{{- define "loki-canary.selectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: canary -{{- end }} - -{{/* -Docker image name for loki-canary -*/}} -{{- define "loki-canary.image" -}} -{{- $dict := dict "service" .Values.monitoring.lokiCanary.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - -{{/* -canary priority class name -*/}} -{{- define "loki-canary.priorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.monitoring.lokiCanary.priorityClassName .Values.read.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/loki-canary/daemonset.yaml b/charts/loki/templates/loki-canary/daemonset.yaml deleted file mode 100644 index 250d1a8a..00000000 --- a/charts/loki/templates/loki-canary/daemonset.yaml +++ /dev/null @@ -1,111 +0,0 @@ -{{- with .Values.monitoring.lokiCanary -}} -{{- if .enabled -}} ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: {{ include "loki-canary.fullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki-canary.labels" $ | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki-canary.selectorLabels" $ | nindent 6 }} - {{- with .updateStrategy }} - updateStrategy: - {{- toYaml . | nindent 4 }} - {{- end }} - template: - metadata: - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki-canary.selectorLabels" $ | nindent 8 }} - {{- with .podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki-canary.fullname" $ }} - {{- with $.Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki-canary.priorityClassName" $ | nindent 6 }} - securityContext: - {{- toYaml $.Values.loki.podSecurityContext | nindent 8 }} - containers: - - name: loki-canary - image: {{ include "loki-canary.image" $ }} - imagePullPolicy: {{ $.Values.loki.image.pullPolicy }} - args: - - -addr={{- include "loki.host" $ }} - - -labelname={{ .labelname }} - - -labelvalue=$(POD_NAME) - {{- if $.Values.enterprise.enabled }} - - -user=$(USER) - - -tenant-id=$(USER) - - -pass=$(PASS) - {{- else if $.Values.loki.auth_enabled }} - - -user={{ $.Values.monitoring.selfMonitoring.tenant.name }} - - -tenant-id={{ $.Values.monitoring.selfMonitoring.tenant.name }} - {{- end }} - {{- with .extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml $.Values.loki.containerSecurityContext | nindent 12 }} - ports: - - name: http-metrics - containerPort: 3500 - protocol: TCP - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - {{ if $.Values.enterprise.enabled }} - - name: USER - valueFrom: - secretKeyRef: - name: {{ include "enterprise-logs.selfMonitoringTenantSecret" $ }} - key: username - - name: PASS - valueFrom: - secretKeyRef: - name: {{ include "enterprise-logs.selfMonitoringTenantSecret" $ }} - key: password - {{- end -}} - {{- with .extraEnv }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - readinessProbe: - httpGet: - path: /metrics - port: http-metrics - initialDelaySeconds: 15 - timeoutSeconds: 1 - {{- with .resources}} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .dnsConfig }} - dnsConfig: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/loki-canary/service.yaml b/charts/loki/templates/loki-canary/service.yaml deleted file mode 100644 index d0fb34e3..00000000 --- a/charts/loki/templates/loki-canary/service.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- with .Values.monitoring.lokiCanary -}} -{{- if .enabled -}} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki-canary.fullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki-canary.labels" $ | nindent 4 }} - {{- with $.Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with $.Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3500 - targetPort: http-metrics - protocol: TCP - selector: - {{- include "loki-canary.selectorLabels" $ | nindent 4 }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/loki-canary/serviceaccount.yaml b/charts/loki/templates/loki-canary/serviceaccount.yaml deleted file mode 100644 index dbcd2b34..00000000 --- a/charts/loki/templates/loki-canary/serviceaccount.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- with .Values.monitoring.lokiCanary -}} -{{- if .enabled -}} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "loki-canary.fullname" $ }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki-canary.labels" $ | nindent 4 }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ $.Values.serviceAccount.automountServiceAccountToken }} -{{- with $.Values.serviceAccount.imagePullSecrets }} -imagePullSecrets: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/_helpers-monitoring.tpl b/charts/loki/templates/monitoring/_helpers-monitoring.tpl deleted file mode 100644 index e54f1300..00000000 --- a/charts/loki/templates/monitoring/_helpers-monitoring.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{{/* -Client definition for LogsInstance -*/}} -{{- define "loki.logsInstanceClient" -}} -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- $url := printf "http://%s.%s.svc.%s:3100/loki/api/v1/push" (include "loki.writeFullname" .) .Release.Namespace .Values.global.clusterDomain }} -{{- if $isSingleBinary }} - {{- $url = printf "http://%s.%s.svc.%s:3100/loki/api/v1/push" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain }} -{{- else if .Values.gateway.enabled -}} - {{- $url = printf "http://%s.%s.svc.%s/loki/api/v1/push" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain }} -{{- end -}} -- url: {{ $url }} - externalLabels: - cluster: {{ include "loki.clusterLabel" . }} - {{- if .Values.enterprise.enabled }} - basicAuth: - username: - name: {{ include "enterprise-logs.selfMonitoringTenantSecret" . }} - key: username - password: - name: {{ include "enterprise-logs.selfMonitoringTenantSecret" . }} - key: password - {{- else if .Values.loki.auth_enabled }} - tenantId: {{ .Values.monitoring.selfMonitoring.tenant.name | quote }} - {{- end }} -{{- end -}} - -{{/* -Convert a recording rule group to yaml -*/}} -{{- define "loki.ruleGroupToYaml" -}} -{{- range . }} -- name: {{ .name }} - rules: - {{- toYaml .rules | nindent 4 }} -{{- end }} -{{- end }} - -{{/* -GrafanaAgent priority class name -*/}} -{{- define "grafana-agent.priorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.monitoring.selfMonitoring.grafanaAgent.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl b/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl deleted file mode 100644 index 00fd7225..00000000 --- a/charts/loki/templates/monitoring/dashboards/_helpers-dashboards.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{{/* -dashboards name -*/}} -{{- define "loki.dashboardsName" -}} -{{ include "loki.name" . }}-dashboards -{{- end }} diff --git a/charts/loki/templates/monitoring/dashboards/configmap-1.yaml b/charts/loki/templates/monitoring/dashboards/configmap-1.yaml deleted file mode 100644 index 6447a49d..00000000 --- a/charts/loki/templates/monitoring/dashboards/configmap-1.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- with .Values.monitoring.dashboards }} -{{- if and $isSimpleScalable .enabled }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.dashboardsName" $ }}-1 - namespace: {{ .namespace | default $.Release.Namespace }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -data: - "loki-chunks.json": | - {{ $.Files.Get "src/dashboards/loki-chunks.json" | fromJson | toJson }} - "loki-deletion.json": | - {{ $.Files.Get "src/dashboards/loki-deletion.json" | fromJson | toJson }} - "loki-logs.json": | - {{ $.Files.Get "src/dashboards/loki-logs.json" | fromJson | toJson }} - "loki-mixin-recording-rules.json": | - {{ $.Files.Get "src/dashboards/loki-mixin-recording-rules.json" | fromJson | toJson }} - "loki-operational.json": | - {{ $.Files.Get "src/dashboards/loki-operational.json" | fromJson | toJson }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/monitoring/dashboards/configmap-2.yaml b/charts/loki/templates/monitoring/dashboards/configmap-2.yaml deleted file mode 100644 index 6c66d158..00000000 --- a/charts/loki/templates/monitoring/dashboards/configmap-2.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- with .Values.monitoring.dashboards }} -{{- if and $isSimpleScalable .enabled }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.dashboardsName" $ }}-2 - namespace: {{ .namespace | default $.Release.Namespace }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -data: - "loki-reads-resources.json": | - {{ $.Files.Get "src/dashboards/loki-reads-resources.json" | fromJson | toJson }} - "loki-reads.json": | - {{ $.Files.Get "src/dashboards/loki-reads.json" | fromJson | toJson }} - "loki-retention.json": | - {{ $.Files.Get "src/dashboards/loki-retention.json" | fromJson | toJson }} - "loki-writes-resources.json": | - {{ $.Files.Get "src/dashboards/loki-writes-resources.json" | fromJson | toJson }} - "loki-writes.json": | - {{ $.Files.Get "src/dashboards/loki-writes.json" | fromJson | toJson }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/monitoring/grafana-agent.yaml b/charts/loki/templates/monitoring/grafana-agent.yaml deleted file mode 100644 index 5aabe5ec..00000000 --- a/charts/loki/templates/monitoring/grafana-agent.yaml +++ /dev/null @@ -1,91 +0,0 @@ -{{- if .Values.monitoring.selfMonitoring.enabled }} -{{- with .Values.monitoring.selfMonitoring.grafanaAgent }} -apiVersion: monitoring.grafana.com/v1alpha1 -kind: GrafanaAgent -metadata: - name: {{ include "loki.fullname" $ }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - serviceAccountName: {{ include "loki.fullname" $ }}-grafana-agent - enableConfigReadAPI: {{ .enableConfigReadAPI }} - {{- include "grafana-agent.priorityClassName" $ | nindent 2 }} - logs: - instanceSelector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 8 }} - {{- with $.Values.monitoring.serviceMonitor}} - {{- if .metricsInstance.remoteWrite}} - metrics: - instanceSelector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 8 }} - {{- end }} - {{- end }} - ---- - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "loki.fullname" $ }}-grafana-agent - namespace: {{ .namespace | default $.Release.Namespace }} - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "loki.fullname" $ }}-grafana-agent -rules: -- apiGroups: - - "" - resources: - - nodes - - nodes/proxy - - nodes/metrics - - services - - endpoints - - pods - - events - verbs: - - get - - list - - watch -- apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - get - - list - - watch -- nonResourceURLs: - - /metrics - - /metrics/cadvisor - verbs: - - get - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "loki.fullname" $ }}-grafana-agent -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "loki.fullname" $ }}-grafana-agent -subjects: -- kind: ServiceAccount - name: {{ include "loki.fullname" $ }}-grafana-agent - namespace: {{ .namespace | default $.Release.Namespace }} -{{- end}} -{{- end}} diff --git a/charts/loki/templates/monitoring/logs-instance.yaml b/charts/loki/templates/monitoring/logs-instance.yaml deleted file mode 100644 index 34ab6e9a..00000000 --- a/charts/loki/templates/monitoring/logs-instance.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.monitoring.selfMonitoring.enabled }} -{{- with .Values.monitoring.selfMonitoring.logsInstance }} -apiVersion: monitoring.grafana.com/v1alpha1 -kind: LogsInstance -metadata: - name: {{ include "loki.fullname" $ }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - clients: - {{- include "loki.logsInstanceClient" $ | nindent 4}} - {{- with .clients}} - {{- toYaml . | nindent 4 }} - {{- end }} - - podLogsNamespaceSelector: {} - - podLogsSelector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 6 }} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/monitoring/loki-alerts.yaml b/charts/loki/templates/monitoring/loki-alerts.yaml deleted file mode 100644 index f3333df8..00000000 --- a/charts/loki/templates/monitoring/loki-alerts.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- with .Values.monitoring.rules }} -{{- if and ($.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule") .enabled .alerting }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ include "loki.fullname" $ }}-loki-alerts - namespace: {{ .namespace | default $.Release.Namespace }} -spec: - groups: - {{- include "loki.ruleGroupToYaml" (tpl ($.Files.Get "src/alerts.yaml.tpl") $ | fromYaml).groups | indent 4 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/loki-rules.yaml b/charts/loki/templates/monitoring/loki-rules.yaml deleted file mode 100644 index f9eb392b..00000000 --- a/charts/loki/templates/monitoring/loki-rules.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- with .Values.monitoring.rules }} -{{- if and ($.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule") .enabled }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - name: {{ include "loki.fullname" $ }}-loki-rules - namespace: {{ .namespace | default $.Release.Namespace }} -spec: - groups: - {{- include "loki.ruleGroupToYaml" (tpl ($.Files.Get "src/rules.yaml.tpl") $ | fromYaml).groups | indent 4 }} - {{- include "loki.ruleGroupToYaml" .additionalGroups | indent 4 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/metrics-instance.yaml b/charts/loki/templates/monitoring/metrics-instance.yaml deleted file mode 100644 index 82102c0e..00000000 --- a/charts/loki/templates/monitoring/metrics-instance.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.monitoring.serviceMonitor.enabled }} -{{- with .Values.monitoring.serviceMonitor.metricsInstance }} -{{- if and ($.Capabilities.APIVersions.Has "monitoring.grafana.com/v1alpha1/MetricsInstance") .enabled }} -apiVersion: monitoring.grafana.com/v1alpha1 -kind: MetricsInstance -metadata: - name: {{ include "loki.fullname" $ }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- with .remoteWrite}} - remoteWrite: - {{- toYaml . | nindent 4 }} - {{- end }} - - serviceMonitorNamespaceSelector: {} - - serviceMonitorSelector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 6 }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/loki/templates/monitoring/pod-logs.yaml b/charts/loki/templates/monitoring/pod-logs.yaml deleted file mode 100644 index e8ced3dc..00000000 --- a/charts/loki/templates/monitoring/pod-logs.yaml +++ /dev/null @@ -1,56 +0,0 @@ ---- -{{- if .Values.monitoring.selfMonitoring.enabled }} -{{- with .Values.monitoring.selfMonitoring.podLogs }} -apiVersion: monitoring.grafana.com/v1alpha1 -kind: PodLogs -metadata: - name: {{ include "loki.fullname" $ }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - pipelineStages: - - cri: { } - relabelings: - - sourceLabels: - - __meta_kubernetes_pod_node_name - targetLabel: __host__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - action: replace - replacement: "$1" - separator: "-" - sourceLabels: - - __meta_kubernetes_pod_label_app_kubernetes_io_name - - __meta_kubernetes_pod_label_app_kubernetes_io_component - targetLabel: __service__ - - action: replace - replacement: "$1" - separator: "/" - sourceLabels: - - __meta_kubernetes_namespace - - __service__ - targetLabel: job - - action: replace - sourceLabels: - - __meta_kubernetes_pod_container_name - targetLabel: container - - replacement: "{{ include "loki.clusterLabel" $ }}" - targetLabel: cluster - {{- with .relabelings }} - {{- toYaml . | nindent 4 }} - {{- end }} - namespaceSelector: - matchNames: - - {{ $.Release.Namespace }} - selector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 6 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/monitoring/servicemonitor.yaml b/charts/loki/templates/monitoring/servicemonitor.yaml deleted file mode 100644 index 67b03c6f..00000000 --- a/charts/loki/templates/monitoring/servicemonitor.yaml +++ /dev/null @@ -1,60 +0,0 @@ -{{- with .Values.monitoring.serviceMonitor }} -{{- if and ($.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") .enabled }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "loki.fullname" $ }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "loki.labels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- with .namespaceSelector }} - namespaceSelector: - {{- toYaml . | nindent 4 }} - {{- end }} - selector: - matchLabels: - {{- include "loki.selectorLabels" $ | nindent 6 }} - matchExpressions: - - key: prometheus.io/service-monitor - operator: NotIn - values: - - "false" - endpoints: - - port: http-metrics - path: /metrics - {{- with .interval }} - interval: {{ . }} - {{- end }} - {{- with .scrapeTimeout }} - scrapeTimeout: {{ . }} - {{- end }} - relabelings: - - sourceLabels: [job] - replacement: "{{ $.Release.Namespace }}/$1" - targetLabel: job - - replacement: "{{ include "loki.clusterLabel" $ }}" - targetLabel: cluster - {{- with .relabelings }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .metricRelabelings }} - metricRelabelings: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .scheme }} - scheme: {{ . }} - {{- end }} - {{- with .tlsConfig }} - tlsConfig: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/networkpolicy.yaml b/charts/loki/templates/networkpolicy.yaml deleted file mode 100644 index c6d5fa02..00000000 --- a/charts/loki/templates/networkpolicy.yaml +++ /dev/null @@ -1,205 +0,0 @@ -{{- if .Values.networkPolicy.enabled }} ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-namespace-only - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Ingress - - Egress - podSelector: {} - egress: - - to: - - podSelector: {} - ingress: - - from: - - podSelector: {} - ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-egress-dns - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Egress - podSelector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - egress: - - ports: - - port: dns - protocol: UDP - to: - - namespaceSelector: {} - ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-ingress - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Ingress - podSelector: - matchExpressions: - - key: app.kubernetes.io/component - operator: In - values: - {{- if .Values.gateway.enabled }} - - gateway - {{- else }} - - read - - write - {{- end }} - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - ingress: - - ports: - - port: http - protocol: TCP - {{- if .Values.networkPolicy.ingress.namespaceSelector }} - from: - - namespaceSelector: - {{- toYaml .Values.networkPolicy.ingress.namespaceSelector | nindent 12 }} - {{- if .Values.networkPolicy.ingress.podSelector }} - podSelector: - {{- toYaml .Values.networkPolicy.ingress.podSelector | nindent 12 }} - {{- end }} - {{- end }} - ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-ingress-metrics - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Ingress - podSelector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - ingress: - - ports: - - port: http-metrics - protocol: TCP - {{- if .Values.networkPolicy.metrics.cidrs }} - from: - {{- range $cidr := .Values.networkPolicy.metrics.cidrs }} - - ipBlock: - cidr: {{ $cidr }} - {{- end }} - {{- if .Values.networkPolicy.metrics.namespaceSelector }} - - namespaceSelector: - {{- toYaml .Values.networkPolicy.metrics.namespaceSelector | nindent 12 }} - {{- if .Values.networkPolicy.metrics.podSelector }} - podSelector: - {{- toYaml .Values.networkPolicy.metrics.podSelector | nindent 12 }} - {{- end }} - {{- end }} - {{- end }} - -{{- if .Values.ruler.enabled }} ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-egress-alertmanager - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Egress - podSelector: - matchLabels: - {{- include "loki.rulerSelectorLabels" . | nindent 6 }} - egress: - - ports: - - port: {{ .Values.networkPolicy.alertmanager.port }} - protocol: TCP - {{- if .Values.networkPolicy.alertmanager.namespaceSelector }} - to: - - namespaceSelector: - {{- toYaml .Values.networkPolicy.alertmanager.namespaceSelector | nindent 12 }} - {{- if .Values.networkPolicy.alertmanager.podSelector }} - podSelector: - {{- toYaml .Values.networkPolicy.alertmanager.podSelector | nindent 12 }} - {{- end }} - {{- end }} -{{- end }} - -{{- if .Values.networkPolicy.externalStorage.ports }} ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-egress-external-storage - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Egress - podSelector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - egress: - - ports: - {{- range $port := .Values.networkPolicy.externalStorage.ports }} - - port: {{ $port }} - protocol: TCP - {{- end }} - {{- if .Values.networkPolicy.externalStorage.cidrs }} - to: - {{- range $cidr := .Values.networkPolicy.externalStorage.cidrs }} - - ipBlock: - cidr: {{ $cidr }} - {{- end }} - {{- end }} -{{- end }} - -{{- end }} - -{{- if .Values.networkPolicy.discovery.port }} ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ include "loki.name" . }}-egress-discovery - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - policyTypes: - - Egress - podSelector: - matchLabels: - {{- include "loki.selectorLabels" . | nindent 6 }} - egress: - - ports: - - port: {{ .Values.networkPolicy.discovery.port }} - protocol: TCP - {{- if .Values.networkPolicy.discovery.namespaceSelector }} - to: - - namespaceSelector: - {{- toYaml .Values.networkPolicy.discovery.namespaceSelector | nindent 12 }} - {{- if .Values.networkPolicy.discovery.podSelector }} - podSelector: - {{- toYaml .Values.networkPolicy.discovery.podSelector | nindent 12 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/podsecuritypolicy.yaml b/charts/loki/templates/podsecuritypolicy.yaml deleted file mode 100644 index 05470d9f..00000000 --- a/charts/loki/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.rbac.pspEnabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ include "loki.name" . }} - labels: - {{- include "loki.labels" . | nindent 4 }} -{{- if .Values.rbac.pspAnnotations }} - annotations: -{{ toYaml .Values.rbac.pspAnnotations | indent 4 }} -{{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - volumes: - - 'configMap' - - 'emptyDir' - - 'persistentVolumeClaim' - - 'secret' - - 'projected' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - readOnlyRootFilesystem: true - requiredDropCapabilities: - - ALL -{{- end }} diff --git a/charts/loki/templates/provisioner/_helpers.yaml b/charts/loki/templates/provisioner/_helpers.yaml deleted file mode 100644 index 8b04b077..00000000 --- a/charts/loki/templates/provisioner/_helpers.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -provisioner fullname -*/}} -{{- define "enterprise-logs.provisionerFullname" -}} -{{ include "loki.name" . }}-provisioner -{{- end }} - -{{/* -provisioner common labels -*/}} -{{- define "enterprise-logs.provisionerLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: provisioner -{{- end }} - -{{/* -provisioner selector labels -*/}} -{{- define "enterprise-logs.provisionerSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: provisioner -{{- end }} - -{{/* -provisioner image name -*/}} -{{- define "enterprise-logs.provisionerImage" -}} -{{- $dict := dict "service" .Values.enterprise.provisioner.image "global" .Values.global.image "defaultVersion" "latest" -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - - diff --git a/charts/loki/templates/provisioner/job-provisioner.yaml b/charts/loki/templates/provisioner/job-provisioner.yaml deleted file mode 100644 index deb6e73c..00000000 --- a/charts/loki/templates/provisioner/job-provisioner.yaml +++ /dev/null @@ -1,137 +0,0 @@ -{{ if and .Values.enterprise.provisioner.enabled .Values.enterprise.enabled }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.provisionerLabels" . | nindent 4 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.provisioner.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install - "helm.sh/hook-weight": "15" -spec: - backoffLimit: 6 - completions: 1 - parallelism: 1 - template: - metadata: - labels: - {{- include "enterprise-logs.provisionerSelectorLabels" . | nindent 8 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.enterprise.provisioner.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- with .Values.enterprise.provisioner.priorityClassName }} - priorityClassName: {{ . }} - {{- end }} - securityContext: - {{- toYaml .Values.enterprise.provisioner.securityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- range .Values.imagePullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} - initContainers: - - name: provisioner - image: {{ template "enterprise-logs.provisionerImage" . }} - imagePullPolicy: {{ .Values.enterprise.provisioner.image.pullPolicy }} - command: - - /bin/sh - - -exuc - - | - {{- range .Values.enterprise.provisioner.additionalTenants }} - /usr/bin/enterprise-logs-provisioner \ - -bootstrap-path=/bootstrap \ - -cluster-name={{ include "loki.clusterName" $ }} \ - -gel-url={{ include "loki.address" $ }} \ - -instance={{ .name }} \ - -access-policy=write-{{ .name }}:{{ .name }}:logs:write \ - -access-policy=read-{{ .name }}:{{ .name }}:logs:read \ - -token=write-{{ .name }} \ - -token=read-{{ .name }} - {{- end -}} - - {{- with .Values.monitoring.selfMonitoring.tenant }} - /usr/bin/enterprise-logs-provisioner \ - -bootstrap-path=/bootstrap \ - -cluster-name={{ include "loki.clusterName" $ }} \ - -gel-url={{ include "loki.address" $ }} \ - -instance={{ .name }} \ - -access-policy=self-monitoring:{{ .name }}:logs:write,logs:read \ - -token=self-monitoring - {{- end }} - volumeMounts: - {{- with .Values.enterprise.provisioner.extraVolumeMounts }} - {{ toYaml . | nindent 12 }} - {{- end }} - - name: bootstrap - mountPath: /bootstrap - - name: admin-token - mountPath: /bootstrap/token - subPath: token - {{- with .Values.enterprise.provisioner.env }} - env: - {{ toYaml . | nindent 12 }} - {{- end }} - containers: - - name: create-secret - image: {{ include "loki.kubectlImage" . }} - imagePullPolicy: {{ .Values.kubectlImage.pullPolicy }} - command: - - /bin/bash - - -exuc - - | - # In case, the admin resources have already been created, the provisioner job - # does not write the token files to the bootstrap mount. - # Therefore, secrets are only created if the respective token files exist. - # Note: the following bash commands should always return a success status code. - # Therefore, in case the token file does not exist, the first clause of the - # or-operation is successful. - {{- range .Values.enterprise.provisioner.additionalTenants }} - ! test -s /bootstrap/token-write-{{ .name }} || \ - kubectl --namespace "{{ .secretNamespace }}" create secret generic "{{ include "enterprise-logs.provisionedSecretPrefix" $ }}-{{ .name }}" \ - --from-literal=token-write="$(cat /bootstrap/token-write-{{ .name }})" \ - --from-literal=token-read="$(cat /bootstrap/token-read-{{ .name }})" - {{- end }} - {{- $namespace := $.Release.Namespace }} - {{- with .Values.monitoring.selfMonitoring.tenant }} - {{- $secretNamespace := tpl .secretNamespace $ }} - ! test -s /bootstrap/token-self-monitoring || \ - kubectl --namespace "{{ $namespace }}" create secret generic "{{ include "enterprise-logs.selfMonitoringTenantSecret" $ }}" \ - --from-literal=username="{{ .name }}" \ - --from-literal=password="$(cat /bootstrap/token-self-monitoring)" - {{- if not (eq $secretNamespace $namespace) }} - ! test -s /bootstrap/token-self-monitoring || \ - kubectl --namespace "{{ $secretNamespace }}" create secret generic "{{ include "enterprise-logs.selfMonitoringTenantSecret" $ }}" \ - --from-literal=username="{{ .name }}" \ - --from-literal=password="$(cat /bootstrap/token-self-monitoring)" - {{- end }} - {{- end }} - volumeMounts: - {{- with .Values.enterprise.provisioner.extraVolumeMounts }} - {{ toYaml . | nindent 12 }} - {{- end }} - - name: bootstrap - mountPath: /bootstrap - restartPolicy: OnFailure - serviceAccount: {{ include "enterprise-logs.provisionerFullname" . }} - serviceAccountName: {{ include "enterprise-logs.provisionerFullname" . }} - volumes: - - name: admin-token - secret: - secretName: "{{ include "enterprise-logs.adminTokenSecret" . }}" - - name: bootstrap - emptyDir: {} -{{- end }} diff --git a/charts/loki/templates/provisioner/role-provisioner.yaml b/charts/loki/templates/provisioner/role-provisioner.yaml deleted file mode 100644 index e1a636ef..00000000 --- a/charts/loki/templates/provisioner/role-provisioner.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{ if and .Values.enterprise.provisioner.enabled .Values.enterprise.enabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.provisionerLabels" . | nindent 4 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.provisioner.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["create"] -{{- end }} diff --git a/charts/loki/templates/provisioner/rolebinding-provisioner.yaml b/charts/loki/templates/provisioner/rolebinding-provisioner.yaml deleted file mode 100644 index e681e97a..00000000 --- a/charts/loki/templates/provisioner/rolebinding-provisioner.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{ if and .Values.enterprise.provisioner.enabled .Values.enterprise.enabled }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.provisionerLabels" . | nindent 4 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.provisioner.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "enterprise-logs.provisionerFullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} -{{- end }} diff --git a/charts/loki/templates/provisioner/serviceaccount-provisioner.yaml b/charts/loki/templates/provisioner/serviceaccount-provisioner.yaml deleted file mode 100644 index 81e92e9c..00000000 --- a/charts/loki/templates/provisioner/serviceaccount-provisioner.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{ if and .Values.enterprise.provisioner.enabled .Values.enterprise.enabled }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "enterprise-logs.provisionerFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.provisionerLabels" . | nindent 4 }} - {{- with .Values.enterprise.provisioner.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.provisioner.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -{{- end }} diff --git a/charts/loki/templates/read/_helpers-read.tpl b/charts/loki/templates/read/_helpers-read.tpl deleted file mode 100644 index d205314a..00000000 --- a/charts/loki/templates/read/_helpers-read.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -read fullname -*/}} -{{- define "loki.readFullname" -}} -{{ include "loki.name" . }}-read -{{- end }} - -{{/* -read common labels -*/}} -{{- define "loki.readLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: read -{{- end }} - -{{/* -read selector labels -*/}} -{{- define "loki.readSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: read -{{- end }} - -{{/* -read priority class name -*/}} -{{- define "loki.readPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.read.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/read/deployment-read.yaml b/charts/loki/templates/read/deployment-read.yaml deleted file mode 100644 index e468752d..00000000 --- a/charts/loki/templates/read/deployment-read.yaml +++ /dev/null @@ -1,161 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.readFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - app.kubernetes.io/part-of: memberlist - {{- include "loki.readLabels" . | nindent 4 }} - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.backend.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.read.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: - {{- if not .Values.read.autoscaling.enabled }} - replicas: {{ .Values.read.replicas }} - {{- end }} - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.readSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print .Template.BasePath "/config.yaml") . | sha256sum }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app.kubernetes.io/part-of: memberlist - {{- include "loki.readSelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.readPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.read.terminationGracePeriodSeconds }} - containers: - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.read.targetModule }} - - -legacy-read-mode=false - - -common.compactor-grpc-address={{ include "loki.backendFullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:9095 - {{- with .Values.read.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with .Values.read.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.read.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: tmp - mountPath: /tmp - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end}} - {{- with .Values.read.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.read.resources | nindent 12 }} - {{- with .Values.read.affinity }} - affinity: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.read.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.read.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: tmp - emptyDir: {} - - name: data - emptyDir: {} - - name: config - {{- if .Values.loki.existingSecretForConfig }} - secret: - secretName: {{ .Values.loki.existingSecretForConfig }} - {{- else }} - {{- include "loki.configVolume" . | nindent 10 }} - {{- end }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with .Values.read.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/read/hpa.yaml b/charts/loki/templates/read/hpa.yaml deleted file mode 100644 index 5515ecb0..00000000 --- a/charts/loki/templates/read/hpa.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if and $isSimpleScalable ( .Values.read.autoscaling.enabled ) }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.readFullname" . }} - labels: - {{- include "loki.readLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 -{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} - kind: Deployment - name: {{ include "loki.readFullname" . }} -{{- else }} - kind: StatefulSet - name: {{ include "loki.readFullname" . }} -{{- end }} - minReplicas: {{ .Values.read.autoscaling.minReplicas }} - maxReplicas: {{ .Values.read.autoscaling.maxReplicas }} - {{- with .Values.read.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.read.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.read.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/read/poddisruptionbudget-read.yaml b/charts/loki/templates/read/poddisruptionbudget-read.yaml deleted file mode 100644 index af4fcbf1..00000000 --- a/charts/loki/templates/read/poddisruptionbudget-read.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (gt (int .Values.read.replicas) 1) }} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.readFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.readLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.readSelectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} diff --git a/charts/loki/templates/read/service-read-headless.yaml b/charts/loki/templates/read/service-read-headless.yaml deleted file mode 100644 index e3c44008..00000000 --- a/charts/loki/templates/read/service-read-headless.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{ if $isSimpleScalable }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.readFullname" . }}-headless - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.readSelectorLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.read.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - variant: headless - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.read.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - appProtocol: tcp - selector: - {{- include "loki.readSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/read/service-read.yaml b/charts/loki/templates/read/service-read.yaml deleted file mode 100644 index b7306edc..00000000 --- a/charts/loki/templates/read/service-read.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if $isSimpleScalable }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.readFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.readLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.read.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.read.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - selector: - {{- include "loki.readSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/read/statefulset-read.yaml b/charts/loki/templates/read/statefulset-read.yaml deleted file mode 100644 index 4b2c8086..00000000 --- a/charts/loki/templates/read/statefulset-read.yaml +++ /dev/null @@ -1,186 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (.Values.read.legacyReadTarget ) }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.readFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - app.kubernetes.io/part-of: memberlist - {{- include "loki.readLabels" . | nindent 4 }} -spec: -{{- if not .Values.read.autoscaling.enabled }} - replicas: {{ .Values.read.replicas }} -{{- end }} - podManagementPolicy: {{ .Values.read.podManagementPolicy }} - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ printf "%s-headless" (include "loki.readFullname" .) }} - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.read.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the read nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Delete - whenScaled: Delete - {{- end }} - selector: - matchLabels: - {{- include "loki.readSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print .Template.BasePath "/config.yaml") . | sha256sum }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app.kubernetes.io/part-of: memberlist - {{- include "loki.readSelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{ include "loki.enableServiceLinks" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.readPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.read.terminationGracePeriodSeconds }} - containers: - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.read.targetModule }} - {{- with .Values.read.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with .Values.read.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.read.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - {{- with .Values.read.lifecycle }} - lifecycle: - {{- toYaml . | nindent 12 }} - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: tmp - mountPath: /tmp - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end}} - {{- with .Values.read.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.read.resources | nindent 12 }} - {{- with .Values.read.affinity }} - affinity: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.read.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.read.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.read.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: tmp - emptyDir: {} - - name: config - {{- if .Values.loki.existingSecretForConfig }} - secret: - secretName: {{ .Values.loki.existingSecretForConfig }} - {{- else }} - configMap: - name: {{ include "loki.name" . }} - {{- end }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if not .Values.read.persistence.enabled }} - - name: data - emptyDir: {} - {{- end }} - {{- with .Values.read.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.read.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.read.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.read.persistence.size | quote }} - {{- with .Values.read.persistence.selector }} - selector: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/role.yaml b/charts/loki/templates/role.yaml deleted file mode 100644 index 1e714b60..00000000 --- a/charts/loki/templates/role.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if or .Values.rbac.pspEnabled .Values.rbac.sccEnabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "loki.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -{{- if .Values.rbac.pspEnabled }} -rules: - - apiGroups: - - policy - resources: - - podsecuritypolicies - verbs: - - use - resourceNames: - - {{ include "loki.name" . }} -{{- end }} -{{- if .Values.rbac.sccEnabled }} -rules: - - apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - verbs: - - use - resourceNames: - - {{ include "loki.name" . }} - {{- if and .Values.rbac.namespaced .Values.sidecar.rules.enabled }} - - apiGroups: [""] # "" indicates the core API group - resources: ["configmaps", "secrets"] - verbs: ["get", "watch", "list"] - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/rolebinding.yaml b/charts/loki/templates/rolebinding.yaml deleted file mode 100644 index cc0dfd2a..00000000 --- a/charts/loki/templates/rolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if or .Values.rbac.pspEnabled .Values.rbac.sccEnabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "loki.name" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "loki.name" . }} -subjects: - - kind: ServiceAccount - name: {{ include "loki.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} -{{- end }} diff --git a/charts/loki/templates/runtime-configmap.yaml b/charts/loki/templates/runtime-configmap.yaml deleted file mode 100644 index 2f38193d..00000000 --- a/charts/loki/templates/runtime-configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "loki.name" . }}-runtime - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -data: - runtime-config.yaml: | - {{- tpl (toYaml .Values.loki.runtimeConfig) . | nindent 4 }} diff --git a/charts/loki/templates/secret-license.yaml b/charts/loki/templates/secret-license.yaml deleted file mode 100644 index eaa519fc..00000000 --- a/charts/loki/templates/secret-license.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if and (not .Values.enterprise.useExternalLicense) .Values.enterprise.enabled -}} -apiVersion: v1 -kind: Secret -metadata: - name: enterprise-logs-license - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -data: - license.jwt: {{ .Values.enterprise.license.contents | b64enc }} -{{- end }} diff --git a/charts/loki/templates/securitycontextconstraints.yaml b/charts/loki/templates/securitycontextconstraints.yaml deleted file mode 100644 index c3a604d5..00000000 --- a/charts/loki/templates/securitycontextconstraints.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.rbac.sccEnabled }} -apiVersion: security.openshift.io/v1 -kind: SecurityContextConstraints -metadata: - name: {{ include "loki.name" . }} - labels: - {{- include "loki.labels" . | nindent 4 }} -allowHostDirVolumePlugin: false -allowHostIPC: false -allowHostNetwork: false -allowHostPID: false -allowHostPorts: false -allowPrivilegeEscalation: true -allowPrivilegedContainer: false -allowedCapabilities: [] -defaultAddCapabilities: null -fsGroup: - type: RunAsAny -groups: [] -priority: null -readOnlyRootFilesystem: false -requiredDropCapabilities: - - ALL -runAsUser: - type: RunAsAny -seLinuxContext: - type: MustRunAs -seccompProfiles: - - '*' -supplementalGroups: - type: RunAsAny -volumes: - - configMap - - downwardAPI - - emptyDir - - hostPath - - persistentVolumeClaim - - projected - - secret -{{- end }} diff --git a/charts/loki/templates/service-memberlist.yaml b/charts/loki/templates/service-memberlist.yaml deleted file mode 100644 index cacb5b1e..00000000 --- a/charts/loki/templates/service-memberlist.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.memberlist" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: tcp - port: 7946 - targetPort: http-memberlist - protocol: TCP - {{- with .Values.memberlist.service.publishNotReadyAddresses }} - publishNotReadyAddresses: {{ . }} - {{- end }} - selector: - {{- include "loki.selectorLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist diff --git a/charts/loki/templates/serviceaccount.yaml b/charts/loki/templates/serviceaccount.yaml deleted file mode 100644 index dd891413..00000000 --- a/charts/loki/templates/serviceaccount.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{ if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "loki.serviceAccountName" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- tpl (toYaml . | nindent 4) $ }} - {{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} -{{- with .Values.serviceAccount.imagePullSecrets }} -imagePullSecrets: - {{- toYaml . | nindent 2 }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/single-binary/_helpers-single-binary.tpl b/charts/loki/templates/single-binary/_helpers-single-binary.tpl deleted file mode 100644 index 4ea3c6d7..00000000 --- a/charts/loki/templates/single-binary/_helpers-single-binary.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{{/* -singleBinary common labels -*/}} -{{- define "loki.singleBinaryLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: single-binary -{{- end }} - - -{{/* singleBinary selector labels */}} -{{- define "loki.singleBinarySelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: single-binary -{{- end }} - -{{/* -singleBinary priority class name -*/}} -{{- define "loki.singleBinaryPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.singleBinary.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} - -{{/* singleBinary replicas calculation */}} -{{- define "loki.singleBinaryReplicas" -}} -{{- $replicas := 1 }} -{{- $usingObjectStorage := eq (include "loki.isUsingObjectStorage" .) "true" }} -{{- if and $usingObjectStorage (gt (int .Values.singleBinary.replicas) 1)}} -{{- $replicas = int .Values.singleBinary.replicas -}} -{{- end }} -{{- printf "%d" $replicas }} -{{- end }} diff --git a/charts/loki/templates/single-binary/hpa.yaml b/charts/loki/templates/single-binary/hpa.yaml deleted file mode 100644 index c529f189..00000000 --- a/charts/loki/templates/single-binary/hpa.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- $usingObjectStorage := eq (include "loki.isUsingObjectStorage" .) "true" }} -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if and $isSingleBinary $usingObjectStorage ( .Values.singleBinary.autoscaling.enabled ) }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.singleBinaryFullname" . }} - labels: - {{- include "loki.singleBinaryLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.singleBinaryFullname" . }} - minReplicas: {{ .Values.singleBinary.autoscaling.minReplicas }} - maxReplicas: {{ .Values.singleBinary.autoscaling.maxReplicas }} - {{- with .Values.singleBinary.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.singleBinary.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.singleBinary.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/single-binary/pdb.yaml b/charts/loki/templates/single-binary/pdb.yaml deleted file mode 100644 index bb1e1ccc..00000000 --- a/charts/loki/templates/single-binary/pdb.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- if and .Values.podDisruptionBudget $isSingleBinary -}} ---- -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ template "loki.fullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.singleBinarySelectorLabels" . | nindent 6 }} -{{ toYaml .Values.podDisruptionBudget | indent 2 }} -{{- end }} diff --git a/charts/loki/templates/single-binary/service-headless.yaml b/charts/loki/templates/single-binary/service-headless.yaml deleted file mode 100644 index 51e11198..00000000 --- a/charts/loki/templates/single-binary/service-headless.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- if $isSingleBinary }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.name" . }}-headless - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.singleBinary.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - variant: headless - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.singleBinary.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - selector: - {{- include "loki.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/single-binary/service.yaml b/charts/loki/templates/single-binary/service.yaml deleted file mode 100644 index 1dee4eba..00000000 --- a/charts/loki/templates/single-binary/service.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- if $isSingleBinary }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.singleBinaryFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.singleBinary.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.singleBinary.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - selector: - {{- include "loki.singleBinarySelectorLabels" . | nindent 4 }} - {{- with .Values.singleBinary.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/single-binary/statefulset.yaml b/charts/loki/templates/single-binary/statefulset.yaml deleted file mode 100644 index 2f2b1e39..00000000 --- a/charts/loki/templates/single-binary/statefulset.yaml +++ /dev/null @@ -1,195 +0,0 @@ -{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}} -{{- if $isSingleBinary }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.singleBinaryFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.singleBinaryLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.backend.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.singleBinary.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: - replicas: {{ include "loki.singleBinaryReplicas" . }} - podManagementPolicy: Parallel - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.singleBinaryFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.singleBinary.persistence.enableStatefulSetAutoDeletePVC) (.Values.singleBinary.persistence.enabled) }} - {{/* - Data on the singleBinary nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Delete - whenScaled: Delete - {{- end }} - selector: - matchLabels: - {{- include "loki.singleBinarySelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print .Template.BasePath "/config.yaml") . | sha256sum }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.singleBinarySelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{ include "loki.enableServiceLinks" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.singleBinaryPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.singleBinary.terminationGracePeriodSeconds }} - {{- if .Values.singleBinary.initContainers }} - initContainers: - {{- with .Values.singleBinary.initContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - containers: - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.singleBinary.targetModule }} - {{- with .Values.singleBinary.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with .Values.singleBinary.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.singleBinary.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - volumeMounts: - - name: tmp - mountPath: /tmp - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - {{- if .Values.singleBinary.persistence.enabled }} - - name: storage - mountPath: /var/loki - {{- end }} - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end }} - {{- with .Values.singleBinary.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.singleBinary.resources | nindent 12 }} - {{- with .Values.singleBinary.extraContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.affinity }} - affinity: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.singleBinary.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: tmp - emptyDir: {} - - name: config - {{- if .Values.loki.existingSecretForConfig }} - secret: - secretName: {{ .Values.loki.existingSecretForConfig }} - {{- else }} - {{- include "loki.configVolume" . | nindent 10 }} - {{- end }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- with .Values.singleBinary.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.singleBinary.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: storage - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.singleBinary.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.singleBinary.persistence.size | quote }} - {{- with .Values.singleBinary.persistence.selector }} - selector: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/table-manager/_helpers-table-manager.tpl b/charts/loki/templates/table-manager/_helpers-table-manager.tpl deleted file mode 100644 index ff258321..00000000 --- a/charts/loki/templates/table-manager/_helpers-table-manager.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -table-manager fullname -*/}} -{{- define "loki.tableManagerFullname" -}} -{{ include "loki.fullname" . }}-table-manager -{{- end }} - -{{/* -table-manager common labels -*/}} -{{- define "loki.tableManagerLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: table-manager -{{- end }} - -{{/* -table-manager selector labels -*/}} -{{- define "loki.tableManagerSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: table-manager -{{- end }} - -{{/* -table-manager priority class name -*/}} -{{- define "loki.tableManagerPriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.tableManager.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/table-manager/deployment-table-manager.yaml b/charts/loki/templates/table-manager/deployment-table-manager.yaml deleted file mode 100644 index bc14d1f6..00000000 --- a/charts/loki/templates/table-manager/deployment-table-manager.yaml +++ /dev/null @@ -1,118 +0,0 @@ -{{- if .Values.tableManager.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "loki.tableManagerFullname" . }} - labels: - {{- include "loki.tableManagerLabels" . | nindent 4 }} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.tableManager.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - replicas: 1 - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "loki.tableManagerSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print .Template.BasePath "/config.yaml") . | sha256sum }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.tableManagerSelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.tableManagerPriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.tableManager.terminationGracePeriodSeconds }} - containers: - - name: table-manager - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target=table-manager - {{- with .Values.tableManager.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - {{- with .Values.tableManager.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.tableManager.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - livenessProbe: - {{- toYaml .Values.loki.livenessProbe | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - {{- with .Values.tableManager.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.tableManager.resources | nindent 12 }} - {{- if .Values.tableManager.extraContainers }} - {{- toYaml .Values.tableManager.extraContainers | nindent 8}} - {{- end }} - {{- with .Values.tableManager.affinity }} - affinity: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tableManager.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- if .Values.loki.existingSecretForConfig }} - secret: - secretName: {{ .Values.loki.existingSecretForConfig }} - {{- else }} - {{- include "loki.configVolume" . | nindent 10 }} - {{- end }} - {{- with .Values.tableManager.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/table-manager/service-table-manager.yaml b/charts/loki/templates/table-manager/service-table-manager.yaml deleted file mode 100644 index 43443fb5..00000000 --- a/charts/loki/templates/table-manager/service-table-manager.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if .Values.tableManager.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.fullname" . }}-table-manager - labels: - {{- include "loki.labels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.tableManager.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - app.kubernetes.io/component: table-manager - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.tableManager.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - selector: - {{- include "loki.selectorLabels" . | nindent 4 }} - app.kubernetes.io/component: table-manager -{{- end }} diff --git a/charts/loki/templates/table-manager/servicemonitor-table-manager.yaml b/charts/loki/templates/table-manager/servicemonitor-table-manager.yaml deleted file mode 100644 index 09aa7279..00000000 --- a/charts/loki/templates/table-manager/servicemonitor-table-manager.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- if .Values.tableManager.enabled }} -{{- with .Values.serviceMonitor }} -{{- if .enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "loki.tableManagerFullname" $ }} - {{- with .namespace }} - namespace: {{ . }} - {{- end }} - {{- with .annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - labels: - {{- include "loki.tableManagerLabels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- with .namespaceSelector }} - namespaceSelector: - {{- toYaml . | nindent 4 }} - {{- end }} - selector: - matchLabels: - {{- include "loki.tableManagerSelectorLabels" $ | nindent 6 }} - endpoints: - - port: http-metrics - {{- with .interval }} - interval: {{ . }} - {{- end }} - {{- with .scrapeTimeout }} - scrapeTimeout: {{ . }} - {{- end }} - {{- with .relabelings }} - relabelings: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .metricRelabelings }} - metricRelabelings: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .scheme }} - scheme: {{ . }} - {{- end }} - {{- with .tlsConfig }} - tlsConfig: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .targetLabels }} - targetLabels: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/tests/_helpers.tpl b/charts/loki/templates/tests/_helpers.tpl deleted file mode 100644 index 9ef7c157..00000000 --- a/charts/loki/templates/tests/_helpers.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{{/* -Docker image name for loki helm test -*/}} -{{- define "loki.helmTestImage" -}} -{{- $dict := dict "service" .Values.test.image "global" .Values.global.image "defaultVersion" "latest" -}} -{{- include "loki.baseImage" $dict -}} -{{- end -}} - - -{{/* -test common labels -*/}} -{{- define "loki.helmTestLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: helm-test -{{- end }} diff --git a/charts/loki/templates/tests/test-canary.yaml b/charts/loki/templates/tests/test-canary.yaml deleted file mode 100644 index a4f11e21..00000000 --- a/charts/loki/templates/tests/test-canary.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- with .Values.test }} -{{- if and .enabled $.Values.monitoring.selfMonitoring.enabled $.Values.monitoring.lokiCanary.enabled }} ---- -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "loki.name" $ }}-helm-test" - namespace: {{ $.Release.Namespace }} - labels: - {{- include "loki.helmTestLabels" $ | nindent 4 }} - {{- with .labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": test -spec: - containers: - - name: loki-helm-test - image: {{ include "loki.helmTestImage" $ }} - env: - - name: CANARY_PROMETHEUS_ADDRESS - value: "{{ .prometheusAddress }}" - {{- with .timeout }} - - name: CANARY_TEST_TIMEOUT - value: "{{ . }}" - {{- end }} - args: - - -test.v - restartPolicy: Never -{{- end }} -{{- end }} diff --git a/charts/loki/templates/tokengen/_helpers.yaml b/charts/loki/templates/tokengen/_helpers.yaml deleted file mode 100644 index 3c881f2b..00000000 --- a/charts/loki/templates/tokengen/_helpers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{/* -tokengen fullname -*/}} -{{- define "enterprise-logs.tokengenFullname" -}} -{{ include "loki.name" . }}-tokengen -{{- end }} - -{{/* -tokengen common labels -*/}} -{{- define "enterprise-logs.tokengenLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: tokengen -{{- end }} - -{{/* -tokengen selector labels -*/}} -{{- define "enterprise-logs.tokengenSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: tokengen -{{- end }} diff --git a/charts/loki/templates/tokengen/clusterrole-tokengen.yaml b/charts/loki/templates/tokengen/clusterrole-tokengen.yaml deleted file mode 100644 index 19dad880..00000000 --- a/charts/loki/templates/tokengen/clusterrole-tokengen.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "enterprise-logs.tokengenFullname" . }} - labels: - {{- include "enterprise-logs.tokengenLabels" . | nindent 4 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -rules: - - apiGroups: [""] - resources: ["secrets"] - verbs: ["create", "get", "patch"] -{{- end }} diff --git a/charts/loki/templates/tokengen/clusterrolebinding-tokengen.yaml b/charts/loki/templates/tokengen/clusterrolebinding-tokengen.yaml deleted file mode 100644 index 248337ea..00000000 --- a/charts/loki/templates/tokengen/clusterrolebinding-tokengen.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "enterprise-logs.tokengenFullname" . }} - labels: - {{- include "enterprise-logs.tokengenLabels" . | nindent 4 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "enterprise-logs.tokengenFullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "enterprise-logs.tokengenFullname" . }} - namespace: {{ $.Release.Namespace }} -{{- end }} diff --git a/charts/loki/templates/tokengen/job-tokengen.yaml b/charts/loki/templates/tokengen/job-tokengen.yaml deleted file mode 100644 index b917395c..00000000 --- a/charts/loki/templates/tokengen/job-tokengen.yaml +++ /dev/null @@ -1,141 +0,0 @@ -{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "enterprise-logs.tokengenFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.tokengenLabels" . | nindent 4 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install - "helm.sh/hook-weight": "10" -spec: - backoffLimit: 6 - completions: 1 - parallelism: 1 - template: - metadata: - labels: - {{- include "enterprise-logs.tokengenSelectorLabels" . | nindent 8 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 8 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- with .Values.enterprise.tokengen.priorityClassName }} - priorityClassName: {{ . }} - {{- end }} - securityContext: - {{- toYaml .Values.enterprise.tokengen.securityContext | nindent 8 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml .Values.imagePullSecrets | nindent 8 }} - {{- end }} - initContainers: - - name: loki - image: {{ template "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - # The shared emptyDir exists only while the job is running, and is deleted once the job is completed. - # The tokengen generates a new admin token in case the 'token-file' file doesn't exist. - # As a result, subsequent executions of this tokengen job will generate new admin tokens. - # Note that previously generated tokens remain valid, as these remain present in the object storage. - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.enterprise.tokengen.targetModule }} - - -tokengen.token-file=/shared/admin-token - {{- with .Values.enterprise.tokengen.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - volumeMounts: - {{- if .Values.enterprise.tokengen.extraVolumeMounts }} - {{ toYaml .Values.enterprise.tokengen.extraVolumeMounts | nindent 12 }} - {{- end }} - - name: shared - mountPath: /shared - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: license - mountPath: /etc/loki/license - env: - {{- if .Values.enterprise.tokengen.env }} - {{ toYaml .Values.enterprise.tokengen.env | nindent 12 }} - {{- end }} - {{- with .Values.enterprise.tokengen.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - containers: - - name: create-secret - image: {{ include "loki.kubectlImage" . }} - imagePullPolicy: {{ .Values.kubectlImage.pullPolicy }} - command: - - /bin/bash - - -euc - - | - # Create or update admin token secrets generated by tokengen job - kubectl create secret generic "{{ include "enterprise-logs.adminTokenSecret" . }}" \ - --from-file=token=/shared/admin-token \ - --dry-run=client -o yaml \ - | kubectl apply -f - - {{- with .Values.enterprise.adminToken.additionalNamespaces }} - {{- range . }} - kubectl --namespace "{{ . }}" create secret generic "{{ include "enterprise-logs.adminTokenSecret" $ }}" \ - --from-file=token=/shared/admin-token \ - --dry-run=client -o yaml \ - | kubectl apply -f - - {{- end }} - {{- end }} - volumeMounts: - {{- if .Values.enterprise.tokengen.extraVolumeMounts }} - {{ toYaml .Values.enterprise.tokengen.extraVolumeMounts | nindent 12 }} - {{- end }} - - name: shared - mountPath: /shared - - name: config - mountPath: /etc/loki/config - - name: license - mountPath: /etc/loki/license - restartPolicy: OnFailure - serviceAccount: {{ template "enterprise-logs.tokengenFullname" . }} - serviceAccountName: {{ template "enterprise-logs.tokengenFullname" . }} - {{- with .Values.enterprise.tokengen.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- if .Values.enterprise.useExternalConfig }} - secret: - secretName: {{ .Values.enterprise.externalConfigName }} - {{- else }} - configMap: - name: {{ include "loki.name" . }} - {{- end }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - - name: shared - emptyDir: {} - {{- if .Values.enterprise.tokengen.extraVolumes }} - {{ toYaml .Values.enterprise.tokengen.extraVolumes | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/tokengen/serviceaccount-tokengen.yaml b/charts/loki/templates/tokengen/serviceaccount-tokengen.yaml deleted file mode 100644 index 6f0e5a3b..00000000 --- a/charts/loki/templates/tokengen/serviceaccount-tokengen.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{ if and .Values.enterprise.tokengen.enabled .Values.enterprise.enabled }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "enterprise-logs.tokengenFullname" . }} - namespace: {{ $.Release.Namespace }} - labels: - {{- include "enterprise-logs.tokengenLabels" . | nindent 4 }} - {{- with .Values.enterprise.tokengen.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- with .Values.enterprise.tokengen.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - "helm.sh/hook": post-install -{{- end }} diff --git a/charts/loki/templates/validate.yaml b/charts/loki/templates/validate.yaml deleted file mode 100644 index 3a2e8ca7..00000000 --- a/charts/loki/templates/validate.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.config }} -{{- fail "Top level 'config' is not allowed. Most common configuration sections are exposed under the `loki` section. If you need to override the whole config, provide the configuration as a string that can contain template expressions under `loki.config`. Alternatively, you can provide the configuration as an external secret." }} -{{- end }} - -{{- if and (not .Values.monitoring.selfMonitoring.enabled) .Values.test.enabled }} -{{- fail "Helm test requires self monitoring to be enabled"}} -{{- end }} - -{{- if and (not .Values.monitoring.lokiCanary.enabled) .Values.test.enabled }} -{{- fail "Helm test requires the Loki Canary to be enabled"}} -{{- end }} - -{{- if and .Values.test.enabled (not .Values.test.prometheusAddress) }} -{{- fail "Helm test requires a prometheusAddress for an instance scraping the Loki canary's metrics"}} -{{- end }} - -{{- $singleBinaryReplicas := int .Values.singleBinary.replicas }} -{{- $isUsingFilesystem := eq (include "loki.isUsingObjectStorage" .) "false" }} -{{- $atLeastOneScalableReplica := or (gt (int .Values.backend.replicas) 0) (gt (int .Values.read.replicas) 0) (gt (int .Values.write.replicas) 0) }} - -{{- if and $isUsingFilesystem (gt $singleBinaryReplicas 1) }} -{{- fail "Cannot run more than 1 Single Binary replica without an object storage backend."}} -{{- end }} - -{{- if and $isUsingFilesystem (and (eq $singleBinaryReplicas 0) $atLeastOneScalableReplica) }} -{{- fail "Cannot run Scalable targets (backend, read, write) without an object storage backend."}} -{{- end }} diff --git a/charts/loki/templates/write/_helpers-write.tpl b/charts/loki/templates/write/_helpers-write.tpl deleted file mode 100644 index 8f526bcf..00000000 --- a/charts/loki/templates/write/_helpers-write.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* -write fullname -*/}} -{{- define "loki.writeFullname" -}} -{{ include "loki.name" . }}-write -{{- end }} - -{{/* -write common labels -*/}} -{{- define "loki.writeLabels" -}} -{{ include "loki.labels" . }} -app.kubernetes.io/component: write -{{- end }} - -{{/* -write selector labels -*/}} -{{- define "loki.writeSelectorLabels" -}} -{{ include "loki.selectorLabels" . }} -app.kubernetes.io/component: write -{{- end }} - -{{/* -write priority class name -*/}} -{{- define "loki.writePriorityClassName" -}} -{{- $pcn := coalesce .Values.global.priorityClassName .Values.write.priorityClassName -}} -{{- if $pcn }} -priorityClassName: {{ $pcn }} -{{- end }} -{{- end }} diff --git a/charts/loki/templates/write/hpa.yaml b/charts/loki/templates/write/hpa.yaml deleted file mode 100644 index 18d59dbd..00000000 --- a/charts/loki/templates/write/hpa.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} -{{- if and $isSimpleScalable ( .Values.write.autoscaling.enabled ) }} -{{- if $autoscalingv2 }} -apiVersion: autoscaling/v2 -{{- else }} -apiVersion: autoscaling/v2beta1 -{{- end }} -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "loki.writeFullname" . }} - labels: - {{- include "loki.writeLabels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: StatefulSet - name: {{ include "loki.writeFullname" . }} - minReplicas: {{ .Values.write.autoscaling.minReplicas }} - maxReplicas: {{ .Values.write.autoscaling.maxReplicas }} - {{- with .Values.write.autoscaling.behavior }} - behavior: - {{- toYaml . | nindent 4 }} - {{- end }} - metrics: - {{- with .Values.write.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} - {{- with .Values.write.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - {{- if $autoscalingv2 }} - target: - type: Utilization - averageUtilization: {{ . }} - {{- else }} - targetAverageUtilization: {{ . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/loki/templates/write/poddisruptionbudget-write.yaml b/charts/loki/templates/write/poddisruptionbudget-write.yaml deleted file mode 100644 index 9e11a987..00000000 --- a/charts/loki/templates/write/poddisruptionbudget-write.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if and $isSimpleScalable (gt (int .Values.write.replicas) 1) }} -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ include "loki.writeFullname" . }} - labels: - {{- include "loki.writeLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - {{- include "loki.writeSelectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} diff --git a/charts/loki/templates/write/service-write-headless.yaml b/charts/loki/templates/write/service-write-headless.yaml deleted file mode 100644 index 7cf25f85..00000000 --- a/charts/loki/templates/write/service-write-headless.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if $isSimpleScalable }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.writeFullname" . }}-headless - labels: - {{- include "loki.writeSelectorLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.write.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - variant: headless - prometheus.io/service-monitor: "false" - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.write.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - clusterIP: None - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - appProtocol: tcp - selector: - {{- include "loki.writeSelectorLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/loki/templates/write/service-write.yaml b/charts/loki/templates/write/service-write.yaml deleted file mode 100644 index 245b8e4a..00000000 --- a/charts/loki/templates/write/service-write.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if $isSimpleScalable }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "loki.writeFullname" . }} - labels: - {{- include "loki.writeLabels" . | nindent 4 }} - {{- with .Values.loki.serviceLabels }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.write.service.labels }} - {{- toYaml . | nindent 4}} - {{- end }} - annotations: - {{- with .Values.loki.serviceAnnotations }} - {{- toYaml . | nindent 4}} - {{- end }} - {{- with .Values.write.service.annotations }} - {{- toYaml . | nindent 4}} - {{- end }} -spec: - type: ClusterIP - ports: - - name: http-metrics - port: 3100 - targetPort: http-metrics - protocol: TCP - - name: grpc - port: 9095 - targetPort: grpc - protocol: TCP - selector: - {{- include "loki.writeSelectorLabels" . | nindent 4 }} -{{- end }} \ No newline at end of file diff --git a/charts/loki/templates/write/statefulset-write.yaml b/charts/loki/templates/write/statefulset-write.yaml deleted file mode 100644 index 9647a857..00000000 --- a/charts/loki/templates/write/statefulset-write.yaml +++ /dev/null @@ -1,204 +0,0 @@ -{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} -{{- if $isSimpleScalable }} ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "loki.writeFullname" . }} - labels: - {{- include "loki.writeLabels" . | nindent 4 }} - app.kubernetes.io/part-of: memberlist - {{- if or (not (empty .Values.loki.annotations)) (not (empty .Values.backend.annotations))}} - annotations: - {{- with .Values.loki.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- with .Values.write.annotations }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -spec: -{{- if not .Values.write.autoscaling.enabled }} - replicas: {{ .Values.write.replicas }} -{{- end }} - podManagementPolicy: {{ .Values.write.podManagementPolicy }} - updateStrategy: - rollingUpdate: - partition: 0 - serviceName: {{ include "loki.writeFullname" . }}-headless - revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }} - {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.write.persistence.enableStatefulSetAutoDeletePVC) }} - {{/* - Data on the write nodes is easy to replace, so we want to always delete PVCs to make - operation easier, and will rely on re-fetching data when needed. - */}} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Delete - whenScaled: Delete - {{- end }} - selector: - matchLabels: - {{- include "loki.writeSelectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ include (print .Template.BasePath "/config.yaml") . | sha256sum }} - {{- with .Values.loki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.write.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "loki.writeSelectorLabels" . | nindent 8 }} - {{- with .Values.loki.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.write.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.write.selectorLabels }} - {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - app.kubernetes.io/part-of: memberlist - spec: - serviceAccountName: {{ include "loki.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} - {{ include "loki.enableServiceLinks" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "loki.writePriorityClassName" . | nindent 6 }} - securityContext: - {{- toYaml .Values.loki.podSecurityContext | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.write.terminationGracePeriodSeconds }} - {{- if .Values.write.initContainers }} - initContainers: - {{- with .Values.write.initContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- end }} - containers: - - name: loki - image: {{ include "loki.image" . }} - imagePullPolicy: {{ .Values.loki.image.pullPolicy }} - args: - - -config.file=/etc/loki/config/config.yaml - - -target={{ .Values.write.targetModule }} - {{- with .Values.write.extraArgs }} - {{- toYaml . | nindent 12 }} - {{- end }} - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - - name: grpc - containerPort: 9095 - protocol: TCP - - name: http-memberlist - containerPort: 7946 - protocol: TCP - {{- with .Values.write.extraEnv }} - env: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.write.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} - readinessProbe: - {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - {{- if .Values.write.lifecycle }} - lifecycle: - {{- toYaml .Values.write.lifecycle | nindent 12 }} - {{- else if .Values.write.autoscaling.enabled }} - lifecycle: - preStop: - httpGet: - path: "/ingester/flush_shutdown" - port: http-metrics - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/loki/config - - name: runtime-config - mountPath: /etc/loki/runtime-config - - name: data - mountPath: /var/loki - {{- if .Values.enterprise.enabled }} - - name: license - mountPath: /etc/loki/license - {{- end}} - {{- with .Values.write.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.write.resources | nindent 12 }} - {{- with .Values.write.affinity }} - affinity: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.write.dnsConfig }} - dnsConfig: - {{- tpl . $ | nindent 8 }} - {{- end }} - {{- with .Values.write.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.write.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - {{- if .Values.loki.existingSecretForConfig }} - secret: - secretName: {{ .Values.loki.existingSecretForConfig }} - {{- else }} - {{- include "loki.configVolume" . | nindent 10 }} - {{- end }} - - name: runtime-config - configMap: - name: {{ template "loki.name" . }}-runtime - {{- if .Values.enterprise.enabled }} - - name: license - secret: - {{- if .Values.enterprise.useExternalLicense }} - secretName: {{ .Values.enterprise.externalLicenseName }} - {{- else }} - secretName: enterprise-logs-license - {{- end }} - {{- end }} - {{- if not .Values.write.persistence.enabled }} - - name: data - emptyDir: {} - {{- end }} - {{- with .Values.write.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.write.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: - - ReadWriteOnce - {{- with .Values.write.persistence.storageClass }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - resources: - requests: - storage: {{ .Values.write.persistence.size | quote }} - {{- with .Values.write.persistence.selector }} - selector: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- with .Values.write.extraVolumeClaimTemplates }} - {{- toYaml . | nindent 4 }} - {{- end }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/loki/values.yaml b/charts/loki/values.yaml deleted file mode 100644 index 8de786b7..00000000 --- a/charts/loki/values.yaml +++ /dev/null @@ -1,1556 +0,0 @@ -global: - image: - # -- Overrides the Docker registry globally for all images - registry: null - # -- Overrides the priorityClassName for all pods - priorityClassName: null - # -- configures cluster domain ("cluster.local" by default) - clusterDomain: "cluster.local" - # -- configures DNS service name - dnsService: "kube-dns" - # -- configures DNS service namespace - dnsNamespace: "kube-system" -# -- Overrides the chart's name -nameOverride: null -# -- Overrides the chart's computed fullname -fullnameOverride: null -# -- Overrides the chart's cluster label -clusterLabelOverride: null -# -- Image pull secrets for Docker images -imagePullSecrets: [] -kubectlImage: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: bitnami/kubectl - # -- Overrides the image tag whose default is the chart's appVersion - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent -loki: - # Configures the readiness probe for all of the Loki pods - readinessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 30 - timeoutSeconds: 1 - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/loki - # -- Overrides the image tag whose default is the chart's appVersion - # TODO: needed for 3rd target backend functionality - # revert to null or latest once this behavior is relased - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent - # -- Common annotations for all deployments/StatefulSets - annotations: {} - # -- Common annotations for all pods - podAnnotations: {} - # -- Common labels for all pods - podLabels: {} - # -- Common annotations for all services - serviceAnnotations: {} - # -- Common labels for all services - serviceLabels: {} - # -- The number of old ReplicaSets to retain to allow rollback - revisionHistoryLimit: 10 - # -- The SecurityContext for Loki pods - podSecurityContext: - fsGroup: 420 - runAsGroup: 420 - runAsNonRoot: true - runAsUser: 420 - # -- The SecurityContext for Loki containers - containerSecurityContext: - readOnlyRootFilesystem: true - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - # -- Should enableServiceLinks be enabled. Default to enable - enableServiceLinks: true - # -- Specify an existing secret containing loki configuration. If non-empty, overrides `loki.config` - existingSecretForConfig: "" - # -- Defines what kind of object stores the configuration, a ConfigMap or a Secret. - # In order to move sensitive information (such as credentials) from the ConfigMap/Secret to a more secure location (e.g. vault), it is possible to use [environment variables in the configuration](https://grafana.com/docs/loki/latest/configuration/#use-environment-variables-in-the-configuration). - # Such environment variables can be then stored in a separate Secret and injected via the global.extraEnvFrom value. For details about environment injection from a Secret please see [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/#use-case-as-container-environment-variables). - configStorageType: ConfigMap - # -- Name of the Secret or ConfigMap that contains the configuration (used for naming even if config is internal). - externalConfigSecretName: '{{ include "loki.name" . }}' - # -- Config file contents for Loki - # @default -- See values.yaml - config: | - {{- if .Values.enterprise.enabled}} - {{- tpl .Values.enterprise.config . }} - {{- else }} - auth_enabled: {{ .Values.loki.auth_enabled }} - {{- end }} - - {{- with .Values.loki.server }} - server: - {{- toYaml . | nindent 2}} - {{- end}} - - memberlist: - {{- if .Values.loki.memberlistConfig }} - {{- toYaml .Values.loki.memberlistConfig | nindent 2 }} - {{- else }} - {{- if .Values.loki.extraMemberlistConfig}} - {{- toYaml .Values.loki.extraMemberlistConfig | nindent 2}} - {{- end }} - join_members: - - {{ include "loki.memberlist" . }} - {{- with .Values.migrate.fromDistributed }} - {{- if .enabled }} - - {{ .memberlistService }} - {{- end }} - {{- end }} - {{- end }} - - {{- with .Values.loki.ingester }} - ingester: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- if .Values.loki.commonConfig}} - common: - {{- toYaml .Values.loki.commonConfig | nindent 2}} - storage: - {{- include "loki.commonStorageConfig" . | nindent 4}} - {{- end}} - - {{- with .Values.loki.limits_config }} - limits_config: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - runtime_config: - file: /etc/loki/runtime-config/runtime-config.yaml - - {{- with .Values.loki.memcached.chunk_cache }} - {{- if and .enabled (or .host .addresses) }} - chunk_store_config: - chunk_cache_config: - memcached: - batch_size: {{ .batch_size }} - parallelism: {{ .parallelism }} - memcached_client: - {{- if .host }} - host: {{ .host }} - {{- end }} - {{- if .addresses }} - addresses: {{ .addresses }} - {{- end }} - service: {{ .service }} - {{- end }} - {{- end }} - - {{- if .Values.loki.schemaConfig }} - schema_config: - {{- toYaml .Values.loki.schemaConfig | nindent 2}} - {{- else }} - schema_config: - configs: - - from: 2022-01-11 - store: boltdb-shipper - object_store: {{ .Values.loki.storage.type }} - schema: v12 - index: - prefix: loki_index_ - period: 24h - {{- end }} - - {{ include "loki.rulerConfig" . }} - - {{- if or .Values.tableManager.retention_deletes_enabled .Values.tableManager.retention_period }} - table_manager: - retention_deletes_enabled: {{ .Values.tableManager.retention_deletes_enabled }} - retention_period: {{ .Values.tableManager.retention_period }} - {{- end }} - - {{- with .Values.loki.memcached.results_cache }} - query_range: - align_queries_with_step: true - {{- if and .enabled (or .host .addresses) }} - cache_results: {{ .enabled }} - results_cache: - cache: - default_validity: {{ .default_validity }} - memcached_client: - {{- if .host }} - host: {{ .host }} - {{- end }} - {{- if .addresses }} - addresses: {{ .addresses }} - {{- end }} - service: {{ .service }} - timeout: {{ .timeout }} - {{- end }} - {{- end }} - - {{- with .Values.loki.storage_config }} - storage_config: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- with .Values.loki.query_scheduler }} - query_scheduler: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- with .Values.loki.compactor }} - compactor: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- with .Values.loki.analytics }} - analytics: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- with .Values.loki.querier }} - querier: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- with .Values.loki.index_gateway }} - index_gateway: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- with .Values.loki.frontend }} - frontend: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - - {{- with .Values.loki.frontend_worker }} - frontend_worker: - {{- tpl (. | toYaml) $ | nindent 4 }} - {{- end }} - # Should authentication be enabled - auth_enabled: true - # -- memberlist configuration (overrides embedded default) - memberlistConfig: {} - # -- Extra memberlist configuration - extraMemberlistConfig: {} - # -- Tenants list to be created on nginx htpasswd file, with name and password keys - tenants: [] - # -- Check https://grafana.com/docs/loki/latest/configuration/#server for more info on the server configuration. - server: - http_listen_port: 3100 - grpc_listen_port: 9095 - # -- Limits config - limits_config: - enforce_metric_name: false - reject_old_samples: true - reject_old_samples_max_age: 168h - max_cache_freshness_per_query: 10m - split_queries_by_interval: 15m - # -- Provides a reloadable runtime configuration file for some specific configuration - runtimeConfig: {} - # -- Check https://grafana.com/docs/loki/latest/configuration/#common_config for more info on how to provide a common configuration - commonConfig: - path_prefix: /var/loki - replication_factor: 3 - compactor_address: '{{ include "loki.compactorAddress" . }}' - # -- Storage config. Providing this will automatically populate all necessary storage configs in the templated config. - storage: - bucketNames: - chunks: chunks - ruler: ruler - admin: admin - type: s3 - s3: - s3: null - endpoint: null - region: null - secretAccessKey: null - accessKeyId: null - signatureVersion: null - s3ForcePathStyle: false - insecure: false - http_config: {} - gcs: - chunkBufferSize: 0 - requestTimeout: "0s" - enableHttp2: true - azure: - accountName: null - accountKey: null - useManagedIdentity: false - useFederatedToken: false - userAssignedId: null - requestTimeout: null - endpointSuffix: null - filesystem: - chunks_directory: /var/loki/chunks - rules_directory: /var/loki/rules - # -- Configure memcached as an external cache for chunk and results cache. Disabled by default - # must enable and specify a host for each cache you would like to use. - memcached: - chunk_cache: - enabled: false - host: "" - service: "memcached-client" - batch_size: 256 - parallelism: 10 - results_cache: - enabled: false - host: "" - service: "memcached-client" - timeout: "500ms" - default_validity: "12h" - # -- Check https://grafana.com/docs/loki/latest/configuration/#schema_config for more info on how to configure schemas - schemaConfig: {} - # -- Check https://grafana.com/docs/loki/latest/configuration/#ruler for more info on configuring ruler - rulerConfig: {} - # -- Structured loki configuration, takes precedence over `loki.config`, `loki.schemaConfig`, `loki.storageConfig` - structuredConfig: {} - # -- Additional query scheduler config - query_scheduler: {} - # -- Additional storage config - storage_config: - hedging: - at: "250ms" - max_per_second: 20 - up_to: 3 - # -- Optional compactor configuration - compactor: {} - # -- Optional analytics configuration - analytics: {} - # -- Optional querier configuration - querier: {} - # -- Optional ingester configuration - ingester: {} - # -- Optional index gateway configuration - index_gateway: - mode: ring - frontend: - scheduler_address: '{{ include "loki.querySchedulerAddress" . }}' - frontend_worker: - scheduler_address: '{{ include "loki.querySchedulerAddress" . }}' -enterprise: - # Enable enterprise features, license must be provided - enabled: false - # Default verion of GEL to deploy - version: v1.8.0 - # -- Optional name of the GEL cluster, otherwise will use .Release.Name - # The cluster name must match what is in your GEL license - cluster_name: null - # -- Grafana Enterprise Logs license - # In order to use Grafana Enterprise Logs features, you will need to provide - # the contents of your Grafana Enterprise Logs license, either by providing the - # contents of the license.jwt, or the name Kubernetes Secret that contains your - # license.jwt. - # To set the license contents, use the flag `--set-file 'enterprise.license.contents=./license.jwt'` - license: - contents: "NOTAVALIDLICENSE" - # -- Set to true when providing an external license - useExternalLicense: false - # -- Name of external license secret to use - externalLicenseName: null - # -- Name of the external config secret to use - externalConfigName: "" - # -- If enabled, the correct admin_client storage will be configured. If disabled while running enterprise, - # make sure auth is set to `type: trust`, or that `auth_enabled` is set to `false`. - adminApi: - enabled: true - # enterprise specific sections of the config.yaml file - config: | - {{- if .Values.enterprise.adminApi.enabled }} - {{- if or .Values.minio.enabled (eq .Values.loki.storage.type "s3") (eq .Values.loki.storage.type "gcs") (eq .Values.loki.storage.type "azure") }} - admin_client: - storage: - s3: - bucket_name: {{ .Values.loki.storage.bucketNames.admin }} - {{- end }} - {{- end }} - auth: - type: {{ .Values.enterprise.adminApi.enabled | ternary "enterprise" "trust" }} - auth_enabled: {{ .Values.loki.auth_enabled }} - cluster_name: {{ include "loki.clusterName" . }} - license: - path: /etc/loki/license/license.jwt - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/enterprise-logs - # -- Docker image tag - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent - adminToken: - # -- Alternative name for admin token secret, needed by tokengen and provisioner jobs - secret: null - # -- Additional namespace to also create the token in. Useful if your Grafana instance - # is in a different namespace - additionalNamespaces: [] - # -- Alternative name of the secret to store token for the canary - canarySecret: null - # -- Configuration for `tokengen` target - tokengen: - # -- Whether the job should be part of the deployment - enabled: true - # -- Comma-separated list of Loki modules to load for tokengen - targetModule: "tokengen" - # -- Additional CLI arguments for the `tokengen` target - extraArgs: [] - # -- Additional Kubernetes environment - env: [] - # -- Additional labels for the `tokengen` Job - labels: {} - # -- Additional annotations for the `tokengen` Job - annotations: {} - # -- Tolerations for tokengen Job - tolerations: [] - # -- Additional volumes for Pods - extraVolumes: [] - # -- Additional volume mounts for Pods - extraVolumeMounts: [] - # -- Run containers as user `enterprise-logs(uid=10001)` - securityContext: - runAsNonRoot: true - runAsGroup: 10001 - runAsUser: 10001 - fsGroup: 10001 - # -- Environment variables from secrets or configmaps to add to the tokengen pods - extraEnvFrom: [] - # -- The name of the PriorityClass for tokengen Pods - priorityClassName: "" - # -- Configuration for `provisioner` target - provisioner: - # -- Whether the job should be part of the deployment - enabled: true - # -- Name of the secret to store provisioned tokens in - provisionedSecretPrefix: null - # -- Additional tenants to be created. Each tenant will get a read and write policy - # and associated token. Tenant must have a name and a namespace for the secret containting - # the token to be created in. For example - # additionalTenants: - # - name: loki - # secretNamespace: grafana - additionalTenants: [] - # -- Additional Kubernetes environment - env: [] - # -- Additional labels for the `provisioner` Job - labels: {} - # -- Additional annotations for the `provisioner` Job - annotations: {} - # -- The name of the PriorityClass for provisioner Job - priorityClassName: null - # -- Run containers as user `enterprise-logs(uid=10001)` - securityContext: - runAsNonRoot: true - runAsGroup: 10001 - runAsUser: 10001 - fsGroup: 10001 - # -- Provisioner image to Utilize - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/enterprise-logs-provisioner - # -- Overrides the image tag whose default is the chart's appVersion - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent - # -- Volume mounts to add to the provisioner pods - extraVolumeMounts: [] -# -- Options that may be necessary when performing a migration from another helm chart -migrate: - # -- When migrating from a distributed chart like loki-distributed or enterprise-logs - fromDistributed: - # -- Set to true if migrating from a distributed helm chart - enabled: false - # -- If migrating from a distributed service, provide the distributed deployment's - # memberlist service DNS so the new deployment can join its ring. - memberlistService: "" -serviceAccount: - # -- Specifies whether a ServiceAccount should be created - create: true - # -- The name of the ServiceAccount to use. - # If not set and create is true, a name is generated using the fullname template - name: null - # -- Image pull secrets for the service account - imagePullSecrets: [] - # -- Annotations for the service account - annotations: {} - # -- Labels for the service account - labels: {} - # -- Set this toggle to false to opt out of automounting API credentials for the service account - automountServiceAccountToken: true -# RBAC configuration -rbac: - # -- If pspEnabled true, a PodSecurityPolicy is created for K8s that use psp. - pspEnabled: false - # -- For OpenShift set pspEnabled to 'false' and sccEnabled to 'true' to use the SecurityContextConstraints. - sccEnabled: false - # -- Specify PSP annotations - # Ref: https://kubernetes.io/docs/reference/access-authn-authz/psp-to-pod-security-standards/#podsecuritypolicy-annotations - pspAnnotations: {} - # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' - # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - # -- Whether to install RBAC in the namespace only or cluster-wide. Useful if you want to watch ConfigMap globally. - namespaced: false -# -- Section for configuring optional Helm test -test: - enabled: true - # -- Address of the prometheus server to query for the test - prometheusAddress: "http://prometheus:9090" - # -- Number of times to retry the test before failing - timeout: 1m - # -- Additional labels for the test pods - labels: {} - # -- Additional annotations for test pods - annotations: {} - # -- Image to use for loki canary - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/loki-helm-test - # -- Overrides the image tag whose default is the chart's appVersion - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent -# Monitoring section determines which monitoring features to enable -monitoring: - # Dashboards for monitoring Loki - dashboards: - # -- If enabled, create configmap with dashboards for monitoring Loki - enabled: true - # -- Alternative namespace to create dashboards ConfigMap in - namespace: null - # -- Additional annotations for the dashboards ConfigMap - annotations: {} - # -- Labels for the dashboards ConfigMap - labels: - grafana_dashboard: "1" - # Recording rules for monitoring Loki, required for some dashboards - rules: - # -- If enabled, create PrometheusRule resource with Loki recording rules - enabled: true - # -- Include alerting rules - alerting: true - # -- Alternative namespace to create PrometheusRule resources in - namespace: null - # -- Additional annotations for the rules PrometheusRule resource - annotations: {} - # -- Additional labels for the rules PrometheusRule resource - labels: {} - # -- Additional labels for PrometheusRule alerts - additionalRuleLabels: {} - # -- Additional groups to add to the rules file - additionalGroups: [] - # - name: additional-loki-rules - # rules: - # - record: job:loki_request_duration_seconds_bucket:sum_rate - # expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job) - # - record: job_route:loki_request_duration_seconds_bucket:sum_rate - # expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job, route) - # - record: node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate - # expr: sum(rate(container_cpu_usage_seconds_total[1m])) by (node, namespace, pod, container) - # ServiceMonitor configuration - serviceMonitor: - # -- If enabled, ServiceMonitor resources for Prometheus Operator are created - enabled: true - # -- Namespace selector for ServiceMonitor resources - namespaceSelector: {} - # -- ServiceMonitor annotations - annotations: {} - # -- Additional ServiceMonitor labels - labels: {} - # -- ServiceMonitor scrape interval - # Default is 15s because included recording rules use a 1m rate, and scrape interval needs to be at - # least 1/4 rate interval. - interval: 15s - # -- ServiceMonitor scrape timeout in Go duration format (e.g. 15s) - scrapeTimeout: null - # -- ServiceMonitor relabel configs to apply to samples before scraping - # https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig - relabelings: [] - # -- ServiceMonitor metric relabel configs to apply to samples before ingestion - # https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint - metricRelabelings: [] - # -- ServiceMonitor will use http by default, but you can pick https as well - scheme: http - # -- ServiceMonitor will use these tlsConfig settings to make the health check requests - tlsConfig: null - # -- If defined, will create a MetricsInstance for the Grafana Agent Operator. - metricsInstance: - # -- If enabled, MetricsInstance resources for Grafana Agent Operator are created - enabled: true - # -- MetricsInstance annotations - annotations: {} - # -- Additional MetricsInstance labels - labels: {} - # -- If defined a MetricsInstance will be created to remote write metrics. - remoteWrite: null - # Self monitoring determines whether Loki should scrape its own logs. - # This feature currently relies on the Grafana Agent Operator being installed, - # which is installed by default using the grafana-agent-operator sub-chart. - # It will create custom resources for GrafanaAgent, LogsInstance, and PodLogs to configure - # scrape configs to scrape its own logs with the labels expected by the included dashboards. - selfMonitoring: - enabled: true - # -- Tenant to use for self monitoring - tenant: - # -- Name of the tenant - name: "self-monitoring" - # -- Namespace to create additional tenant token secret in. Useful if your Grafana instance - # is in a separate namespace. Token will still be created in the canary namespace. - secretNamespace: "{{ .Release.Namespace }}" - # Grafana Agent configuration - grafanaAgent: - # -- Controls whether to install the Grafana Agent Operator and its CRDs. - # Note that helm will not install CRDs if this flag is enabled during an upgrade. - # In that case install the CRDs manually from https://github.com/grafana/agent/tree/main/production/operator/crds - installOperator: true - # -- Grafana Agent annotations - annotations: {} - # -- Additional Grafana Agent labels - labels: {} - # -- Enable the config read api on port 8080 of the agent - enableConfigReadAPI: false - # -- The name of the PriorityClass for GrafanaAgent pods - priorityClassName: null - # PodLogs configuration - podLogs: - # -- PodLogs annotations - annotations: {} - # -- Additional PodLogs labels - labels: {} - # -- PodLogs relabel configs to apply to samples before scraping - # https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig - relabelings: [] - # LogsInstance configuration - logsInstance: - # -- LogsInstance annotations - annotations: {} - # -- Additional LogsInstance labels - labels: {} - # -- Additional clients for remote write - clients: null - # The Loki canary pushes logs to and queries from this loki installation to test - # that it's working correctly - lokiCanary: - enabled: true - # -- The name of the label to look for at loki when doing the checks. - labelname: pod - # -- Additional annotations for the `loki-canary` Daemonset - annotations: {} - # -- Additional labels for each `loki-canary` pod - podLabels: {} - service: - # -- Annotations for loki-canary Service - annotations: {} - # -- Additional labels for loki-canary Service - labels: {} - # -- Additional CLI arguments for the `loki-canary' command - extraArgs: [] - # -- Environment variables to add to the canary pods - extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the canary pods - extraEnvFrom: [] - # -- Resource requests and limits for the canary - resources: {} - # -- DNS config for canary pods - dnsConfig: {} - # -- Node selector for canary pods - nodeSelector: {} - # -- Tolerations for canary pods - tolerations: [] - # -- The name of the PriorityClass for loki-canary pods - priorityClassName: null - # -- Image to use for loki canary - image: - # -- The Docker registry - registry: docker.io - # -- Docker image repository - repository: grafana/loki-canary - # -- Overrides the image tag whose default is the chart's appVersion - tag: null - # -- Overrides the image tag with an image digest - digest: null - # -- Docker image pull policy - pullPolicy: IfNotPresent - # -- Update strategy for the `loki-canary` Daemonset pods - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 -# Configuration for the write pod(s) -write: - # -- Number of replicas for the write - replicas: 3 - autoscaling: - # -- Enable autoscaling for the write. - enabled: false - # -- Minimum autoscaling replicas for the write. - minReplicas: 2 - # -- Maximum autoscaling replicas for the write. - maxReplicas: 6 - # -- Target CPU utilisation percentage for the write. - targetCPUUtilizationPercentage: 60 - # -- Target memory utilization percentage for the write. - targetMemoryUtilizationPercentage: - # -- Behavior policies while scaling. - behavior: - # -- see https://github.com/grafana/loki/blob/main/docs/sources/operations/storage/wal.md#how-to-scale-updown for scaledown details - scaleUp: - policies: - - type: Pods - value: 1 - periodSeconds: 900 - scaleDown: - policies: - - type: Pods - value: 1 - periodSeconds: 1800 - stabilizationWindowSeconds: 3600 - image: - # -- The Docker registry for the write image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the write image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the write image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for write pods - priorityClassName: null - # -- Annotations for write StatefulSet - annotations: {} - # -- Annotations for write pods - podAnnotations: {} - # -- Additional labels for each `write` pod - podLabels: {} - # -- Additional selector labels for each `write` pod - selectorLabels: {} - service: - # -- Annotations for write Service - annotations: {} - # -- Additional labels for write Service - labels: {} - # -- Comma-separated list of Loki modules to load for the write - targetModule: "write" - # -- Additional CLI args for the write - extraArgs: [] - # -- Environment variables to add to the write pods - extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the write pods - extraEnvFrom: [] - # -- Lifecycle for the write container - lifecycle: {} - # -- The default /flush_shutdown preStop hook is recommended as part of the ingester - # scaledown process so it's added to the template by default when autoscaling is enabled, - # but it's disabled to optimize rolling restarts in instances that will never be scaled - # down or when using chunks storage with WAL disabled. - # https://github.com/grafana/loki/blob/main/docs/sources/operations/storage/wal.md#how-to-scale-updown - # -- Init containers to add to the write pods - initContainers: [] - # -- Volume mounts to add to the write pods - extraVolumeMounts: [] - # -- Volumes to add to the write pods - extraVolumes: [] - # -- volumeClaimTemplates to add to StatefulSet - extraVolumeClaimTemplates: [] - # -- Resource requests and limits for the write - resources: {} - # -- Grace period to allow the write to shutdown before it is killed. Especially for the ingester, - # this must be increased. It must be long enough so writes can be gracefully shutdown flushing/transferring - # all data and to successfully leave the member ring on shutdown. - terminationGracePeriodSeconds: 300 - # -- Affinity for write pods. Passed through `tpl` and, thus, to be configured as string - # @default -- Hard node and soft zone anti-affinity - affinity: | - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - {{- include "loki.writeSelectorLabels" . | nindent 10 }} - topologyKey: kubernetes.io/hostname - # -- DNS config for write pods - dnsConfig: {} - # -- Node selector for write pods - nodeSelector: {} - # -- Tolerations for write pods - tolerations: [] - # -- The default is to deploy all pods in parallel. - podManagementPolicy: "Parallel" - persistence: - enable: true - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: false - # -- Size of persistent disk - size: 10Gi - # -- Storage class to be used. - # If defined, storageClassName: . - # If set to "-", storageClassName: "", which disables dynamic provisioning. - # If empty or set to null, no storageClassName spec is - # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). - storageClass: null - # -- Selector for persistent disk - selector: null -# Configuration for the table-manager -tableManager: - # -- Specifies whether the table-manager should be enabled - enabled: false - image: - # -- The Docker registry for the table-manager image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the table-manager image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the table-manager image. Overrides `loki.image.tag` - tag: null - # -- Command to execute instead of defined in Docker image - command: null - # -- The name of the PriorityClass for table-manager pods - priorityClassName: null - # -- Labels for table-manager pods - podLabels: {} - # -- Annotations for table-manager deployment - annotations: {} - # -- Annotations for table-manager pods - podAnnotations: {} - service: - # -- Annotations for table-manager Service - annotations: {} - # -- Additional labels for table-manager Service - labels: {} - # -- Additional CLI args for the table-manager - extraArgs: [] - # -- Environment variables to add to the table-manager pods - extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the table-manager pods - extraEnvFrom: [] - # -- Volume mounts to add to the table-manager pods - extraVolumeMounts: [] - # -- Volumes to add to the table-manager pods - extraVolumes: [] - # -- Resource requests and limits for the table-manager - resources: {} - # -- Containers to add to the table-manager pods - extraContainers: [] - # -- Grace period to allow the table-manager to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for table-manager pods. Passed through `tpl` and, thus, to be configured as string - # @default -- Hard node and soft zone anti-affinity - affinity: | - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - {{- include "loki.tableManagerSelectorLabels" . | nindent 10 }} - topologyKey: kubernetes.io/hostname - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchLabels: - {{- include "loki.tableManagerSelectorLabels" . | nindent 12 }} - topologyKey: failure-domain.beta.kubernetes.io/zone - # -- DNS config table-manager pods - dnsConfig: {} - # -- Node selector for table-manager pods - nodeSelector: {} - # -- Tolerations for table-manager pods - tolerations: [] - # -- Enable deletes by retention - retention_deletes_enabled: false - # -- Set retention period - retention_period: 0 -# Configuration for the read pod(s) -read: - # -- Number of replicas for the read - replicas: 3 - autoscaling: - # -- Enable autoscaling for the read, this is only used if `queryIndex.enabled: true` - enabled: false - # -- Minimum autoscaling replicas for the read - minReplicas: 2 - # -- Maximum autoscaling replicas for the read - maxReplicas: 6 - # -- Target CPU utilisation percentage for the read - targetCPUUtilizationPercentage: 60 - # -- Target memory utilisation percentage for the read - targetMemoryUtilizationPercentage: - # -- Behavior policies while scaling. - behavior: {} - # scaleUp: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 60 - # scaleDown: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 180 - image: - # -- The Docker registry for the read image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the read image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the read image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for read pods - priorityClassName: null - # -- Annotations for read deployment - annotations: {} - # -- Annotations for read pods - podAnnotations: {} - # -- Additional labels for each `read` pod - podLabels: {} - # -- Additional selector labels for each `read` pod - selectorLabels: {} - service: - # -- Annotations for read Service - annotations: {} - # -- Additional labels for read Service - labels: {} - # -- Comma-separated list of Loki modules to load for the read - targetModule: "read" - # -- Whether or not to use the 2 target type simple scalable mode (read, write) or the - # 3 target type (read, write, backend). Legacy refers to the 2 target type, so true will - # run two targets, false will run 3 targets. - legacyReadTarget: false - # -- Additional CLI args for the read - extraArgs: [] - # -- Environment variables to add to the read pods - extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the read pods - extraEnvFrom: [] - # -- Lifecycle for the read container - lifecycle: {} - # -- Volume mounts to add to the read pods - extraVolumeMounts: [] - # -- Volumes to add to the read pods - extraVolumes: [] - # -- Resource requests and limits for the read - resources: {} - # -- Grace period to allow the read to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for read pods. Passed through `tpl` and, thus, to be configured as string - # @default -- Hard node and soft zone anti-affinity - affinity: | - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - {{- include "loki.readSelectorLabels" . | nindent 10 }} - topologyKey: kubernetes.io/hostname - # -- DNS config for read pods - dnsConfig: {} - # -- Node selector for read pods - nodeSelector: {} - # -- Tolerations for read pods - tolerations: [] - # -- The default is to deploy all pods in parallel. - podManagementPolicy: "Parallel" - persistence: - enable: true - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: true - # -- Size of persistent disk - size: 10Gi - # -- Storage class to be used. - # If defined, storageClassName: . - # If set to "-", storageClassName: "", which disables dynamic provisioning. - # If empty or set to null, no storageClassName spec is - # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). - storageClass: null - # -- Selector for persistent disk - selector: null -# Configuration for the backend pod(s) -backend: - # -- Number of replicas for the backend - replicas: 3 - autoscaling: - # -- Enable autoscaling for the backend. - enabled: false - # -- Minimum autoscaling replicas for the backend. - minReplicas: 2 - # -- Maximum autoscaling replicas for the backend. - maxReplicas: 6 - # -- Target CPU utilization percentage for the backend. - targetCPUUtilizationPercentage: 60 - # -- Target memory utilization percentage for the backend. - targetMemoryUtilizationPercentage: - # -- Behavior policies while scaling. - behavior: {} - # scaleUp: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 60 - # scaleDown: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 180 - image: - # -- The Docker registry for the backend image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the backend image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the backend image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for backend pods - priorityClassName: null - # -- Annotations for backend StatefulSet - annotations: {} - # -- Annotations for backend pods - podAnnotations: {} - # -- Additional labels for each `backend` pod - podLabels: {} - # -- Additional selector labels for each `backend` pod - selectorLabels: {} - service: - # -- Annotations for backend Service - annotations: {} - # -- Additional labels for backend Service - labels: {} - # -- Comma-separated list of Loki modules to load for the read - targetModule: "backend" - # -- Additional CLI args for the backend - extraArgs: [] - # -- Environment variables to add to the backend pods - extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the backend pods - extraEnvFrom: [] - # -- Init containers to add to the backend pods - initContainers: [] - # -- Volume mounts to add to the backend pods - extraVolumeMounts: [] - # -- Volumes to add to the backend pods - extraVolumes: [] - # -- Resource requests and limits for the backend - resources: {} - # -- Grace period to allow the backend to shutdown before it is killed. Especially for the ingester, - # this must be increased. It must be long enough so backends can be gracefully shutdown flushing/transferring - # all data and to successfully leave the member ring on shutdown. - terminationGracePeriodSeconds: 300 - # -- Affinity for backend pods. Passed through `tpl` and, thus, to be configured as string - # @default -- Hard node and soft zone anti-affinity - affinity: | - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - {{- include "loki.backendSelectorLabels" . | nindent 10 }} - topologyKey: kubernetes.io/hostname - # -- DNS config for backend pods - dnsConfig: {} - # -- Node selector for backend pods - nodeSelector: {} - # -- Tolerations for backend pods - tolerations: [] - # -- The default is to deploy all pods in parallel. - podManagementPolicy: "Parallel" - persistence: - enable: true - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: true - # -- Size of persistent disk - size: 10Gi - # -- Storage class to be used. - # If defined, storageClassName: . - # If set to "-", storageClassName: "", which disables dynamic provisioning. - # If empty or set to null, no storageClassName spec is - # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). - storageClass: null - # -- Selector for persistent disk - selector: null -# Configuration for the single binary node(s) -singleBinary: - # -- Number of replicas for the single binary - replicas: 0 - autoscaling: - # -- Enable autoscaling - enabled: false - # -- Minimum autoscaling replicas for the single binary - minReplicas: 1 - # -- Maximum autoscaling replicas for the single binary - maxReplicas: 3 - # -- Target CPU utilisation percentage for the single binary - targetCPUUtilizationPercentage: 60 - # -- Target memory utilisation percentage for the single binary - targetMemoryUtilizationPercentage: - image: - # -- The Docker registry for the single binary image. Overrides `loki.image.registry` - registry: null - # -- Docker image repository for the single binary image. Overrides `loki.image.repository` - repository: null - # -- Docker image tag for the single binary image. Overrides `loki.image.tag` - tag: null - # -- The name of the PriorityClass for single binary pods - priorityClassName: null - # -- Annotations for single binary StatefulSet - annotations: {} - # -- Annotations for single binary pods - podAnnotations: {} - # -- Additional labels for each `single binary` pod - podLabels: {} - # -- Additional selector labels for each `single binary` pod - selectorLabels: {} - service: - # -- Annotations for single binary Service - annotations: {} - # -- Additional labels for single binary Service - labels: {} - # -- Comma-separated list of Loki modules to load for the single binary - targetModule: "all" - # -- Labels for single binary service - extraArgs: [] - # -- Environment variables to add to the single binary pods - extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the single binary pods - extraEnvFrom: [] - # -- Extra containers to add to the single binary loki pod - extraContainers: [] - # -- Init containers to add to the single binary pods - initContainers: [] - # -- Volume mounts to add to the single binary pods - extraVolumeMounts: [] - # -- Volumes to add to the single binary pods - extraVolumes: [] - # -- Resource requests and limits for the single binary - resources: {} - # -- Grace period to allow the single binary to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for single binary pods. Passed through `tpl` and, thus, to be configured as string - # @default -- Hard node and soft zone anti-affinity - affinity: | - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - {{- include "loki.singleBinarySelectorLabels" . | nindent 10 }} - topologyKey: kubernetes.io/hostname - # -- DNS config for single binary pods - dnsConfig: {} - # -- Node selector for single binary pods - nodeSelector: {} - # -- Tolerations for single binary pods - tolerations: [] - persistence: - enable: true - # -- Enable StatefulSetAutoDeletePVC feature - enableStatefulSetAutoDeletePVC: true - # -- Enable persistent disk - enabled: true - # -- Size of persistent disk - size: 10Gi - # -- Storage class to be used. - # If defined, storageClassName: . - # If set to "-", storageClassName: "", which disables dynamic provisioning. - # If empty or set to null, no storageClassName spec is - # set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). - storageClass: null - # -- Selector for persistent disk - selector: null -# Use either this ingress or the gateway, but not both at once. -# If you enable this, make sure to disable the gateway. -# You'll need to supply authn configuration for your ingress controller. -ingress: - enabled: false - ingressClassName: "" - annotations: {} - # nginx.ingress.kubernetes.io/auth-type: basic - # nginx.ingress.kubernetes.io/auth-secret: loki-distributed-basic-auth - # nginx.ingress.kubernetes.io/auth-secret-type: auth-map - # nginx.ingress.kubernetes.io/configuration-snippet: | - # proxy_set_header X-Scope-OrgID $remote_user; - labels: {} - # blackbox.monitoring.exclude: "true" - paths: - write: - - /api/prom/push - - /loki/api/v1/push - read: - - /api/prom/tail - - /loki/api/v1/tail - - /loki/api - - /api/prom/rules - - /loki/api/v1/rules - - /prometheus/api/v1/rules - - /prometheus/api/v1/alerts - singleBinary: - - /api/prom/push - - /loki/api/v1/push - - /api/prom/tail - - /loki/api/v1/tail - - /loki/api - - /api/prom/rules - - /loki/api/v1/rules - - /prometheus/api/v1/rules - - /prometheus/api/v1/alerts - # -- Hosts configuration for the ingress, passed through the `tpl` function to allow templating - hosts: - - loki.example.com - # -- TLS configuration for the ingress. Hosts passed through the `tpl` function to allow templating - tls: [] -# - hosts: -# - loki.example.com -# secretName: loki-distributed-tls - -# Configuration for the memberlist service -memberlist: - service: - publishNotReadyAddresses: false -# Configuration for the gateway -gateway: - # -- Specifies whether the gateway should be enabled - enabled: true - # -- Number of replicas for the gateway - replicas: 1 - # -- Enable logging of 2xx and 3xx HTTP requests - verboseLogging: true - autoscaling: - # -- Enable autoscaling for the gateway - enabled: false - # -- Minimum autoscaling replicas for the gateway - minReplicas: 1 - # -- Maximum autoscaling replicas for the gateway - maxReplicas: 3 - # -- Target CPU utilisation percentage for the gateway - targetCPUUtilizationPercentage: 60 - # -- Target memory utilisation percentage for the gateway - targetMemoryUtilizationPercentage: - # -- See `kubectl explain deployment.spec.strategy` for more - # -- ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy - # -- Behavior policies while scaling. - behavior: {} - # scaleUp: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 60 - # scaleDown: - # stabilizationWindowSeconds: 300 - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 180 - deploymentStrategy: - type: RollingUpdate - image: - # -- The Docker registry for the gateway image - registry: docker.io - # -- The gateway image repository - repository: nginxinc/nginx-unprivileged - # -- The gateway image tag - tag: 1.23-alpine - # -- Overrides the gateway image tag with an image digest - digest: null - # -- The gateway image pull policy - pullPolicy: IfNotPresent - # -- The name of the PriorityClass for gateway pods - priorityClassName: null - # -- Annotations for gateway deployment - annotations: {} - # -- Annotations for gateway pods - podAnnotations: {} - # -- Additional labels for gateway pods - podLabels: {} - # -- Additional CLI args for the gateway - extraArgs: [] - # -- Environment variables to add to the gateway pods - extraEnv: [] - # -- Environment variables from secrets or configmaps to add to the gateway pods - extraEnvFrom: [] - # -- Lifecycle for the gateway container - lifecycle: {} - # -- Volumes to add to the gateway pods - extraVolumes: [] - # -- Volume mounts to add to the gateway pods - extraVolumeMounts: [] - # -- The SecurityContext for gateway containers - podSecurityContext: - fsGroup: 101 - runAsGroup: 101 - runAsNonRoot: true - runAsUser: 101 - # -- The SecurityContext for gateway containers - containerSecurityContext: - readOnlyRootFilesystem: true - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - # -- Resource requests and limits for the gateway - resources: {} - # -- Grace period to allow the gateway to shutdown before it is killed - terminationGracePeriodSeconds: 30 - # -- Affinity for gateway pods. Passed through `tpl` and, thus, to be configured as string - # @default -- Hard node and soft zone anti-affinity - affinity: | - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - {{- include "loki.gatewaySelectorLabels" . | nindent 10 }} - topologyKey: kubernetes.io/hostname - # -- DNS config for gateway pods - dnsConfig: {} - # -- Node selector for gateway pods - nodeSelector: {} - # -- Tolerations for gateway pods - tolerations: [] - # Gateway service configuration - service: - # -- Port of the gateway service - port: 80 - # -- Type of the gateway service - type: ClusterIP - # -- ClusterIP of the gateway service - clusterIP: null - # -- (int) Node port if service type is NodePort - nodePort: null - # -- Load balancer IPO address if service type is LoadBalancer - loadBalancerIP: null - # -- Annotations for the gateway service - annotations: {} - # -- Labels for gateway service - labels: {} - # Gateway ingress configuration - ingress: - # -- Specifies whether an ingress for the gateway should be created - enabled: false - # -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18 - ingressClassName: "" - # -- Annotations for the gateway ingress - annotations: {} - # -- Labels for the gateway ingress - labels: {} - # -- Hosts configuration for the gateway ingress, passed through the `tpl` function to allow templating - hosts: - - host: gateway.loki.example.com - paths: - - path: / - # -- pathType (e.g. ImplementationSpecific, Prefix, .. etc.) might also be required by some Ingress Controllers - # pathType: Prefix - # -- TLS configuration for the gateway ingress. Hosts passed through the `tpl` function to allow templating - tls: - - secretName: loki-gateway-tls - hosts: - - gateway.loki.example.com - # Basic auth configuration - basicAuth: - # -- Enables basic authentication for the gateway - enabled: false - # -- The basic auth username for the gateway - username: null - # -- The basic auth password for the gateway - password: null - # -- Uses the specified users from the `loki.tenants` list to create the htpasswd file - # if `loki.tenants` is not set, the `gateway.basicAuth.username` and `gateway.basicAuth.password` are used - # The value is templated using `tpl`. Override this to use a custom htpasswd, e.g. in case the default causes - # high CPU load. - htpasswd: >- - {{ if .Values.loki.tenants }} - - {{- range $t := .Values.loki.tenants }} - {{ htpasswd (required "All tenants must have a 'name' set" $t.name) (required "All tenants must have a 'password' set" $t.password) }} - - {{- end }} - {{ else }} {{ htpasswd (required "'gateway.basicAuth.username' is required" .Values.gateway.basicAuth.username) (required "'gateway.basicAuth.password' is required" .Values.gateway.basicAuth.password) }} {{ end }} - # -- Existing basic auth secret to use. Must contain '.htpasswd' - existingSecret: null - # Configures the readiness probe for the gateway - readinessProbe: - httpGet: - path: / - port: http - initialDelaySeconds: 15 - timeoutSeconds: 1 - nginxConfig: - # -- NGINX log format - logFormat: |- - main '$remote_addr - $remote_user [$time_local] $status ' - '"$request" $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - # -- Allows appending custom configuration to the server block - serverSnippet: "" - # -- Allows appending custom configuration to the http block, passed through the `tpl` function to allow templating - httpSnippet: >- - {{ if .Values.loki.tenants }}proxy_set_header X-Scope-OrgID $remote_user;{{ end }} - # -- Override Read URL - customReadUrl: null - # -- Override Write URL - customWriteUrl: null - # -- Override Backend URL - customBackendUrl: null - # -- Config file contents for Nginx. Passed through the `tpl` function to allow templating - # @default -- See values.yaml - file: | - {{- include "loki.nginxFile" . | indent 2 -}} -networkPolicy: - # -- Specifies whether Network Policies should be created - enabled: false - metrics: - # -- Specifies the Pods which are allowed to access the metrics port. - # As this is cross-namespace communication, you also need the namespaceSelector. - podSelector: {} - # -- Specifies the namespaces which are allowed to access the metrics port - namespaceSelector: {} - # -- Specifies specific network CIDRs which are allowed to access the metrics port. - # In case you use namespaceSelector, you also have to specify your kubelet networks here. - # The metrics ports are also used for probes. - cidrs: [] - ingress: - # -- Specifies the Pods which are allowed to access the http port. - # As this is cross-namespace communication, you also need the namespaceSelector. - podSelector: {} - # -- Specifies the namespaces which are allowed to access the http port - namespaceSelector: {} - alertmanager: - # -- Specify the alertmanager port used for alerting - port: 9093 - # -- Specifies the alertmanager Pods. - # As this is cross-namespace communication, you also need the namespaceSelector. - podSelector: {} - # -- Specifies the namespace the alertmanager is running in - namespaceSelector: {} - externalStorage: - # -- Specify the port used for external storage, e.g. AWS S3 - ports: [] - # -- Specifies specific network CIDRs you want to limit access to - cidrs: [] - discovery: - # -- (int) Specify the port used for discovery - port: null - # -- Specifies the Pods labels used for discovery. - # As this is cross-namespace communication, you also need the namespaceSelector. - podSelector: {} - # -- Specifies the namespace the discovery Pods are running in - namespaceSelector: {} -tracing: - jaegerAgentHost: "" -# ------------------------------------- -# Configuration for `minio` child chart -# ------------------------------------- -minio: - enabled: false - replicas: 1 - # Minio requires 2 to 16 drives for erasure code (drivesPerNode * replicas) - # https://docs.min.io/docs/minio-erasure-code-quickstart-guide - # Since we only have 1 replica, that means 2 drives must be used. - drivesPerNode: 2 - rootUser: enterprise-logs - rootPassword: supersecret - buckets: - - name: chunks - policy: none - purge: false - - name: ruler - policy: none - purge: false - - name: admin - policy: none - purge: false - persistence: - size: 5Gi - resources: - requests: - cpu: 100m - memory: 128Mi -# Create extra manifests via values. Would be passed through `tpl` for templating -extraObjects: [] -# - apiVersion: v1 -# kind: ConfigMap -# metadata: -# name: loki-alerting-rules -# data: -# loki-alerting-rules.yaml: |- -# groups: -# - name: example -# rules: -# - alert: example -# expr: | -# sum(count_over_time({app="loki"} |~ "error")) > 0 -# for: 3m -# labels: -# severity: warning -# category: logs -# annotations: -# message: "loki has encountered errors" - -sidecar: - image: - # -- The Docker registry and image for the k8s sidecar - repository: kiwigrid/k8s-sidecar - # -- Docker image tag - tag: 1.24.3 - # -- Docker image sha. If empty, no sha will be used - sha: "" - # -- Docker image pull policy - pullPolicy: IfNotPresent - # -- Resource requests and limits for the sidecar - resources: {} - # limits: - # cpu: 100m - # memory: 100Mi - # requests: - # cpu: 50m - # memory: 50Mi - # -- The SecurityContext for the sidecar. - securityContext: {} - # -- Set to true to skip tls verification for kube api calls. - skipTlsVerify: false - # -- Ensure that rule files aren't conflicting and being overwritten by prefixing their name with the namespace they are defined in. - enableUniqueFilenames: false - # -- Readiness probe definition. Probe is disabled on the sidecar by default. - readinessProbe: {} - # -- Liveness probe definition. Probe is disabled on the sidecar by default. - livenessProbe: {} - rules: - # -- Whether or not to create a sidecar to ingest rule from specific ConfigMaps and/or Secrets. - enabled: true - # -- Label that the configmaps/secrets with rules will be marked with. - label: loki_rule - # -- Label value that the configmaps/secrets with rules will be set to. - labelValue: "" - # -- Folder into which the rules will be placed. - folder: /rules - # -- Comma separated list of namespaces. If specified, the sidecar will search for config-maps/secrets inside these namespaces. - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify 'ALL' to search in all namespaces. - searchNamespace: null - # -- Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH request, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. - watchMethod: WATCH - # -- Search in configmap, secret, or both. - resource: both - # -- Absolute path to the shell script to execute after a configmap or secret has been reloaded. - script: null - # -- WatchServerTimeout: request to the server, asking it to cleanly close the connection after that. - # defaults to 60sec; much higher values like 3600 seconds (1h) are feasible for non-Azure K8S. - watchServerTimeout: 60 - # - # -- WatchClientTimeout: is a client-side timeout, configuring your local socket. - # If you have a network outage dropping all packets with no RST/FIN, - # this is how long your client waits before realizing & dropping the connection. - # Defaults to 66sec. - watchClientTimeout: 60 - # -- Log level of the sidecar container. - logLevel: INFO