Загрузка данных
dmitriev-aal@VDI-Dmitriev-A:~/Desktop/appfarm/infra/k8s/nexus$ grep -nE '<<<<<<<|=======|>>>>>>>' deploy/files/alerts/nexus-alerts.rules
dmitriev-aal@VDI-Dmitriev-A:~/Desktop/appfarm/infra/k8s/nexus$ git diff
diff --cc deploy/files/alerts/nexus-alerts.rules
index df2c71b,0412412..0000000
--- a/deploy/files/alerts/nexus-alerts.rules
+++ b/deploy/files/alerts/nexus-alerts.rules
:...skipping...
diff --cc deploy/files/alerts/nexus-alerts.rules
index df2c71b,0412412..0000000
--- a/deploy/files/alerts/nexus-alerts.rules
+++ b/deploy/files/alerts/nexus-alerts.rules
@@@ -1,86 -1,61 +1,92 @@@
- name: nexus-alerts
rules:
- - alert: CriticalNexusOrientDBFillingUP
+ - alert: NexusPVCFreeSpaceLow
annotations:
+ description: PersistentVolume {{`{{ $labels.persistentvolumeclaim }}`}} free space is below 20%.
+ summary: Nexus PVC free space is running low.
+ description: "The PersistentVolume claimed by {{`{{ $labels.persistentvolumeclaim }}`}} in Namespace {{`{{ $labels.namespace }}`}} is only {{`{{ $value | humanizePercentage }}`}} free."
+ runbook_url: "https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumefillingup"
+ summary: "PersistentVolume is filling up."
+ dashboard_url: "{{ .Values.prometheusRules.params.dashboard_url }}"
expr: |-
- kubelet_volume_stats_available_bytes{job="kubelet", namespace=~".*", metrics_path="/metrics", persistentvolumeclaim="nexus-nexus3-data"}
- /
- kubelet_volume_stats_capacity_bytes{job="kubelet", namespace=~".*", metrics_path="/metrics", persistentvolumeclaim="nexus-nexus3-data"}
- < 0.03
- for: 1m
+ sum without(instance,node) (
+ kubelet_volume_stats_available_bytes{
+ job="kubelet",
+ metrics_path="/metrics",
+ namespace="nexus",
+ persistentvolumeclaim="nexus-nexus3-data"
+ }
+ )
+ /
+ sum without(instance,node) (
+ kubelet_volume_stats_capacity_bytes{
+ job="kubelet",
+ metrics_path="/metrics",
+ namespace="nexus",
+ persistentvolumeclaim="nexus-nexus3-data"
+ }
+ )
+ < 0.20
+ for: 5m
labels:
- team: sre
- service: nexus
- component: storage
- environment: production
- severity: critical
+ severity: warning
- - alert: WarningNexusOrientDBFillingUP
+ - alert: NexusPVCFreeSpaceCritical
annotations:
- description: "Based on recent sampling, the PersistentVolume claimed by {{`{{ $labels.persistentvolumeclaim }}`}} in Namespace {{`{{ $labels.namespace }}`}} is expected to fill up
within four days. Currently {{`{{ $value | humanizePercentage }}`}} is available."
- runbook_url: "https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumefillingup"
- summary: "PersistentVolume is filling up."
- dashboard_url: "{{ .Values.prometheusRules.params.dashboard_url }}"
+ description: PersistentVolume {{`{{ $labels.persistentvolumeclaim }}`}} free space is below 10%.
+ summary: Nexus PVC free space is critically low.
expr: |-
- kubelet_volume_stats_available_bytes{job="kubelet", namespace=~".*", metrics_path="/metrics", persistentvolumeclaim="nexus-nexus3-data"} /1024/1024/1024 < 6
- for: 1h
+ sum without(instance,node) (
+ kubelet_volume_stats_available_bytes{
+ job="kubelet",
+ metrics_path="/metrics",
+ namespace="nexus",
+ persistentvolumeclaim="nexus-nexus3-data"
+ }
+ )
+ /
+ sum without(instance,node) (
+ kubelet_volume_stats_capacity_bytes{
+ job="kubelet",
+ metrics_path="/metrics",
+ namespace="nexus",
+ persistentvolumeclaim="nexus-nexus3-data"
+ }
+ )
+ < 0.10
+ for: 3m
labels:
- team: sre
- service: nexus
- component: storage
- environment: production
- severity: warning
+ severity: critical
- - alert: CriticalNexusOrientDBFillingErrors
+ - alert: NexusPVCInodesLow
annotations:
- description: "The persistent volume {{`{{ $labels.persistentvolume }}`}} has status {{`{{ $labels.phase }}`}}."
- runbook_url: "https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumeerrors"
- summary: "PersistentVolume is having issues with provisioning."
- dashboard_url: "{{ .Values.prometheusRules.params.dashboard_url }}"
- expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics", persistentvolumeclaim="nexus-nexus3-data"} > 0
+ description: PersistentVolume {{`{{ $labels.persistentvolumeclaim }}`}} inode usage is above 90%.
+ summary: Nexus PVC inode count is running low.
+ expr: |-
+ kubelet_volume_stats_inodes_free{
+ job="kubelet",
+ metrics_path="/metrics",
+ namespace="nexus",
+ persistentvolumeclaim="nexus-nexus3-data"
+ }
+ /
+ kubelet_volume_stats_inodes{
+ job="kubelet",
+ metrics_path="/metrics",
+ namespace="nexus",
+ persistentvolumeclaim="nexus-nexus3-data"
+ }
+ < 0.10
for: 5m
for: 5m
labels:
- team: sre
- service: nexus
- component: storage
- environment: production
- severity: critical
+ severity: warning
- - alert: NexusTaskFailures
+ - alert: NexusTaskNotOK
annotations:
- description: Task with name {{`{{ $labels.name }}`}} was completed with is NOT OK status.
- summary: Check Nexus UI (System -> Tasks) and logs for investigating.
+ description: "Task with name {{`{{ $labels.name }}`}} was completed with NOT OK status {{`{{ $labels.lastRunResult }}`}}."
+ summary: "Check Nexus UI (System -> Tasks) and logs for investigating."
+ dashboard_url: "{{ .Values.prometheusRules.params.dashboard_url }}"
+ runbook_url: "{{ .Values.prometheusRules.params.runbook_url }}"
expr: nexus_tasks_status{lastRunResult!~"OK|<nil>"} > 0
for: 1m
labels:
dmitriev-aal@VDI-Dmitriev-A:~/Desktop/appfarm/infra/k8s/nexus$