Merge pull request #561 from ryanwalls/patch-2
Update to latest kube-state-metrics
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
ALERT K8SNodeNotReady
|
ALERT K8SNodeNotReady
|
||||||
IF kube_node_status_ready{condition="true"} == 0
|
IF kube_node_status_condition{condition="Ready", status="true"} == 0
|
||||||
FOR 1h
|
FOR 1h
|
||||||
LABELS {
|
LABELS {
|
||||||
severity = "warning",
|
severity = "warning",
|
||||||
@@ -11,12 +11,12 @@ ALERT K8SNodeNotReady
|
|||||||
|
|
||||||
ALERT K8SManyNodesNotReady
|
ALERT K8SManyNodesNotReady
|
||||||
IF
|
IF
|
||||||
count(kube_node_status_ready{condition="true"} == 0) > 1
|
count(kube_node_status_condition{condition="Ready", status="true"} == 0) > 1
|
||||||
AND
|
AND
|
||||||
(
|
(
|
||||||
count(kube_node_status_ready{condition="true"} == 0)
|
count(kube_node_status_condition{condition="Ready", status="true"} == 0)
|
||||||
/
|
/
|
||||||
count(kube_node_status_ready{condition="true"})
|
count(kube_node_status_condition{condition="Ready", status="true"})
|
||||||
) > 0.2
|
) > 0.2
|
||||||
FOR 1m
|
FOR 1m
|
||||||
LABELS {
|
LABELS {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ ALERT NodeExporterDown
|
|||||||
description = "Prometheus could not scrape a node-exporter for more than 10m, or node-exporters have disappeared from discovery.",
|
description = "Prometheus could not scrape a node-exporter for more than 10m, or node-exporters have disappeared from discovery.",
|
||||||
}
|
}
|
||||||
ALERT K8SNodeOutOfDisk
|
ALERT K8SNodeOutOfDisk
|
||||||
IF kube_node_status_out_of_disk{condition="true"} == 1
|
IF kube_node_status_condition{condition"OutOfDisk", status="true"} == 1
|
||||||
LABELS {
|
LABELS {
|
||||||
service = "k8s",
|
service = "k8s",
|
||||||
severity = "critical"
|
severity = "critical"
|
||||||
@@ -20,7 +20,7 @@ ALERT K8SNodeOutOfDisk
|
|||||||
}
|
}
|
||||||
|
|
||||||
ALERT K8SNodeMemoryPressure
|
ALERT K8SNodeMemoryPressure
|
||||||
IF kube_node_status_memory_pressure{condition="true"} == 1
|
IF kube_node_status_condition{condition="MemoryPressure", status="true"} == 1
|
||||||
LABELS {
|
LABELS {
|
||||||
service = "k8s",
|
service = "k8s",
|
||||||
severity = "warning"
|
severity = "warning"
|
||||||
@@ -31,7 +31,7 @@ ALERT K8SNodeMemoryPressure
|
|||||||
}
|
}
|
||||||
|
|
||||||
ALERT K8SNodeDiskPressure
|
ALERT K8SNodeDiskPressure
|
||||||
IF kube_node_status_disk_pressure{condition="true"} == 1
|
IF kube_node_status_condition{condition="DiskPressure", status="true"} == 1
|
||||||
LABELS {
|
LABELS {
|
||||||
service = "k8s",
|
service = "k8s",
|
||||||
severity = "warning"
|
severity = "warning"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ rules:
|
|||||||
- resourcequotas
|
- resourcequotas
|
||||||
- replicationcontrollers
|
- replicationcontrollers
|
||||||
- limitranges
|
- limitranges
|
||||||
|
- persistentvolumeclaims
|
||||||
verbs: ["list", "watch"]
|
verbs: ["list", "watch"]
|
||||||
- apiGroups: ["extensions"]
|
- apiGroups: ["extensions"]
|
||||||
resources:
|
resources:
|
||||||
@@ -18,3 +19,12 @@ rules:
|
|||||||
- deployments
|
- deployments
|
||||||
- replicasets
|
- replicasets
|
||||||
verbs: ["list", "watch"]
|
verbs: ["list", "watch"]
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources:
|
||||||
|
- statefulsets
|
||||||
|
verbs: ["list", "watch"]
|
||||||
|
- apiGroups: ["batch"]
|
||||||
|
resources:
|
||||||
|
- cronjobs
|
||||||
|
- jobs
|
||||||
|
verbs: ["list", "watch"]
|
||||||
@@ -12,7 +12,7 @@ spec:
|
|||||||
serviceAccountName: kube-state-metrics
|
serviceAccountName: kube-state-metrics
|
||||||
containers:
|
containers:
|
||||||
- name: kube-state-metrics
|
- name: kube-state-metrics
|
||||||
image: quay.io/coreos/kube-state-metrics:v0.5.0
|
image: quay.io/coreos/kube-state-metrics:v1.0.0
|
||||||
ports:
|
ports:
|
||||||
- name: metrics
|
- name: metrics
|
||||||
containerPort: 8080
|
containerPort: 8080
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ data:
|
|||||||
}
|
}
|
||||||
kubelet.rules: |+
|
kubelet.rules: |+
|
||||||
ALERT K8SNodeNotReady
|
ALERT K8SNodeNotReady
|
||||||
IF kube_node_status_ready{condition="true"} == 0
|
IF kube_node_status_condition{condition="Ready", status="true"} == 0
|
||||||
FOR 1h
|
FOR 1h
|
||||||
LABELS {
|
LABELS {
|
||||||
severity = "warning",
|
severity = "warning",
|
||||||
@@ -340,12 +340,12 @@ data:
|
|||||||
|
|
||||||
ALERT K8SManyNodesNotReady
|
ALERT K8SManyNodesNotReady
|
||||||
IF
|
IF
|
||||||
count(kube_node_status_ready{condition="true"} == 0) > 1
|
count(kube_node_status_condition{condition="Ready", status="true"} == 0) > 1
|
||||||
AND
|
AND
|
||||||
(
|
(
|
||||||
count(kube_node_status_ready{condition="true"} == 0)
|
count(kube_node_status_condition{condition="Ready", status="true"} == 0)
|
||||||
/
|
/
|
||||||
count(kube_node_status_ready{condition="true"})
|
count(kube_node_status_condition{condition="Ready", status="true"})
|
||||||
) > 0.2
|
) > 0.2
|
||||||
FOR 1m
|
FOR 1m
|
||||||
LABELS {
|
LABELS {
|
||||||
@@ -583,7 +583,7 @@ data:
|
|||||||
description = "Prometheus could not scrape a node-exporter for more than 10m, or node-exporters have disappeared from discovery.",
|
description = "Prometheus could not scrape a node-exporter for more than 10m, or node-exporters have disappeared from discovery.",
|
||||||
}
|
}
|
||||||
ALERT K8SNodeOutOfDisk
|
ALERT K8SNodeOutOfDisk
|
||||||
IF kube_node_status_out_of_disk{condition="true"} == 1
|
IF kube_node_status_condition{condition="OutOfDisk",status="true"} == 1
|
||||||
LABELS {
|
LABELS {
|
||||||
service = "k8s",
|
service = "k8s",
|
||||||
severity = "critical"
|
severity = "critical"
|
||||||
@@ -594,7 +594,7 @@ data:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ALERT K8SNodeMemoryPressure
|
ALERT K8SNodeMemoryPressure
|
||||||
IF kube_node_status_memory_pressure{condition="true"} == 1
|
IF kube_node_status_condition{condition="MemoryPressure", status="true"} == 1
|
||||||
LABELS {
|
LABELS {
|
||||||
service = "k8s",
|
service = "k8s",
|
||||||
severity = "warning"
|
severity = "warning"
|
||||||
@@ -605,7 +605,7 @@ data:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ALERT K8SNodeDiskPressure
|
ALERT K8SNodeDiskPressure
|
||||||
IF kube_node_status_disk_pressure{condition="true"} == 1
|
IF kube_node_status_condition{condition="DiskPressure", status="true"} == 1
|
||||||
LABELS {
|
LABELS {
|
||||||
service = "k8s",
|
service = "k8s",
|
||||||
severity = "warning"
|
severity = "warning"
|
||||||
|
|||||||
Reference in New Issue
Block a user