Fixed alert reporting, instance label, gitea limits
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 29s
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 29s
This commit is contained in:
1 parent
ac8e5e127c
commit
f2d5b97465
4 files changed
+57
-19
No files matched your search
@@ -31,11 +31,11 @@ spec:
|
|||||||
image: gitea/gitea:28.0.0
|
image: gitea/gitea:28.0.0
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: 512Mi
|
memory: 1Gi
|
||||||
cpu: 200m
|
cpu: "1"
|
||||||
limits:
|
limits:
|
||||||
memory: 2Gi
|
memory: 4Gi
|
||||||
cpu: 1500m
|
cpu: "4"
|
||||||
env:
|
env:
|
||||||
- name: GITEA__service__REGISTER_MANUAL_CONFIRM
|
- name: GITEA__service__REGISTER_MANUAL_CONFIRM
|
||||||
value: "true"
|
value: "true"
|
||||||
|
|||||||
@@ -36,6 +36,17 @@ them. This protects data from a manifest rename, but it is not a backup. Back up
|
|||||||
custom fields `IDM Client ID`, `IDM Client Secret`, `TG Token`, and `TG ID`;
|
custom fields `IDM Client ID`, `IDM Client Secret`, `TG Token`, and `TG ID`;
|
||||||
- DNS for `gf.hexor.cy` and `prom.hexor.cy` must point to the new cluster.
|
- DNS for `gf.hexor.cy` and `prom.hexor.cy` must point to the new cluster.
|
||||||
|
|
||||||
|
## Alerting and target identities
|
||||||
|
|
||||||
|
Telegram is reserved for actionable alerts: `severity=info`, `Watchdog`, and
|
||||||
|
`InfoInhibitor` remain visible in Prometheus but route to the null receiver.
|
||||||
|
Warning and critical notifications are grouped for two minutes and rendered as
|
||||||
|
Telegram HTML with escaped annotations and labelled graph/runbook links.
|
||||||
|
|
||||||
|
Node Exporter keeps scraping the discovered node address, but rewrites the
|
||||||
|
public `instance` label from Kubernetes discovery to `<node-name>:9100`. Grafana
|
||||||
|
variables and alerts therefore remain stable when node IP addresses change.
|
||||||
|
|
||||||
After Argo CD reports the application healthy, verify targets, rules and log
|
After Argo CD reports the application healthy, verify targets, rules and log
|
||||||
delivery in Grafana. Prometheus is protected by the Keycloak auth proxy; Grafana
|
delivery in Grafana. Prometheus is protected by the Keycloak auth proxy; Grafana
|
||||||
uses its own Keycloak OIDC client.
|
uses its own Keycloak OIDC client.
|
||||||
@@ -8,9 +8,11 @@ metadata:
|
|||||||
argocd.argoproj.io/sync-wave: "1"
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
spec:
|
spec:
|
||||||
route:
|
route:
|
||||||
groupBy: [namespace, alertname]
|
groupBy: [cluster, namespace, alertname]
|
||||||
groupWait: 30s
|
# A two-minute grace period absorbs alerts which resolve immediately and
|
||||||
groupInterval: 5m
|
# never need to interrupt a human.
|
||||||
|
groupWait: 2m
|
||||||
|
groupInterval: 10m
|
||||||
repeatInterval: 12h
|
repeatInterval: 12h
|
||||||
receiver: telegram
|
receiver: telegram
|
||||||
routes:
|
routes:
|
||||||
@@ -19,6 +21,13 @@ spec:
|
|||||||
- name: alertname
|
- name: alertname
|
||||||
value: Watchdog|InfoInhibitor
|
value: Watchdog|InfoInhibitor
|
||||||
matchType: =~
|
matchType: =~
|
||||||
|
# Informational alerts remain queryable in Prometheus but do not page the
|
||||||
|
# Telegram chat. Warning and critical alerts still use the parent route.
|
||||||
|
- receiver: "null"
|
||||||
|
matchers:
|
||||||
|
- name: severity
|
||||||
|
value: info
|
||||||
|
matchType: =
|
||||||
receivers:
|
receivers:
|
||||||
- name: telegram
|
- name: telegram
|
||||||
telegramConfigs:
|
telegramConfigs:
|
||||||
@@ -29,15 +38,23 @@ spec:
|
|||||||
# AlertmanagerConfig only supports an integer here, not a Secret ref.
|
# AlertmanagerConfig only supports an integer here, not a Secret ref.
|
||||||
chatID: 124317807
|
chatID: 124317807
|
||||||
sendResolved: true
|
sendResolved: true
|
||||||
|
parseMode: HTML
|
||||||
message: |-
|
message: |-
|
||||||
{{ if eq .Status "firing" }}🔥 FIRING{{ else }}✅ RESOLVED{{ end }}
|
{{ if eq .Status "firing" }}🔥 <b>FIRING · {{ len .Alerts.Firing }}</b>{{ else }}✅ <b>RESOLVED · {{ len .Alerts.Resolved }}</b>{{ end }}
|
||||||
|
{{ with .CommonLabels.alertname }}<b>{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</b>{{ end }}{{ with .CommonLabels.severity }} · <code>{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</code>{{ end }}
|
||||||
{{ range .Alerts }}
|
{{ range .Alerts }}
|
||||||
{{ .Labels.alertname }} ({{ .Labels.severity }})
|
|
||||||
{{ if .Annotations.summary }}{{ .Annotations.summary }}{{ end }}
|
{{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }} {{ with .Annotations.summary }}<b>{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</b>{{ else }}<b>{{ .Labels.alertname | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</b>{{ end }}
|
||||||
{{ if .Annotations.description }}{{ .Annotations.description }}{{ end }}
|
{{ with .Annotations.description }}{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}{{ end }}
|
||||||
{{ if .Labels.namespace }}Namespace: {{ .Labels.namespace }}{{ end }}
|
{{ if or .Labels.namespace .Labels.pod .Labels.container .Labels.node .Labels.instance }}
|
||||||
{{ if .Labels.pod }}Pod: {{ .Labels.pod }}{{ end }}
|
<b>Context</b>
|
||||||
{{ if .Labels.node }}Node: {{ .Labels.node }}{{ end }}
|
{{ with .Labels.namespace }}Namespace: <code>{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</code>{{ end }}
|
||||||
{{ .GeneratorURL }}
|
{{ with .Labels.pod }}Pod: <code>{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</code>{{ end }}
|
||||||
|
{{ with .Labels.container }}Container: <code>{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</code>{{ end }}
|
||||||
|
{{ with .Labels.node }}Node: <code>{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</code>{{ end }}
|
||||||
|
{{ if and (not .Labels.node) .Labels.instance }}Instance: <code>{{ .Labels.instance | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}</code>{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
Started: {{ .StartsAt | tz "Europe/London" | date "2006-01-02 15:04 MST" }}
|
||||||
|
<a href="{{ .GeneratorURL | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}">📈 Open graph</a>{{ with .Annotations.runbook_url }} · <a href="{{ . | reReplaceAll "&" "&" | reReplaceAll "<" "<" | reReplaceAll ">" ">" }}">📖 Runbook</a>{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
- name: "null"
|
- name: "null"
|
||||||
@@ -188,11 +188,11 @@ grafana:
|
|||||||
sidecar:
|
sidecar:
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 20m
|
cpu: 100m
|
||||||
memory: 64Mi
|
memory: 128Mi
|
||||||
limits:
|
limits:
|
||||||
cpu: 200m
|
cpu: "1"
|
||||||
memory: 256Mi
|
memory: 512Mi
|
||||||
dashboards:
|
dashboards:
|
||||||
enabled: true
|
enabled: true
|
||||||
searchNamespace: ALL
|
searchNamespace: ALL
|
||||||
@@ -259,6 +259,16 @@ prometheus-node-exporter:
|
|||||||
priorityClassName: monitoring-critical
|
priorityClassName: monitoring-critical
|
||||||
tolerations:
|
tolerations:
|
||||||
- operator: Exists
|
- operator: Exists
|
||||||
|
prometheus:
|
||||||
|
monitor:
|
||||||
|
# Keep dashboard variables and alerts stable when a node IP changes.
|
||||||
|
# The scrape address remains the discovered node IP; only the public
|
||||||
|
# instance label is rewritten to the Kubernetes node hostname.
|
||||||
|
relabelings:
|
||||||
|
- action: replace
|
||||||
|
sourceLabels: [__meta_kubernetes_endpoint_node_name]
|
||||||
|
targetLabel: instance
|
||||||
|
replacement: "${1}:9100"
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 50m
|
cpu: 50m
|
||||||
|
|||||||
Reference in new issue
Block a user