add alertmanager/prometheus external URLs + patch some alerts that fail on rclonefs
This commit is contained in:
parent
96123a83b9
commit
869c92d710
6 changed files with 52 additions and 15 deletions
|
@ -3,4 +3,4 @@
|
||||||
value: --dns01-recursive-nameservers-only # adding this arg makes DNS-01 validation work, unclear why it doesnt work otherwise.
|
value: --dns01-recursive-nameservers-only # adding this arg makes DNS-01 validation work, unclear why it doesnt work otherwise.
|
||||||
- op: add
|
- op: add
|
||||||
path: /spec/template/spec/containers/0/args/-
|
path: /spec/template/spec/containers/0/args/-
|
||||||
value: --dns01-recursive-nameservers=1.1.1.1,8.8.8.8,8.8.4.4
|
value: --dns01-recursive-nameservers=1.1.1.1:53,8.8.8.8:53,8.8.4.4:53
|
||||||
|
|
3
k8s/operators/kube-prometheus/alertmanager-patches.yaml
Normal file
3
k8s/operators/kube-prometheus/alertmanager-patches.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
- op: add
|
||||||
|
path: /spec/externalUrl
|
||||||
|
value: https://alertmanager.k8s.home.finn.io
|
|
@ -16,17 +16,3 @@
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: grafana.grafana-database.credentials.postgresql.acid.zalan.do
|
name: grafana.grafana-database.credentials.postgresql.acid.zalan.do
|
||||||
key: password
|
key: password
|
||||||
# - op: add
|
|
||||||
# path: /spec/template/spec/containers/0/volumeMounts/-
|
|
||||||
# value:
|
|
||||||
# mountPath: /grafana-dashboard-definitions/1
|
|
||||||
# name: grafana-dashboards-custom
|
|
||||||
# - op: add
|
|
||||||
# path: /spec/template/spec/volumes/-
|
|
||||||
# value:
|
|
||||||
# name: grafana-dashboards-custom
|
|
||||||
# configMap:
|
|
||||||
# name: grafana-dashboards-custom
|
|
||||||
# - op: replace
|
|
||||||
# path: /spec/template/spec/automountServiceAccountToken
|
|
||||||
# value: true
|
|
||||||
|
|
|
@ -23,6 +23,10 @@ patches:
|
||||||
target:
|
target:
|
||||||
kind: Prometheus
|
kind: Prometheus
|
||||||
name: k8s
|
name: k8s
|
||||||
|
- path: alertmanager-patches.yaml
|
||||||
|
target:
|
||||||
|
kind: Alertmanager
|
||||||
|
name: main
|
||||||
- path: prometheus-cluster-role-patch.yaml
|
- path: prometheus-cluster-role-patch.yaml
|
||||||
target:
|
target:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
|
@ -35,6 +39,10 @@ patches:
|
||||||
target:
|
target:
|
||||||
kind: PrometheusRule
|
kind: PrometheusRule
|
||||||
name: kubernetes-monitoring-rules
|
name: kubernetes-monitoring-rules
|
||||||
|
- path: node-exporter-rules-patches.yaml
|
||||||
|
target:
|
||||||
|
kind: PrometheusRule
|
||||||
|
name: node-exporter-rules
|
||||||
secretGenerator:
|
secretGenerator:
|
||||||
- name: grafana-config
|
- name: grafana-config
|
||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
# NodeFilesystemFilesFillingUp/NodeFilesystemAlmostOutOfFiles: ignore rclone filesystems
|
||||||
|
- op: replace
|
||||||
|
path: /spec/groups/0/rules/4/expr # NodeFilesystemFilesFillingUp warning
|
||||||
|
value: |
|
||||||
|
(
|
||||||
|
node_filesystem_files_free{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} / node_filesystem_files{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} * 100 < 40
|
||||||
|
and
|
||||||
|
predict_linear(node_filesystem_files_free{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""}[6h], 24*60*60) < 0
|
||||||
|
and
|
||||||
|
node_filesystem_readonly{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} == 0
|
||||||
|
)
|
||||||
|
- op: replace
|
||||||
|
path: /spec/groups/0/rules/5/expr # NodeFilesystemFilesFillingUp critical
|
||||||
|
value: |
|
||||||
|
(
|
||||||
|
node_filesystem_files_free{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} / node_filesystem_files{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} * 100 < 20
|
||||||
|
and
|
||||||
|
predict_linear(node_filesystem_files_free{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""}[6h], 4*60*60) < 0
|
||||||
|
and
|
||||||
|
node_filesystem_readonly{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} == 0
|
||||||
|
)
|
||||||
|
- op: replace
|
||||||
|
path: /spec/groups/0/rules/6/expr # NodeFilesystemAlmostOutOfFiles warning
|
||||||
|
value: |
|
||||||
|
(
|
||||||
|
node_filesystem_files_free{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} / node_filesystem_files{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} * 100 < 5
|
||||||
|
and
|
||||||
|
node_filesystem_readonly{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} == 0
|
||||||
|
)
|
||||||
|
- op: replace
|
||||||
|
path: /spec/groups/0/rules/7/expr # NodeFilesystemAlmostOutOfFiles critical
|
||||||
|
value: |
|
||||||
|
(
|
||||||
|
node_filesystem_files_free{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} / node_filesystem_files{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} * 100 < 3
|
||||||
|
and
|
||||||
|
node_filesystem_readonly{job="node-exporter",fstype!="",fstype!="fuse.rclone",mountpoint!=""} == 0
|
||||||
|
)
|
|
@ -7,3 +7,6 @@
|
||||||
- op: add
|
- op: add
|
||||||
path: /spec/secrets
|
path: /spec/secrets
|
||||||
value: [scrape-secrets]
|
value: [scrape-secrets]
|
||||||
|
- op: add
|
||||||
|
path: /spec/externalUrl
|
||||||
|
value: https://prometheus.k8s.home.finn.io
|
||||||
|
|
Loading…
Reference in a new issue