Skip to content

Commit db77862

Browse files
committed
Port reasonable default values from SCS k8s-observability project
Signed-off-by: Roman Hros <[email protected]>
1 parent 5d56eb5 commit db77862

File tree

3 files changed

+93
-7
lines changed

3 files changed

+93
-7
lines changed

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ Prerequisites
2222
* For production environment we recommend (based on our experience) a kubernetes cluster with at least 2 worker nodes and 4 GiB RAM per node or more.
2323

2424

25-
dNation Kubernetes Monitoring Stack umbrella chart is hosted in the [dNation helm repository](https://artifacthub.io/packages/search?repo=dnationcloud). By default, dNation Kubernetes Monitoring Stack installs Prometheus with Thanos sidecar and Thanos Query. For more details check [Multicluster monitoring support](#multicluster-monitoring-support) section.
25+
dNation Kubernetes Monitoring Stack umbrella chart is hosted in the [dNation helm repository](https://artifacthub.io/packages/search?repo=dnationcloud). By default, dNation Kubernetes Monitoring Stack installs Prometheus with Thanos sidecar and Thanos Query.
26+
Thanos components are tuned according to [SCS Thanos tuning](https://github.com/SovereignCloudStack/k8s-observability/blob/main/docs/thanos-tuning.md).
27+
For more details check [Multicluster monitoring support](#multicluster-monitoring-support) section.
2628
```bash
2729
# Add dNation helm repository
2830
helm repo add dnationcloud https://dnationcloud.github.io/helm-hub/
@@ -119,7 +121,9 @@ kube-prometheus-stack:
119121
hosts:
120122
- <grafana-endpoint>
121123

122-
thanos.query.stores: []
124+
thanos:
125+
query:
126+
stores: []
123127
```
124128
125129
- `thanosStorage.config` field contains configuration of object storage used by thanos components in the observer cluster. More info can be found here: https://thanos.io/tip/thanos/storage.md/
@@ -193,8 +197,10 @@ kube-prometheus-stack:
193197
hosts:
194198
- <grafana-endpoint>
195199
196-
thanos.query.stores:
197-
- dnssrv+_http-[envoy-name]._tcp.thanos-query-envoy.[namespace].svc.cluster.local
200+
thanos:
201+
query:
202+
stores:
203+
- dnssrv+_http-[envoy-name]._tcp.thanos-query-envoy.[namespace].svc.cluster.local
198204
```
199205

200206
Thanos sidecar in workload clusters is published with an Ingress object with TLS client auth. To trust the observer cluster CA you need to create following two secerets:
@@ -316,6 +322,25 @@ ssl-exporter:
316322
More information about configuration is in the [helmchart repo](https://github.com/dNationCloud/ssl-exporter)
317323
and [ribbybibby/ssl_exporter](https://github.com/ribbybibby/ssl_exporter) repo.
318324

325+
# Prometheus Blackbox Exporter
326+
Our monitoring stack contains a helmchart for
327+
[prometheus-blackbox-exporter](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-blackbox-exporter)
328+
as an optional component
329+
## Configuration
330+
Enable prometheus-blackbox-exporter by adding `--set prometheus-blackbox-exporter.enabled=true` flag to the `helm` command, or enable it in values file.
331+
You can further configure prometheus-blackbox-exporter with values file, e.g.:
332+
```yaml
333+
prometheus-blackbox-exporter:
334+
enabled: true
335+
serviceMonitor:
336+
targets:
337+
- name: dnation-cloud
338+
url: https://dnation.cloud/
339+
# enable also dashboards
340+
dnation-kubernetes-monitoring:
341+
blackboxMonitoring:
342+
enabled: true
343+
```
319344

320345
# Contribution guidelines
321346
If you want to contribute, please read following:

chart/Chart.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
apiVersion: v2
1717
name: dnation-kubernetes-monitoring-stack
18-
version: 3.4.5
19-
appVersion: 2.6.3 # dnation-kubernetes-monitoring
18+
version: 3.5.0
19+
appVersion: 2.7.0 # dnation-kubernetes-monitoring
2020
description: An umbrella helm chart for Kubernetes monitoring based on kube-prometheus-stack, thanos, loki, loki-distributed, promtail and dnation-kubernetes-monitoring.
2121
keywords:
2222
- dnation
@@ -28,6 +28,7 @@ keywords:
2828
- loki
2929
- thanos
3030
- ssl-exporter
31+
- blackbox-exporter
3132
home: https://dnation.cloud
3233
sources:
3334
- https://github.com/dNationCloud/kubernetes-monitoring-stack
@@ -53,13 +54,17 @@ dependencies:
5354
repository: https://grafana.github.io/helm-charts
5455
condition: promtail.enabled
5556
- name: dnation-kubernetes-monitoring
56-
version: "2.6.*"
57+
version: "2.7.*"
5758
repository: https://dnationcloud.github.io/helm-hub
5859
condition: dnation-kubernetes-monitoring.enabled
5960
- name: ssl-exporter
6061
version: "1.2.*"
6162
repository: https://dnationcloud.github.io/helm-hub
6263
condition: ssl-exporter.enabled
64+
- name: prometheus-blackbox-exporter
65+
version: "8.10.*"
66+
repository: https://prometheus-community.github.io/helm-charts
67+
condition: prometheus-blackbox-exporter.enabled
6368
icon: https://cdn.ifne.eu/public/icons/dnation_k8sm8g.png
6469
maintainers:
6570
- name: dNation

chart/values.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,74 @@ ssl-exporter:
5151
# # Included in default values of ssl-exporter helm chart
5252
# - /etc/kubernetes/admin.conf
5353

54+
## Deploy a prometheus-blackbox-exporter
55+
## ref: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-blackbox-exporter
56+
##
57+
prometheus-blackbox-exporter:
58+
enabled: false
59+
releaseLabel: true
60+
prometheusRule:
61+
enabled: true
62+
additionalLabels:
63+
prometheus_rule: '1'
64+
rules:
65+
- alert: BlackboxProbeFailed
66+
expr: 'probe_success == 0'
67+
for: 5m
68+
labels:
69+
severity: critical
70+
annotations:
71+
message: 'Blackbox probe on target: {{ $labels.target }} failed'
72+
- alert: BlackboxSlowProbe
73+
expr: 'avg_over_time(probe_duration_seconds[1m]) > 5'
74+
for: 5m
75+
labels:
76+
severity: warning
77+
annotations:
78+
message: 'Blackbox probe on target: {{ $labels.target }} took more than 5s to complete, probe time = {{ $value }}'
79+
- alert: BlackboxSslCertificateWillExpireSoon
80+
expr: 'round((probe_ssl_earliest_cert_expiry - time()) / 86400, 0.1) < 30'
81+
for: 5m
82+
labels:
83+
severity: warning
84+
annotations:
85+
message: 'SSL certificate expires in {{ $value }} days'
86+
serviceMonitor:
87+
enabled: true
88+
# targets:
89+
# - name: dnation-cloud
90+
# url: https://dnation.cloud/
91+
5492
thanos:
5593
enabled: true
5694
queryFrontend:
5795
enabled: false
96+
extraFlags:
97+
- --query-range.split-interval=12h
98+
- --query-frontend.log-queries-longer-than=10s
99+
- --query-frontend.compress-responses
100+
- |-
101+
--query-range.response-cache-config="config":
102+
"max_size": "500MB"
103+
"max_size_items": 0
104+
"validity": 0s
105+
"type": "in-memory"
58106
query:
107+
extraFlags:
108+
- --query.auto-downsampling
59109
dnsDiscovery:
60110
sidecarsService: kube-prometheus-thanos-discovery
61111
sidecarsNamespace: "{{ .Release.Namespace }}"
62112
bucketweb:
63113
enabled: false
64114
compactor:
65115
enabled: false
116+
retentionResolutionRaw: 2d
117+
retentionResolution5m: 10d
118+
retentionResolution1h: 15d
119+
extraFlags:
120+
- --compact.concurrency=3
121+
- --downsample.concurrency=3
66122
storegateway:
67123
enabled: false
68124
ruler:

0 commit comments

Comments
 (0)