upgrade monitoring
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tobias Brunner 2020-09-17 21:38:08 +02:00
parent 90c4e46d26
commit 6c75d76f77
110 changed files with 2196 additions and 440 deletions

View File

@ -8,17 +8,17 @@
"subdir": "grafana" "subdir": "grafana"
} }
}, },
"version": "18c50c83ea49291b0aa00067e4b2b386556ba0e3", "version": "d7c1a53462ecd533593c60e5277b92fbf7ea7623",
"sum": "GEVLrcKGvUuvjq6bDhaWr4fOwkG5QMDpnUhHxUUywwg=" "sum": "8OnIwMhzWtgoWYHNrDlkzUAMr/CPsWKauYEv0vnH1zs="
}, },
{ {
"source": { "source": {
"git": { "git": {
"remote": "https://github.com/coreos/etcd", "remote": "https://github.com/etcd-io/etcd",
"subdir": "Documentation/etcd-mixin" "subdir": "Documentation/etcd-mixin"
} }
}, },
"version": "c199d3d8c365a5507bb4ceaf1e0767d6ff87d275", "version": "528b01c327ee4abfd4afea29de9066c7f4b247fa",
"sum": "NhOkJWkO7ZO2DSE8Fvipcs7Hh2/GOCS0WjPPZU8OiaQ=" "sum": "NhOkJWkO7ZO2DSE8Fvipcs7Hh2/GOCS0WjPPZU8OiaQ="
}, },
{ {
@ -28,8 +28,8 @@
"subdir": "grafonnet" "subdir": "grafonnet"
} }
}, },
"version": "0cfef6b1e666316d40a255c93e1d98d2a2610009", "version": "cc1626a1b4dee45c99b78ddd9714dfd5f5d7816e",
"sum": "BVozpBqmTw67JSEDX9DRLEzCLMt0+aQjDBKGaTLS+Bc=" "sum": "nkgrtMYPCq/YB4r3mKyToepaLhicwWnxDdGIodPpzz0="
}, },
{ {
"source": { "source": {
@ -38,8 +38,8 @@
"subdir": "grafana-builder" "subdir": "grafana-builder"
} }
}, },
"version": "0d5c2119373cb53d9f02fb82b94857412f7540c8", "version": "2cc8d1dcb943eb3ff1dcb85bc9a3933afb36b730",
"sum": "R5WJe6wW0R9vMpOAHaGFwcK8q4NmGZ0aLhdZGKDHeMU=" "sum": "mD0zEP9FVFXeag7EaeS5OvUr2A9D6DQhGemoNn6+PLc="
}, },
{ {
"source": { "source": {
@ -59,8 +59,8 @@
"subdir": "" "subdir": ""
} }
}, },
"version": "b1005adad5940eee9366272ab4c85cf077e547c2", "version": "0bbe890539df0c1477000322c73977af71ef71e9",
"sum": "FVMHGdPPdJ3OYoR2b2ZjqQq/cxmS7/Y5dYkA9oYQ3Vg=" "sum": "h48bpWnNFX9iN9Uqc9y0NTlKQu8sA1izvNyAHzsMIX8="
}, },
{ {
"source": { "source": {
@ -69,8 +69,8 @@
"subdir": "lib/promgrafonnet" "subdir": "lib/promgrafonnet"
} }
}, },
"version": "b1005adad5940eee9366272ab4c85cf077e547c2", "version": "0bbe890539df0c1477000322c73977af71ef71e9",
"sum": "VhgBM39yv0f4bKv8VfGg4FXkg573evGDRalip9ypKbc=" "sum": "zv7hXGui6BfHzE9wPatHI/AGZa4A2WKo6pq7ZdqBsps="
}, },
{ {
"source": { "source": {
@ -79,7 +79,7 @@
"subdir": "jsonnet/kube-state-metrics" "subdir": "jsonnet/kube-state-metrics"
} }
}, },
"version": "f1166b40298a6846a329f567d0d509d32ee45a81", "version": "daf555f1e11ad6aa37852653e63baede5f99367e",
"sum": "cJjGZaLBjcIGrLHZLjRPU9c3KL+ep9rZTb9dbALSKqA=" "sum": "cJjGZaLBjcIGrLHZLjRPU9c3KL+ep9rZTb9dbALSKqA="
}, },
{ {
@ -89,7 +89,7 @@
"subdir": "jsonnet/kube-state-metrics-mixin" "subdir": "jsonnet/kube-state-metrics-mixin"
} }
}, },
"version": "f1166b40298a6846a329f567d0d509d32ee45a81", "version": "daf555f1e11ad6aa37852653e63baede5f99367e",
"sum": "Yf8mNAHrV1YWzrdV8Ry5dJ8YblepTGw3C0Zp10XIYLo=" "sum": "Yf8mNAHrV1YWzrdV8Ry5dJ8YblepTGw3C0Zp10XIYLo="
}, },
{ {
@ -99,8 +99,8 @@
"subdir": "jsonnet/kube-prometheus" "subdir": "jsonnet/kube-prometheus"
} }
}, },
"version": "4f872f1e3187509e4c8d53d7e1f654b5fa422977", "version": "5fe45c57b60f17568001fd04a7dc2bb754fdf152",
"sum": "8pGMGEIp8YC6bpvrxhkSdi/mBbexogdFnvHPlZJmfg4=" "sum": "6Qrn74pNRqJNKYdsmcBu8ergYbMEH48qG1VDVm9FKak="
}, },
{ {
"source": { "source": {
@ -109,8 +109,8 @@
"subdir": "jsonnet/prometheus-operator" "subdir": "jsonnet/prometheus-operator"
} }
}, },
"version": "312d675008306b13c24d241bf4f0a882dbfa90d8", "version": "96094ad1ab039950537df448b95bbcc04c57bfc4",
"sum": "NPuLvqEmYZ+dCQ/9U4wXtobBD6hYreEx3jPpLQKS/ig=" "sum": "ReamRYoS2C39Of7KtXGqkSWdfHw5Fy/Ix6ujOmBLFAg="
}, },
{ {
"source": { "source": {
@ -119,8 +119,8 @@
"subdir": "docs/node-mixin" "subdir": "docs/node-mixin"
} }
}, },
"version": "3b035c8fa1f75c4c00e57acc14fb71dfd62e31ee", "version": "d8a1585f59ef1169837d08979ecc92dcea8aa58a",
"sum": "3jFV2qsc/GZe2GADswTYqxxP2zGOiANTj73W/VNFGqc=" "sum": "EE+C+Krf518EGLjA/x3ZvKfenCI0J7YuwFJVBscypRw="
}, },
{ {
"source": { "source": {

View File

@ -6,7 +6,7 @@ metadata:
namespace: monitoring namespace: monitoring
spec: spec:
encryptedData: encryptedData:
alertmanager.yaml: AgDMHzGP2Z01zF3DT/i5Yk/JmEY5dMZyfx1wBRd1xs9LS5B5us0b1Y0BulDLMzNpZbHBLbp7GYoq9EyH/1EarDtFKcwbCFPBJ0GFIngU/j+jQk0Grd/mwhXoy+p8HSo0T9ddRRnJlMBjoP8WbOhZpUDbrF3V7UIP/ksPwnk0h/AuCPxQxWc1gw9eSY0wrdAWFkznG+9fGgO73QqITn1WdO6OGEsD5LoFamI+EHMFu8Z5lwu+s+jw0qkTmPE7c+GR/X30fhVVStkf2XyOlpo/I3G+EsgzXoAs1QvuRycYuPMFjIAhUh245019eIeIahdarduR8IqfO869jjqaqBmwhkyyr05tVFF8tu1hcAewZ26drWZwlzpI+eAFx8pU9SUNron0M+Y1Rkvx+1pnQRo0BDcX5+Is52k4dELbUVYb05pjdN8DaA2/M/qg9YA9llH5dTzDgAj+DmC1kUexadSJVPi/1Q+0NHdwYBx9CU0j0tb2jrrHT8UW13mbFGC7ctSEsf9NZV66IQ5m/HOlKBAtRAlp2N4kcDdU5qaukoDpjpx1Ge31iiAA8U48zQ8RNNtQUMTQ+xJvASL++SKV3b1CPvWRMlRuPV5gtaL9p+Aa+ReBIG1dDI2gHOsd5fsIcILoB+8C+WOhA6jGmAOdVw7BLChfIxbKkKT1fBuqRjGSGlCc1ymhuEy60CxNRzkyjru3jlzjjIFessuz0531B4GGHGRxCvuVN7zju4ZUQN4edCDGiF1jfVMw/IQ6xrlBigDunfm/vF9ojGuiGFuoBYNUH40ocdqMguT36DSfLoPBsVbaQHQcRRbXMIL2R1LjlssmzcgSm8SuWVw0jvk3sad/CucihrNACOUhvirPFSlL55ttbVqXPTzCcISx7kmafuP2ylB3wGjSNJcOC0gOOVG6IkACbUnQsRU2aHga9uaH81Iv8WlN9xEe7atWTH/vu2SjSC8wicuJ0cUFfTdKx0XTusMdGQiDA5Xla473yDRuQ/FtMc/70gYewHQ0eupW1k5mnn+V75hCoY9KrjlN+BGXZOAg719NmXOUk7jZw+yexIkCVSNe0CHjNBv1CofIWMQ6jXKmRiuZg9LbLUwZYLr96ntvFqRcDHekVfWMNGxbB+Txcj8dpon1sgPYy1gJ1nWB9EwXaK0HrdTNhu3Ue/apE/C6n0ll+qkGHKsnraIO3tgIksZ8WtoOHyiz0sCXb2plPxG143MxPPLFPoBaK0wtqCb7uxikYskppQG07B523MvkYAV8vNNSQmol+2T0oOrhfRHSAHHXt5V34owTpNojwY5jWhVHDDkGiSsXS+8pJWgP68A8CWWXmM7aTjLSejKdc2aBSPqT31Ygdb8bDuopVQgmwAeXxeQQfgr37GEr/H433e9q2jTgsaHf9cMYNqXkF/gi6kM9Iw9jOCg27OAKz36TBVgi/PGLLjXZKnsshf69msVjhWXa2mHZEH34b9N8KocI7teyYSFZjxhEiMbr7XT958Y+zds6wmScaQU28G5GUPZnXID70v4VgejSt0Y+DscvRpYx/mGA60f0QrcfoStAxAmvM/5vC32W8VdMKbEL9vhTpDpveZxtNHzy7nV8BQczCeGYYIj85rKZVkIcFDCspmKqWcWDHRV0tZaWRZ72td3gE1ivZYfmFbOZ6esKEb+wZCQF0NZy0LKFv6o6canwADPz00780uX+2enmPCxFuql0Mg== alertmanager.yaml: AgATnPnwlvlfGVJeWhjcFHyp/am3nmguqi9PsWgEhxtVLuyDA6OB1G+BdJZ7dGdCViZGeDJD5mHxESSLDMTfxg5DxMDIG18XCzojMtRFTPJMZPLjbETNuSZqtrkbscp/qQom4z+igVuLlkaihdYRcCNV+B0vm+1h6BUPV8Utv1RN1dy9XUvdrvhPRNFvqhCpVcpcLwNP5cli5SNYgVc/ty6a45Fl5h+KLv7rFBJexLhUXoR0jamQpQWoH7oNHcS4ONHxLDMKXqE9jFpKzlQJBNgiRQEEotwCYTodoALmkcIs37Ai+trQxEMZZYtD5vFzbehfTtNLT1bPhLiX91rv6Q9n9wuIw951Qk11L6cF93zDl2mZ9dAQHSAglVHEriXKXBZ3Df4DSyh5qkr+/7lFBdFTQVMS5+YTgM1eCmG1yfsvU33IWKh5wrNhpkUqGLiq9f+4k3xPQVysVY3jJjVhINM/A9OsTPfFzm7aAAklBxuROXiZgZ/6L4Oc/c0Tv3EN/02rhinSGr1hIMmcaSxdOVQxXPU+pbx4JcSmyQFXIY37n/2ya/UbJW/o901MtigCukUvgMedkxPSGhedvHOygKKXPKNSl5U1Emhza7c6vP9cSiiaHpRm7EyUQvjWpJRUP7tSRgDlZyBM9Ud0PRBRdYWLG5YlZB4STOX6cDyYOcFJvnAyiZpDuwOPKMOrhWQSbCgcMcuS/RCgCnYJ4YBfm1cSxcqxsA65PRhXbRmiY9b/Mqs7s1xpJo3RySO27JiffbY+vYRIrFv4G4ak0ug9AQJvrvEA/ZgSs9xpASXSsr42pB63exhlZP+D9JEDGFLgzGQVnVFRFDrlYLFQieqWDgBc0pkcxHHwGBTp3H6PP5RRPLKzNoypTbNrdLlaNAsAlb8VuPopPBHqLcpU+DPuxxBCQ/P8ezYXE8RmpH7x4A2rPLbV902zYVwfnWMrUdPZif7oPnn/xM+VDQMLIlKA/CQySudzAYf621N450V2zE0akOFQNATGEUZT+8HtjNKMcAxjojP/pJpo486t02KXHDw+i04R1kdGPVkLnZDz+UShh4eLwovBL3zopxHxSFnonI1Ez+IetemM+aCJhadU4YNC4zY7x+blNa51ZAGEGoXuSJB3fszLd7wSz4owIhQnb+StxVNcwNgircvFjhauLVLwEynO4WTm+YKzosf2GxJAaNriveyLj1L+DwBUOeWnvmL4QsHX3nriZgVR89KlIQI1d3+lcf2jw8VqfHj3tbpMxb98qZFWw2pczrDeE2t4UQTPTj+4VK4htKGhnIHlNmdeSN39GJCWfilnzAsznrkxZsr1wIqrP+ayRO+NxljBzUN7xspByJeJrBpzW1pukvNg74MK1K7g0/fh/zmqyduQYmJnCDDqfN0PB1YoXFPZn3o4kzGnLXetgJHyJG4tsinediVXrZJb+6KOL31hEbZVArP/gWYHQv1MltEZj2yunuLeEy+Oo35oS/IkW17qF3gkF0sLavZFhJe6XqVvO2BFF1V8S15cBApXXPvFJQWyFLOTVqhYicYfJqQEgz7sKH1uYK0zLeyBkRIfUXk3vs7X9X/CzQo9J9oH5FCgNEI6GdROhitGUihCxwAVa6lsteVxZZ4USkMGZtJPG3Pi5RQuWpSMFX9nWm/LHv8wpgFItx12ZkuaIDB30wYfp4SqcBr1ZvuptKtwJpTUjVx5HSUKnEye2g==
template: template:
metadata: metadata:
creationTimestamp: null creationTimestamp: null

View File

@ -11384,7 +11384,7 @@ items:
"step": 10 "step": 10
}, },
{ {
"expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 2, "intervalFactor": 2,
@ -11402,7 +11402,7 @@ items:
"step": 10 "step": 10
}, },
{ {
"expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)", "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"intervalFactor": 2, "intervalFactor": 2,
@ -16597,7 +16597,7 @@ items:
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
{ {
"expr": "sum(kubelet_running_pod_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})", "expr": "sum(kubelet_running_pods{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})",
"format": "time_series", "format": "time_series",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "{{instance}}", "legendFormat": "{{instance}}",
@ -16681,7 +16681,7 @@ items:
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
{ {
"expr": "sum(kubelet_running_container_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})", "expr": "sum(kubelet_running_containers{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})",
"format": "time_series", "format": "time_series",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "{{instance}}", "legendFormat": "{{instance}}",

View File

@ -32,7 +32,7 @@ spec:
- --secure-listen-address=:8443 - --secure-listen-address=:8443
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- --upstream=http://127.0.0.1:8081/ - --upstream=http://127.0.0.1:8081/
image: quay.io/coreos/kube-rbac-proxy:v0.4.1 image: quay.io/brancz/kube-rbac-proxy:v0.6.0
name: kube-rbac-proxy-main name: kube-rbac-proxy-main
ports: ports:
- containerPort: 8443 - containerPort: 8443
@ -44,7 +44,7 @@ spec:
- --secure-listen-address=:9443 - --secure-listen-address=:9443
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- --upstream=http://127.0.0.1:8082/ - --upstream=http://127.0.0.1:8082/
image: quay.io/coreos/kube-rbac-proxy:v0.4.1 image: quay.io/brancz/kube-rbac-proxy:v0.6.0
name: kube-rbac-proxy-self name: kube-rbac-proxy-self
ports: ports:
- containerPort: 9443 - containerPort: 9443

View File

@ -55,7 +55,7 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: status.podIP fieldPath: status.podIP
image: quay.io/coreos/kube-rbac-proxy:v0.4.1 image: quay.io/brancz/kube-rbac-proxy:v0.6.0
name: kube-rbac-proxy name: kube-rbac-proxy
ports: ports:
- containerPort: 9100 - containerPort: 9100
@ -88,3 +88,6 @@ spec:
- hostPath: - hostPath:
path: / path: /
name: root name: root
updateStrategy:
rollingUpdate:
maxUnavailable: 10%

View File

@ -4,7 +4,7 @@ metadata:
labels: labels:
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/version: v0.41.1 app.kubernetes.io/version: v0.42.0
name: prometheus-operator name: prometheus-operator
namespace: monitoring namespace: monitoring
spec: spec:
@ -19,4 +19,4 @@ spec:
matchLabels: matchLabels:
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/version: v0.41.1 app.kubernetes.io/version: v0.42.0

View File

@ -23,6 +23,8 @@ spec:
- "yes" - "yes"
- "true" - "true"
podMonitorSelector: {} podMonitorSelector: {}
probeNamespaceSelector: {}
probeSelector: {}
replicas: 1 replicas: 1
resources: resources:
requests: requests:

View File

@ -16,6 +16,14 @@ items:
- get - get
- list - list
- watch - watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
- apiVersion: rbac.authorization.k8s.io/v1 - apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@ -32,6 +40,14 @@ items:
- get - get
- list - list
- watch - watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
- apiVersion: rbac.authorization.k8s.io/v1 - apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@ -48,6 +64,14 @@ items:
- get - get
- list - list
- watch - watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
- apiVersion: rbac.authorization.k8s.io/v1 - apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@ -64,6 +88,14 @@ items:
- get - get
- list - list
- watch - watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
- apiVersion: rbac.authorization.k8s.io/v1 - apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@ -80,4 +112,12 @@ items:
- get - get
- list - list
- watch - watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
kind: RoleList kind: RoleList

View File

@ -1022,6 +1022,28 @@ spec:
for: 10m for: 10m
labels: labels:
severity: warning severity: warning
- alert: NodeRAIDDegraded
annotations:
description: RAID array '{{ $labels.device }}' on {{ $labels.instance }} is
in degraded state due to one or more disks failures. Number of spare drives
is insufficient to fix issue automatically.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-noderaiddegraded
summary: RAID Array is degraded
expr: |
node_md_disks_required - ignoring (state) (node_md_disks{state="active"}) > 0
for: 15m
labels:
severity: critical
- alert: NodeRAIDDiskFailure
annotations:
description: At least one device in RAID array on {{ $labels.instance }} failed.
Array '{{ $labels.device }}' needs attention and possibly a disk swap.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-noderaiddiskfailure
summary: Failed device in RAID array
expr: |
node_md_disks{state="fail"} > 0
labels:
severity: warning
- name: kubernetes-apps - name: kubernetes-apps
rules: rules:
- alert: KubePodCrashLooping - alert: KubePodCrashLooping
@ -1323,6 +1345,20 @@ spec:
for: 5m for: 5m
labels: labels:
severity: warning severity: warning
- alert: KubeQuotaAlmostFull
annotations:
description: Namespace {{ $labels.namespace }} is using {{ $value | humanizePercentage
}} of its {{ $labels.resource }} quota.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubequotaalmostfull
summary: Namespace quota is going to be full.
expr: |
kube_resourcequota{job="kube-state-metrics", type="used"}
/ ignoring(instance, job, type)
(kube_resourcequota{job="kube-state-metrics", type="hard"} > 0)
> 0.9 < 1
for: 15m
labels:
severity: info
- alert: KubeQuotaFullyUsed - alert: KubeQuotaFullyUsed
annotations: annotations:
description: Namespace {{ $labels.namespace }} is using {{ $value | humanizePercentage description: Namespace {{ $labels.namespace }} is using {{ $value | humanizePercentage
@ -1333,10 +1369,24 @@ spec:
kube_resourcequota{job="kube-state-metrics", type="used"} kube_resourcequota{job="kube-state-metrics", type="used"}
/ ignoring(instance, job, type) / ignoring(instance, job, type)
(kube_resourcequota{job="kube-state-metrics", type="hard"} > 0) (kube_resourcequota{job="kube-state-metrics", type="hard"} > 0)
>= 1 == 1
for: 15m for: 15m
labels: labels:
severity: info severity: info
- alert: KubeQuotaExceeded
annotations:
description: Namespace {{ $labels.namespace }} is using {{ $value | humanizePercentage
}} of its {{ $labels.resource }} quota.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubequotaexceeded
summary: Namespace quota has exceeded the limits.
expr: |
kube_resourcequota{job="kube-state-metrics", type="used"}
/ ignoring(instance, job, type)
(kube_resourcequota{job="kube-state-metrics", type="hard"} > 0)
> 1
for: 15m
labels:
severity: warning
- alert: CPUThrottlingHigh - alert: CPUThrottlingHigh
annotations: annotations:
description: '{{ $value | humanizePercentage }} throttling of CPU in namespace description: '{{ $value | humanizePercentage }} throttling of CPU in namespace
@ -1521,11 +1571,11 @@ spec:
- alert: AggregatedAPIDown - alert: AggregatedAPIDown
annotations: annotations:
description: An aggregated API {{ $labels.name }}/{{ $labels.namespace }} description: An aggregated API {{ $labels.name }}/{{ $labels.namespace }}
has been only {{ $value | humanize }}% available over the last 5m. has been only {{ $value | humanize }}% available over the last 10m.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-aggregatedapidown runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-aggregatedapidown
summary: An aggregated API is down. summary: An aggregated API is down.
expr: | expr: |
(1 - max by(name, namespace)(avg_over_time(aggregator_unavailable_apiservice[5m]))) * 100 < 90 (1 - max by(name, namespace)(avg_over_time(aggregator_unavailable_apiservice[10m]))) * 100 < 85
for: 5m for: 5m
labels: labels:
severity: warning severity: warning
@ -1559,6 +1609,7 @@ spec:
summary: Node is unreachable. summary: Node is unreachable.
expr: | expr: |
(kube_node_spec_taint{job="kube-state-metrics",key="node.kubernetes.io/unreachable",effect="NoSchedule"} unless ignoring(key,value) kube_node_spec_taint{job="kube-state-metrics",key=~"ToBeDeletedByClusterAutoscaler|cloud.google.com/impending-node-termination|aws-node-termination-handler/spot-itn"}) == 1 (kube_node_spec_taint{job="kube-state-metrics",key="node.kubernetes.io/unreachable",effect="NoSchedule"} unless ignoring(key,value) kube_node_spec_taint{job="kube-state-metrics",key=~"ToBeDeletedByClusterAutoscaler|cloud.google.com/impending-node-termination|aws-node-termination-handler/spot-itn"}) == 1
for: 15m
labels: labels:
severity: warning severity: warning
- alert: KubeletTooManyPods - alert: KubeletTooManyPods
@ -1611,6 +1662,68 @@ spec:
for: 15m for: 15m
labels: labels:
severity: warning severity: warning
- alert: KubeletClientCertificateExpiration
annotations:
description: Client certificate for Kubelet on node {{ $labels.node }} expires
in {{ $value | humanizeDuration }}.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeletclientcertificateexpiration
summary: Kubelet client certificate is about to expire.
expr: |
kubelet_certificate_manager_client_ttl_seconds < 604800
labels:
severity: warning
- alert: KubeletClientCertificateExpiration
annotations:
description: Client certificate for Kubelet on node {{ $labels.node }} expires
in {{ $value | humanizeDuration }}.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeletclientcertificateexpiration
summary: Kubelet client certificate is about to expire.
expr: |
kubelet_certificate_manager_client_ttl_seconds < 86400
labels:
severity: critical
- alert: KubeletServerCertificateExpiration
annotations:
description: Server certificate for Kubelet on node {{ $labels.node }} expires
in {{ $value | humanizeDuration }}.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeletservercertificateexpiration
summary: Kubelet server certificate is about to expire.
expr: |
kubelet_certificate_manager_server_ttl_seconds < 604800
labels:
severity: warning
- alert: KubeletServerCertificateExpiration
annotations:
description: Server certificate for Kubelet on node {{ $labels.node }} expires
in {{ $value | humanizeDuration }}.
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeletservercertificateexpiration
summary: Kubelet server certificate is about to expire.
expr: |
kubelet_certificate_manager_server_ttl_seconds < 86400
labels:
severity: critical
- alert: KubeletClientCertificateRenewalErrors
annotations:
description: Kubelet on node {{ $labels.node }} has failed to renew its client
certificate ({{ $value | humanize }} errors in the last 5 minutes).
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeletclientcertificaterenewalerrors
summary: Kubelet has failed to renew its client certificate.
expr: |
increase(kubelet_certificate_manager_client_expiration_renew_errors[5m]) > 0
for: 15m
labels:
severity: warning
- alert: KubeletServerCertificateRenewalErrors
annotations:
description: Kubelet on node {{ $labels.node }} has failed to renew its server
certificate ({{ $value | humanize }} errors in the last 5 minutes).
runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeletservercertificaterenewalerrors
summary: Kubelet has failed to renew its server certificate.
expr: |
increase(kubelet_server_expiration_renew_errors[5m]) > 0
for: 15m
labels:
severity: warning
- alert: KubeletDown - alert: KubeletDown
annotations: annotations:
description: Kubelet has disappeared from Prometheus target discovery. description: Kubelet has disappeared from Prometheus target discovery.

View File

@ -1717,6 +1717,12 @@ spec:
under. This is necessary to generate correct URLs. This is necessary under. This is necessary to generate correct URLs. This is necessary
if Alertmanager is not served from root of a DNS name. if Alertmanager is not served from root of a DNS name.
type: string type: string
forceEnableClusterMode:
description: ForceEnableClusterMode ensures Alertmanager does not
deactivate the cluster mode when running with a single replica.
Use case is e.g. spanning an Alertmanager cluster across Kubernetes
clusters with a single replica in each.
type: boolean
image: image:
description: Image if specified has precedence over baseImage, tag description: Image if specified has precedence over baseImage, tag
and sha combinations. Specifying the version is still necessary and sha combinations. Specifying the version is still necessary

View File

@ -757,6 +757,10 @@ spec:
scheme: scheme:
description: Scheme to use when firing alerts. description: Scheme to use when firing alerts.
type: string type: string
timeout:
description: Timeout is a per-target Alertmanager timeout
when pushing alerts.
type: string
tlsConfig: tlsConfig:
description: TLS Config to use for alertmanager connection. description: TLS Config to use for alertmanager connection.
properties: properties:

View File

@ -238,8 +238,9 @@ spec:
anyOf: anyOf:
- type: integer - type: integer
- type: string - type: string
description: Name or number of the pod port this endpoint refers description: Name or number of the target port of the Pod behind
to. Mutually exclusive with port. the Service, the port must be specified with container port
property. Mutually exclusive with port.
x-kubernetes-int-or-string: true x-kubernetes-int-or-string: true
tlsConfig: tlsConfig:
description: TLS configuration to use when scraping the endpoint description: TLS configuration to use when scraping the endpoint

View File

@ -4,7 +4,7 @@ metadata:
labels: labels:
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/version: v0.41.1 app.kubernetes.io/version: v0.42.0
name: prometheus-operator name: prometheus-operator
rules: rules:
- apiGroups: - apiGroups:

View File

@ -4,7 +4,7 @@ metadata:
labels: labels:
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/version: v0.41.1 app.kubernetes.io/version: v0.42.0
name: prometheus-operator name: prometheus-operator
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io

View File

@ -4,7 +4,7 @@ metadata:
labels: labels:
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/version: v0.41.1 app.kubernetes.io/version: v0.42.0
name: prometheus-operator name: prometheus-operator
namespace: monitoring namespace: monitoring
spec: spec:
@ -18,15 +18,15 @@ spec:
labels: labels:
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/version: v0.41.1 app.kubernetes.io/version: v0.42.0
spec: spec:
containers: containers:
- args: - args:
- --kubelet-service=kube-system/kubelet - --kubelet-service=kube-system/kubelet
- --logtostderr=true - --logtostderr=true
- --config-reloader-image=jimmidyson/configmap-reload:v0.4.0 - --config-reloader-image=jimmidyson/configmap-reload:v0.4.0
- --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.41.1 - --prometheus-config-reloader=quay.io/prometheus-operator/prometheus-config-reloader:v0.42.0
image: quay.io/coreos/prometheus-operator:v0.41.1 image: quay.io/prometheus-operator/prometheus-operator:v0.42.0
name: prometheus-operator name: prometheus-operator
ports: ports:
- containerPort: 8080 - containerPort: 8080
@ -45,7 +45,7 @@ spec:
- --secure-listen-address=:8443 - --secure-listen-address=:8443
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- --upstream=http://127.0.0.1:8080/ - --upstream=http://127.0.0.1:8080/
image: quay.io/coreos/kube-rbac-proxy:v0.4.1 image: quay.io/brancz/kube-rbac-proxy:v0.6.0
name: kube-rbac-proxy name: kube-rbac-proxy
ports: ports:
- containerPort: 8443 - containerPort: 8443

View File

@ -4,7 +4,7 @@ metadata:
labels: labels:
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/version: v0.41.1 app.kubernetes.io/version: v0.42.0
name: prometheus-operator name: prometheus-operator
namespace: monitoring namespace: monitoring
spec: spec:

View File

@ -4,6 +4,6 @@ metadata:
labels: labels:
app.kubernetes.io/component: controller app.kubernetes.io/component: controller
app.kubernetes.io/name: prometheus-operator app.kubernetes.io/name: prometheus-operator
app.kubernetes.io/version: v0.41.1 app.kubernetes.io/version: v0.42.0
name: prometheus-operator name: prometheus-operator
namespace: monitoring namespace: monitoring

View File

@ -1 +1 @@
github.com/coreos/etcd/Documentation/etcd-mixin github.com/etcd-io/etcd/Documentation/etcd-mixin

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
{ {
_config+:: { _config+:: {

View File

@ -1,19 +1,19 @@
{ {
"version": 1,
"dependencies": [ "dependencies": [
{ {
"source": { "source": {
"git": { "git": {
"remote": "https://github.com/grafana/grafonnet-lib", "remote": "https://github.com/grafana/grafonnet-lib.git",
"subdir": "grafonnet" "subdir": "grafonnet"
} }
}, },
"version": "master", "version": "master"
"name": "grafonnet"
}, },
{ {
"source": { "source": {
"git": { "git": {
"remote": "https://github.com/ksonnet/ksonnet-lib", "remote": "https://github.com/ksonnet/ksonnet-lib.git",
"subdir": "" "subdir": ""
} }
}, },
@ -21,5 +21,5 @@
"name": "ksonnet" "name": "ksonnet"
} }
], ],
"legacyImports": true "legacyImports": false
} }

View File

@ -1,6 +1,19 @@
{ {
/** /**
* Creates an [Alert list panel](https://grafana.com/docs/grafana/latest/panels/visualizations/alert-list-panel/)
*
* @name alertlist.new * @name alertlist.new
*
* @param title (default `''`)
* @param span (optional)
* @param show (default `'current'`) Whether the panel should display the current alert state or recent alert state changes.
* @param limit (default `10`) Sets the maximum number of alerts to list.
* @param sortOrder (default `'1'`) '1': alerting, '2': no_data, '3': pending, '4': ok, '5': paused
* @param stateFilter (optional)
* @param onlyAlertsOnDashboard (optional) Shows alerts only from the dashboard the alert list is in
* @param transparent (optional) Whether to display the panel without a background
* @param description (optional)
* @param datasource (optional)
*/ */
new( new(
title='', title='',

View File

@ -5,10 +5,10 @@
* @name barGaugePanel.new * @name barGaugePanel.new
* *
* @param title Panel title. * @param title Panel title.
* @param description Panel description. * @param description (optional) Panel description.
* @param datasource Panel datasource. * @param datasource (optional) Panel datasource.
* @param unit The unit of the data. * @param unit (optional) The unit of the data.
* @param thresholds An array of threashold values. * @param thresholds (optional) An array of threashold values.
* *
* @method addTarget(target) Adds a target object. * @method addTarget(target) Adds a target object.
* @method addTargets(targets) Adds an array of targets. * @method addTargets(targets) Adds an array of targets.

View File

@ -1,18 +1,18 @@
{ {
/** /**
* Return a CloudWatch Target * Creates a [CloudWatch target](https://grafana.com/docs/grafana/latest/features/datasources/cloudwatch/)
* *
* @name cloudwatch.target * @name cloudwatch.target
* *
* @param region * @param region
* @param namespace * @param namespace
* @param metric * @param metric
* @param datasource * @param datasource (optional)
* @param statistic * @param statistic (default: `'Average'`)
* @param alias * @param alias (optional)
* @param highResolution * @param highResolution (default: `false`)
* @param period * @param period (default: `'1m'`)
* @param dimensions * @param dimensions (optional)
* @return Panel target * @return Panel target
*/ */

View File

@ -2,7 +2,34 @@ local timepickerlib = import 'timepicker.libsonnet';
{ {
/** /**
* Creates a [dashboard](https://grafana.com/docs/grafana/latest/features/dashboard/dashboards/)
*
* @name dashboard.new * @name dashboard.new
*
* @param title The title of the dashboard
* @param editable (default: `false`) Whether the dashboard is editable via Grafana UI.
* @param style (default: `'dark'`) Theme of dashboard, `'dark'` or `'light'`
* @param tags (optional) Array of tags associated to the dashboard, e.g.`['tag1','tag2']`
* @param time_from (default: `'now-6h'`)
* @param time_to (default: `'now'`)
* @param timezone (default: `'browser'`) Timezone of the dashboard, `'utc'` or `'browser'`
* @param refresh (default: `''`) Auto-refresh interval, e.g. `'30s'`
* @param timepicker (optional) See timepicker API
* @param graphTooltip (default: `'default'`) `'default'` : no shared crosshair or tooltip (0), `'shared_crosshair'`: shared crosshair (1), `'shared_tooltip'`: shared crosshair AND shared tooltip (2)
* @param hideControls (default: `false`)
* @param schemaVersion (default: `14`) Version of the Grafana JSON schema, incremented each time an update brings changes. `26` for Grafana 7.1.5, `22` for Grafana 6.7.4, `16` for Grafana 5.4.5, `14` for Grafana 4.6.3. etc.
* @param uid (default: `''`) Unique dashboard identifier as a string (8-40), that can be chosen by users. Used to identify a dashboard to update when using Grafana REST API.
* @param description (optional)
*
* @method addTemplate(template) Add a template variable
* @method addTemplates(templates) Adds an array of template variables
* @method addAnnotation(annotation) Add an [annotation](https://grafana.com/docs/grafana/latest/dashboards/annotations/)
* @method addPanel(panel,gridPos) Appends a panel, with an optional grid position in grid coordinates, e.g. `gridPos={'x':0, 'y':0, 'w':12, 'h': 9}`
* @method addPanels(panels) Appends an array of panels
* @method addLink(link) Adds a [dashboard link](https://grafana.com/docs/grafana/latest/linking/dashboard-links/)
* @method addRequired(type, name, id, version)
* @method addInput(name, label, type, pluginId, pluginName, description, value)
* @method addRow(row) Adds a row. This is the legacy row concept from Grafana < 5, when rows were needed for layout. Rows should now be added via `addPanel`.
*/ */
new( new(
title, title,

View File

@ -1,19 +1,19 @@
{ {
/** /**
* Returns a new dashlist panel that can be added in a row. * Creates a [dashlist panel](https://grafana.com/docs/grafana/latest/panels/visualizations/dashboard-list-panel/).
* It requires the dashlist panel plugin in grafana, which is built-in. * It requires the dashlist panel plugin in grafana, which is built-in.
* *
* @name dashlist.new * @name dashlist.new
* *
* @param title The title of the dashlist panel. * @param title The title of the dashlist panel.
* @param description Description of the panel * @param description (optional) Description of the panel
* @param query Query to search by * @param query (optional) Query to search by
* @param tags Tag(s) to search by * @param tags (optional) Array of tag(s) to search by
* @param recent Displays recently viewed dashboards * @param recent (default `true`) Displays recently viewed dashboards
* @param search Description of the panel * @param search (default `false`) Description of the panel
* @param starred Displays starred dashboards * @param starred (default `false`) Displays starred dashboards
* @param headings Chosen list selection(starred, recently Viewed, search) is shown as a heading * @param headings (default `true`) Chosen list selection(starred, recently Viewed, search) is shown as a heading
* @param limit Set maximum items in a list * @param limit (default `10`) Set maximum items in a list
* @return A json that represents a dashlist panel * @return A json that represents a dashlist panel
*/ */
new( new(

View File

@ -1,6 +1,16 @@
{ {
/** /**
* Creates an [Elasticsearch target](https://grafana.com/docs/grafana/latest/features/datasources/elasticsearch/)
*
* @name elasticsearch.target * @name elasticsearch.target
*
* @param query
* @param timeField
* @param id (optional)
* @param datasource (optional)
* @param metrics (optional)
* @param bucketAggs (optional)
* @param alias (optional)
*/ */
target( target(
query, query,

View File

@ -5,32 +5,32 @@
* @name gaugePanel.new * @name gaugePanel.new
* *
* @param title Panel title. * @param title Panel title.
* @param description Panel description. * @param description (optional) Panel description.
* @param transparent Whether to display the panel without a background. * @param transparent (default `false`) Whether to display the panel without a background.
* @param datasource Panel datasource. * @param datasource (optional) Panel datasource.
* @param allValues Show all values instead of reducing to one. * @param allValues (default `false`) Show all values instead of reducing to one.
* @param valueLimit Limit of values in all values mode. * @param valueLimit (optional) Limit of values in all values mode.
* @param reducerFunction Function to use to reduce values to when using single value. * @param reducerFunction (default `'mean'`) Function to use to reduce values to when using single value.
* @param fields Fields that should be included in the panel. * @param fields (default `''`) Fields that should be included in the panel.
* @param showThresholdLabels Render the threshold values around the gauge bar. * @param showThresholdLabels (default `false`) Render the threshold values around the gauge bar.
* @param showThresholdMarkers Render the thresholds as an outer bar. * @param showThresholdMarkers (default `true`) Render the thresholds as an outer bar.
* @param unit Panel unit field option. * @param unit (default `'percent'`) Panel unit field option.
* @param min Leave empty to calculate based on all values. * @param min (optional) Leave empty to calculate based on all values.
* @param max Leave empty to calculate based on all values. * @param max (optional) Leave empty to calculate based on all values.
* @param decimals Number of decimal places to show. * @param decimals Number of decimal places to show.
* @param displayName Change the field or series name. * @param displayName Change the field or series name.
* @param noValue What to show when there is no value. * @param noValue (optional) What to show when there is no value.
* @param thresholdsMode 'absolute' or 'percentage'. * @param thresholdsMode (default `'absolute'`) 'absolute' or 'percentage'.
* @param repeat Name of variable that should be used to repeat this panel. * @param repeat (optional) Name of variable that should be used to repeat this panel.
* @param repeatDirection 'h' for horizontal or 'v' for vertical. * @param repeatDirection (default `'h'`) 'h' for horizontal or 'v' for vertical.
* @param repeatMaxPerRow Maximum panels per row in repeat mode. * @param repeatMaxPerRow (optional) Maximum panels per row in repeat mode.
* @param pluginVersion Plugin version the panel should be modeled for. This has been tested with the default, '7', and '6.7'. * @param pluginVersion (default `'7'`) Plugin version the panel should be modeled for. This has been tested with the default, '7', and '6.7'.
* *
* @method addTarget(target) Adds a target object. * @method addTarget(target) Adds a target object.
* @method addTargets(targets) Adds an array of targets. * @method addTargets(targets) Adds an array of targets.
* @method addLink(link) Adds a link. Aregument format: `{ title: 'Link Title', url: 'https://...', targetBlank: true }`. * @method addLink(link) Adds a [panel link](https://grafana.com/docs/grafana/latest/linking/panel-links/). Argument format: `{ title: 'Link Title', url: 'https://...', targetBlank: true }`.
* @method addLinks(links) Adds an array of links. * @method addLinks(links) Adds an array of links.
* @method addThreshold(step) Adds a threshold step. Aregument format: `{ color: 'green', value: 0 }`. * @method addThreshold(step) Adds a threshold step. Argument format: `{ color: 'green', value: 0 }`.
* @method addThresholds(steps) Adds an array of threshold steps. * @method addThresholds(steps) Adds an array of threshold steps.
* @method addMapping(mapping) Adds a value mapping. * @method addMapping(mapping) Adds a value mapping.
* @method addMappings(mappings) Adds an array of value mappings. * @method addMappings(mappings) Adds an array of value mappings.

View File

@ -1,60 +1,68 @@
{ {
/** /**
* Returns a new graph panel that can be added in a row. * Creates a [graph panel](https://grafana.com/docs/grafana/latest/panels/visualizations/graph-panel/).
* It requires the graph panel plugin in grafana, which is built-in. * It requires the graph panel plugin in grafana, which is built-in.
* *
* @name graphPanel.new * @name graphPanel.new
* *
* @param title The title of the graph panel. * @param title The title of the graph panel.
* @param span Width of the panel * @param description (optional) The description of the panel
* @param datasource Datasource * @param span (optional) Width of the panel
* @param fill Fill, integer from 0 to 10 * @param datasource (optional) Datasource
* @param linewidth Line Width, integer from 0 to 10 * @param fill (default `1`) , integer from 0 to 10
* @param decimals Override automatic decimal precision for legend and tooltip. If null, not added to the json output. * @param linewidth (default `1`) Line Width, integer from 0 to 10
* @param decimalsY1 Override automatic decimal precision for the first Y axis. If null, use decimals parameter. * @param decimals (optional) Override automatic decimal precision for legend and tooltip. If null, not added to the json output.
* @param decimalsY2 Override automatic decimal precision for the second Y axis. If null, use decimals parameter. * @param decimalsY1 (optional) Override automatic decimal precision for the first Y axis. If null, use decimals parameter.
* @param min_span Min span * @param decimalsY2 (optional) Override automatic decimal precision for the second Y axis. If null, use decimals parameter.
* @param format Unit of the Y axes * @param min_span (optional) Min span
* @param formatY1 Unit of the first Y axis * @param format (default `short`) Unit of the Y axes
* @param formatY2 Unit of the second Y axis * @param formatY1 (optional) Unit of the first Y axis
* @param min Min of the Y axes * @param formatY2 (optional) Unit of the second Y axis
* @param max Max of the Y axes * @param min (optional) Min of the Y axes
* @param labelY1 Label of the first Y axis * @param max (optional) Max of the Y axes
* @param labelY2 Label of the second Y axis * @param labelY1 (optional) Label of the first Y axis
* @param x_axis_mode X axis mode, one of [time, series, histogram] * @param labelY2 (optional) Label of the second Y axis
* @param x_axis_values Chosen value of series, one of [avg, min, max, total, count] * @param x_axis_mode (default `'time'`) X axis mode, one of [time, series, histogram]
* @param x_axis_buckets restricts the x axis to this amount of buckets * @param x_axis_values (default `'total'`) Chosen value of series, one of [avg, min, max, total, count]
* @param x_axis_min restricts the x axis to display from this value if supplied * @param x_axis_buckets (optional) Restricts the x axis to this amount of buckets
* @param x_axis_max restricts the x axis to display up to this value if supplied * @param x_axis_min (optional) Restricts the x axis to display from this value if supplied
* @param lines Display lines, boolean * @param x_axis_max (optional) Restricts the x axis to display up to this value if supplied
* @param points Display points, boolean * @param lines (default `true`) Display lines
* @param pointradius Radius of the points, allowed values are 0.5 or [1 ... 10] with step 1 * @param points (default `false`) Display points
* @param bars Display bars, boolean * @param pointradius (default `5`) Radius of the points, allowed values are 0.5 or [1 ... 10] with step 1
* @param staircase Display line as staircase, boolean * @param bars (default `false`) Display bars
* @param dashes Display line as dashes * @param staircase (default `false`) Display line as staircase
* @param stack Stack values * @param dashes (default `false`) Display line as dashes
* @param repeat Variable used to repeat the graph panel * @param stack (default `false`) Whether to stack values
* @param legend_show Show legend * @param repeat (optional) Name of variable that should be used to repeat this panel.
* @param legend_values Show values in legend * @param repeatDirection (default `'h'`) 'h' for horizontal or 'v' for vertical.
* @param legend_min Show min in legend * @param legend_show (default `true`) Show legend
* @param legend_max Show max in legend * @param legend_values (default `false`) Show values in legend
* @param legend_current Show current in legend * @param legend_min (default `false`) Show min in legend
* @param legend_total Show total in legend * @param legend_max (default `false`) Show max in legend
* @param legend_avg Show average in legend * @param legend_current (default `false`) Show current in legend
* @param legend_alignAsTable Show legend as table * @param legend_total (default `false`) Show total in legend
* @param legend_rightSide Show legend to the right * @param legend_avg (default `false`) Show average in legend
* @param legend_sideWidth Legend width * @param legend_alignAsTable (default `false`) Show legend as table
* @param legend_sort Sort order of legend * @param legend_rightSide (default `false`) Show legend to the right
* @param legend_sortDesc Sort legend descending * @param legend_sideWidth (optional) Legend width
* @param aliasColors Define color mappings for graphs * @param legend_sort (optional) Sort order of legend
* @param thresholds Configuration of graph thresholds * @param legend_sortDesc (optional) Sort legend descending
* @param logBase1Y Value of logarithm base of the first Y axis * @param aliasColors (optional) Define color mappings for graphs
* @param logBase2Y Value of logarithm base of the second Y axis * @param thresholds (optional) An array of graph thresholds
* @param transparent Boolean (default: false) If set to true the panel will be transparent * @param logBase1Y (default `1`) Value of logarithm base of the first Y axis
* @param value_type Type of tooltip value * @param logBase2Y (default `1`) Value of logarithm base of the second Y axis
* @param shared_tooltip Boolean Allow to group or spit tooltips on mouseover within a chart * @param transparent (default `false`) Whether to display the panel without a background.
* @param percentage Boolean (defaut: false) show as percentages * @param value_type (default `'individual'`) Type of tooltip value
* @return A json that represents a graph panel * @param shared_tooltip (default `true`) Allow to group or spit tooltips on mouseover within a chart
* @param percentage (defaut: false) show as percentages
*
* @method addTarget(target) Adds a target object.
* @method addTargets(targets) Adds an array of targets.
* @method addSeriesOverride(override)
* @method addYaxis(format,min,max,label,show,logBase,decimals) Adds a Y axis to the graph
* @method addAlert(alert) Adds an alert
* @method addLink(link) Adds a [panel link](https://grafana.com/docs/grafana/latest/linking/panel-links/)
*/ */
new( new(
title, title,

View File

@ -1,14 +1,14 @@
{ {
/** /**
* Return an Graphite Target * Creates a [Graphite target](https://grafana.com/docs/grafana/latest/features/datasources/graphite/)
* *
* @name graphite.target * @name graphite.target
* *
* @param target Graphite Query. Nested queries are possible by adding the query reference (refId). * @param target Graphite Query. Nested queries are possible by adding the query reference (refId).
* @param targetFull Expanding the @target. Used in nested queries. * @param targetFull (optional) Expanding the @target. Used in nested queries.
* @param hide Disable query on graph. * @param hide (default `false`) Disable query on graph.
* @param textEditor Enable raw query mode. * @param textEditor (default `false`) Enable raw query mode.
* @param datasource Datasource. * @param datasource (optional) Datasource.
* @return Panel target * @return Panel target
*/ */

View File

@ -1,46 +1,50 @@
{ {
/** /**
* Returns a heatmap panel. * Creates a [heatmap panel](https://grafana.com/docs/grafana/latest/panels/visualizations/heatmap/).
* Requires the heatmap panel plugin in Grafana, which is built-in. * Requires the heatmap panel plugin in Grafana, which is built-in.
* *
* @name heatmapPanel.new * @name heatmapPanel.new
* *
* @param title The title of the heatmap panel * @param title The title of the heatmap panel
* @param datasource Datasource * @param description (optional) Description of panel
* @param min_span Min span * @param datasource (optional) Datasource
* @param span Width of the panel * @param min_span (optional) Min span
* @param cards_cardPadding How much padding to put between bucket cards * @param span (optional) Width of the panel
* @param cards_cardRound How much rounding should be applied to the bucket card shape * @param cards_cardPadding (optional) How much padding to put between bucket cards
* @param color_cardColor Hex value of color used when color_colorScheme is 'opacity' * @param cards_cardRound (optional) How much rounding should be applied to the bucket card shape
* @param color_colorScale How to scale the color range, 'linear' or 'sqrt' * @param color_cardColor (default `'#b4ff00'`) Hex value of color used when color_colorScheme is 'opacity'
* @param color_colorScheme TODO: document * @param color_colorScale (default `'sqrt'`) How to scale the color range, 'linear' or 'sqrt'
* @param color_exponent TODO: document * @param color_colorScheme (default `'interpolateOranges'`) TODO: document
* @param color_max The value for the end of the color range * @param color_exponent (default `0.5`) TODO: document
* @param color_min The value for the beginning of the color range * @param color_max (optional) The value for the end of the color range
* @param color_mode How to display difference in frequency with color, default 'opacity' * @param color_min (optional) The value for the beginning of the color range
* @param dataFormat How to format the data, default is 'timeseries' * @param color_mode (default `'spectrum'`) How to display difference in frequency with color
* @param highlightCards TODO: document * @param dataFormat (default `'timeseries'`) How to format the data
* @param hideZeroBuckets Whether or not to hide empty buckets, default is false * @param highlightCards (default `true`) TODO: document
* @param legend_show Show legend * @param hideZeroBuckets (default `false`) Whether or not to hide empty buckets, default is false
* @param minSpan Minimum span of the panel when repeated on a template variable * @param legend_show (default `false`) Show legend
* @param repeat Variable used to repeat the heatmap panel * @param minSpan (optional) Minimum span of the panel when repeated on a template variable
* @param repeatDirection Which direction to repeat the panel, 'h' for horizontal and 'v' for vertically * @param repeat (optional) Variable used to repeat the heatmap panel
* @param tooltipDecimals The number of decimal places to display in the tooltip * @param repeatDirection (optional) Which direction to repeat the panel, 'h' for horizontal and 'v' for vertically
* @param tooltip_show Whether or not to display a tooltip when hovering over the heatmap * @param tooltipDecimals (optional) The number of decimal places to display in the tooltip
* @param tooltip_showHistogram Whether or not to display a histogram in the tooltip * @param tooltip_show (default `true`) Whether or not to display a tooltip when hovering over the heatmap
* @param xAxis_show Whether or not to show the X axis, default true * @param tooltip_showHistogram (default `false`) Whether or not to display a histogram in the tooltip
* @param xBucketNumber Number of buckets for the X axis * @param xAxis_show (default `true`) Whether or not to show the X axis, default true
* @param xBucketSize Size of X axis buckets. Number or interval(10s, 15h, etc.) Has priority over xBucketNumber * @param xBucketNumber (optional) Number of buckets for the X axis
* @param yAxis_decimals Override automatic decimal precision for the Y axis * @param xBucketSize (optional) Size of X axis buckets. Number or interval(10s, 15h, etc.) Has priority over xBucketNumber
* @param yAxis_format Unit of the Y axis * @param yAxis_decimals (optional) Override automatic decimal precision for the Y axis
* @param yAxis_logBase Only if dataFormat is 'timeseries' * @param yAxis_format (default `'short'`) Unit of the Y axis
* @param yAxis_min Only if dataFormat is 'timeseries', min of the Y axis * @param yAxis_logBase (default `1`) Only if dataFormat is 'timeseries'
* @param yAxis_max Only if dataFormat is 'timeseries', max of the Y axis * @param yAxis_min (optional) Only if dataFormat is 'timeseries', min of the Y axis
* @param yAxis_show Wheter or not to show the Y axis * @param yAxis_max (optional) Only if dataFormat is 'timeseries', max of the Y axis
* @param yAxis_splitFactor TODO: document * @param yAxis_show (default `true`) Whether or not to show the Y axis
* @param yBucketBound Which bound ('lower' or 'upper') of the bucket to use, default 'auto' * @param yAxis_splitFactor (optional) TODO: document
* @param yBucketNumber Number of buckets for the Y axis * @param yBucketBound (default `'auto'`) Which bound ('lower' or 'upper') of the bucket to use
* @param yBucketSize Size of Y axis buckets. Has priority over yBucketNumber * @param yBucketNumber (optional) Number of buckets for the Y axis
* @param yBucketSize (optional) Size of Y axis buckets. Has priority over yBucketNumber
*
* @method addTarget(target) Adds a target object.
* @method addTargets(targets) Adds an array of targets.
*/ */
new( new(
title, title,

View File

@ -1,23 +1,24 @@
{ {
/** /**
* Return an InfluxDB Target * Creates an [InfluxDB target](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/)
* *
* @name influxdb.target * @name influxdb.target
* *
* @param query Raw InfluxQL statement * @param query Raw InfluxQL statement
* *
* @param alias 'Alias By' pattern * @param alias (optional) 'Alias By' pattern
* @param datasource Datasource * @param datasource (optional) Datasource
* @param hide (optional) Disable query on graph
* *
* @param rawQuery Enable/disable raw query mode * @param rawQuery (optional) Enable/disable raw query mode
* *
* @param policy Tagged query 'From' policy * @param policy (default: `'default'`) Tagged query 'From' policy
* @param measurement Tagged query 'From' measurement * @param measurement (optional) Tagged query 'From' measurement
* @param group_time 'Group by' time condition (if set to null, do not groups by time) * @param group_time (default: `'$__interval'`) 'Group by' time condition (if set to null, do not groups by time)
* @param group_tags 'Group by' tags list * @param group_tags (optional) 'Group by' tags list
* @param fill 'Group by' missing values fill mode (works only with 'Group by time()') * @param fill (default: `'none'`) 'Group by' missing values fill mode (works only with 'Group by time()')
* *
* @param resultFormat Format results as 'Time series' or 'Table' * @param resultFormat (default: `'time_series'`) Format results as 'Time series' or 'Table'
* *
* @return Panel target * @return Panel target
*/ */
@ -26,6 +27,7 @@
alias=null, alias=null,
datasource=null, datasource=null,
hide=null,
rawQuery=null, rawQuery=null,
@ -42,6 +44,7 @@
[if alias != null then 'alias']: alias, [if alias != null then 'alias']: alias,
[if datasource != null then 'datasource']: datasource, [if datasource != null then 'datasource']: datasource,
[if hide != null then 'hide']: hide,
[if query != null then 'query']: query, [if query != null then 'query']: query,
[if rawQuery != null then 'rawQuery']: rawQuery, [if rawQuery != null then 'rawQuery']: rawQuery,

View File

@ -1,5 +1,17 @@
{ {
/** /**
* Creates [links](https://grafana.com/docs/grafana/latest/linking/linking-overview/) to navigate to other dashboards.
*
* @param title Human-readable label for the link.
* @param tags Limits the linked dashboards to only the ones with the corresponding tags. Otherwise, Grafana includes links to all other dashboards.
* @param asDropdown (default: `true`) Whether to use a dropdown (with an optional title). If `false`, displays the dashboard links side by side across the top of dashboard.
* @param includeVars (default: `false`) Whether to include template variables currently used as query parameters in the link. Any matching templates in the linked dashboard are set to the values from the link
* @param keepTime (default: `false`) Whether to include the current dashboard time range in the link (e.g. from=now-3h&to=now)
* @param icon (default: `'external link'`) Icon displayed with the link.
* @param url (default: `''`) URL of the link
* @param targetBlank (default: `false`) Whether the link will open in a new window.
* @param type (default: `'dashboards'`)
*
* @name link.dashboards * @name link.dashboards
*/ */
dashboards( dashboards(

View File

@ -1,18 +1,20 @@
{ {
/** /**
* Returns a new log panel that can be added in a row. * Creates a [log panel](https://grafana.com/docs/grafana/latest/panels/visualizations/logs-panel/).
* It requires the log panel plugin in grafana, which is built-in. * It requires the log panel plugin in grafana, which is built-in.
* *
* @name logPanel.new * @name logPanel.new
* *
* @param title The title of the log panel. * @param title (default `''`) The title of the log panel.
* @param span Width of the panel * @param span (optional) Width of the panel
* @param datasource Datasource * @param datasource (optional) Datasource
* @showLabels boolean to show or hide labels * @showLabels (default `false`) Whether to show or hide labels
* @showTime boolean to show or hide time for each line * @showTime (default `true`) Whether to show or hide time for each line
* @wrapLogMessage true to wrap log line to the next line * @wrapLogMessage (default `true`) Whether to wrap log line to the next line
* @sortOrder sort log by time (can be Descending or Ascending ) * @sortOrder (default `'Descending'`) sort log by time (can be 'Descending' or 'Ascending' )
* @return A json that represents a log panel *
* @method addTarget(target) Adds a target object
* @method addTargets(targets) Adds an array of targets
*/ */
new( new(
title='', title='',

View File

@ -1,6 +1,11 @@
{ {
/** /**
* Creates a [Loki target](https://grafana.com/docs/grafana/latest/features/datasources/loki/)
*
* @name loki.target * @name loki.target
*
* @param expr
* @param hide (optional) Disable query on graph.
*/ */
target( target(
expr, expr,

View File

@ -1,25 +1,28 @@
{ {
/** /**
* Returns a new pie chart panel that can be added in a row. * Creates a pie chart panel.
* It requires the pie chart panel plugin in grafana, which needs to be explicitly installed. * It requires the [pie chart panel plugin in grafana](https://grafana.com/grafana/plugins/grafana-piechart-panel),
* which needs to be explicitly installed.
* *
* @name pieChartPanel.new * @name pieChartPanel.new
* *
* @param title The title of the pie chart panel. * @param title The title of the pie chart panel.
* @param description Description of the panel * @param description (default `''`) Description of the panel
* @param span Width of the panel * @param span (optional) Width of the panel
* @param min_span Min span * @param min_span (optional) Min span
* @param datasource Datasource * @param datasource (optional) Datasource
* @param aliasColors Define color mappings * @param aliasColors (optional) Define color mappings
* @param pieType Type of pie chart (one of pie or donut) * @param pieType (default `'pie'`) Type of pie chart (one of pie or donut)
* @param showLegend Show legend * @param showLegend (default `true`) Show legend
* @param showLegendPercentage Show percentage values in the legend * @param showLegendPercentage (default `true`) Show percentage values in the legend
* @param legendType Type of legend (one of 'Right side', 'Under graph' or 'On graph') * @param legendType (default `'Right side'`) Type of legend (one of 'Right side', 'Under graph' or 'On graph')
* @param valueName Type of tooltip value * @param valueName (default `'current') Type of tooltip value
* @param repeat Variable used to repeat the pie chart * @param repeat (optional) Variable used to repeat the pie chart
* @param repeatDirection Which direction to repeat the panel, 'h' for horizontal and 'v' for vertical * @param repeatDirection (optional) Which direction to repeat the panel, 'h' for horizontal and 'v' for vertical
* @param maxPerRow Number of panels to display when repeated. Used in combination with repeat. * @param maxPerRow (optional) Number of panels to display when repeated. Used in combination with repeat.
* @return A json that represents a pie chart panel * @return A json that represents a pie chart panel
*
* @method addTarget(target) Adds a target object.
*/ */
new( new(
title, title,

View File

@ -6,8 +6,8 @@
* @name pluginlist.new * @name pluginlist.new
* *
* @param title The title of the pluginlist panel. * @param title The title of the pluginlist panel.
* @param description Description of the panel * @param description (optional) Description of the panel
* @param limit Set maximum items in a list * @param limit (optional) Set maximum items in a list
* @return A json that represents a pluginlist panel * @return A json that represents a pluginlist panel
*/ */
new( new(

View File

@ -1,6 +1,20 @@
{ {
/** /**
* Creates a [Prometheus target](https://grafana.com/docs/grafana/latest/features/datasources/prometheus/)
* to be added to panels.
*
* @name prometheus.target * @name prometheus.target
*
* @param expr PromQL query to be exercised against Prometheus. Checkout [Prometheus documentation](https://prometheus.io/docs/prometheus/latest/querying/basics/).
* @param format (default `'time_series'`) Switch between `'table'`, `'time_series'` or `'heatmap'`. Table will only work in the Table panel. Heatmap is suitable for displaying metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound.
* @param intervalFactor (default `2`)
* @param legendFormat (default `''`) Controls the name of the time series, using name or pattern. For example `{{hostname}}` is replaced with the label value for the label `hostname`.
* @param datasource (optional) Name of the Prometheus datasource. Leave by default otherwise.
* @param interval (optional) Time span used to aggregate or group data points by time. By default Grafana uses an automatic interval calculated based on the width of the graph.
* @param instant (optional) Perform an "instant" query, to return only the latest value that Prometheus has scraped for the requested time series. Instant queries return results much faster than normal range queries. Use them to look up label sets.
* @param hide (optional) Set to `true` to hide the target from the panel.
*
* @return A Prometheus target to be added to panels.
*/ */
target( target(
expr, expr,

View File

@ -1,6 +1,18 @@
{ {
/** /**
* Creates a [row](https://grafana.com/docs/grafana/latest/features/dashboard/dashboards/#rows).
* Rows are logical dividers within a dashboard and used to group panels together.
*
* @name row.new * @name row.new
*
* @param title The title of the row.
* @param showTitle (default `true` if title is set) Whether to show the row title
* @paral titleSize (default `'h6'`) The size of the title
* @param collapse (default `false`) The initial state of the row when opening the dashboard. Panels in a collapsed row are not load until the row is expanded.
* @param repeat (optional) Name of variable that should be used to repeat this row. It is recommended to use the variable in the row title as well.
*
* @method addPanels(panels) Appends an array of nested panels
* @method addPanel(panel,gridPos) Appends a nested panel, with an optional grid position in grid coordinates, e.g. `gridPos={'x':0, 'y':0, 'w':12, 'h': 9}`
*/ */
new( new(
title='Dashboard Row', title='Dashboard Row',

View File

@ -1,6 +1,49 @@
{ {
/** /**
* Creates a singlestat panel.
*
* @name singlestat.new * @name singlestat.new
*
* @param title The title of the singlestat panel.
* @param format (default `'none'`) Unit
* @param description (default `''`)
* @param interval (optional)
* @param height (optional)
* @param datasource (optional)
* @param span (optional)
* @param min_span (optional)
* @param decimals (optional)
* @param valueName (default `'avg'`)
* @param valueFontSize (default `'80%'`)
* @param prefixFontSize (default `'50%'`)
* @param postfixFontSize (default `'50%'`)
* @param mappingType (default `1`)
* @param repeat (optional)
* @param repeatDirection (optional)
* @param prefix (default `''`)
* @param postfix (default `''`)
* @param colors (default `['#299c46','rgba(237, 129, 40, 0.89)','#d44a3a']`)
* @param colorBackground (default `false`)
* @param colorValue (default `false`)
* @param thresholds (default `''`)
* @param valueMaps (default `{value: 'null',op: '=',text: 'N/A'}`)
* @param rangeMaps (default `{value: 'null',op: '=',text: 'N/A'}`)
* @param transparent (optional)
* @param sparklineFillColor (default `'rgba(31, 118, 189, 0.18)'`)
* @param sparklineFull (default `false`)
* @param sparklineLineColor (default `'rgb(31, 120, 193)'`)
* @param sparklineShow (default `false`)
* @param gaugeShow (default `false`)
* @param gaugeMinValue (default `0`)
* @param gaugeMaxValue (default `100`)
* @param gaugeThresholdMarkers (default `true`)
* @param gaugeThresholdLabels (default `false`)
* @param timeFrom (optional)
* @param links (optional)
* @param tableColumn (default `''`)
* @param maxPerRow (optional)
*
* @method addTarget(target) Adds a target object.
*/ */
new( new(
title, title,

View File

@ -1,6 +1,12 @@
{ {
/** /**
* Creates an SQL target.
*
* @name sql.target * @name sql.target
*
* @param rawSql The SQL query
* @param datasource (optional)
* @param format (default `'time_series'`)
*/ */
target( target(
rawSql, rawSql,

View File

@ -5,34 +5,34 @@
* @name statPanel.new * @name statPanel.new
* *
* @param title Panel title. * @param title Panel title.
* @param description Panel description. * @param description (optional) Panel description.
* @param transparent Whether to display the panel without a background. * @param transparent (default `false`) Whether to display the panel without a background.
* @param datasource Panel datasource. * @param datasource (optional) Panel datasource.
* @param allValues Show all values instead of reducing to one. * @param allValues (default `false`) Show all values instead of reducing to one.
* @param valueLimit Limit of values in all values mode. * @param valueLimit (optional) Limit of values in all values mode.
* @param reducerFunction Function to use to reduce values to when using single value. * @param reducerFunction (default `'mean'`) Function to use to reduce values to when using single value.
* @param fields Fields that should be included in the panel. * @param fields (default `''`) Fields that should be included in the panel.
* @param orientation Stacking direction in case of multiple series or fields. * @param orientation (default `'auto'`) Stacking direction in case of multiple series or fields.
* @param colorMode 'value' or 'background'. * @param colorMode (default `'value'`) 'value' or 'background'.
* @param graphMode 'none' or 'area' to enable sparkline mode. * @param graphMode (default `'area'`) 'none' or 'area' to enable sparkline mode.
* @param justifyMode 'auto' or 'center'. * @param justifyMode (default `'auto'`) 'auto' or 'center'.
* @param unit Panel unit field option. * @param unit (default `'none'`) Panel unit field option.
* @param min Leave empty to calculate based on all values. * @param min (optional) Leave empty to calculate based on all values.
* @param max Leave empty to calculate based on all values. * @param max (optional) Leave empty to calculate based on all values.
* @param decimals Number of decimal places to show. * @param decimals (optional) Number of decimal places to show.
* @param displayName Change the field or series name. * @param displayName (optional) Change the field or series name.
* @param noValue What to show when there is no value. * @param noValue (optional) What to show when there is no value.
* @param thresholdsMode 'absolute' or 'percentage'. * @param thresholdsMode (default `'absolute'`) 'absolute' or 'percentage'.
* @param repeat Name of variable that should be used to repeat this panel. * @param repeat (optional) Name of variable that should be used to repeat this panel.
* @param repeatDirection 'h' for horizontal or 'v' for vertical. * @param repeatDirection (default `'h'`) 'h' for horizontal or 'v' for vertical.
* @param repeatMaxPerRow Maximum panels per row in repeat mode. * @param repeatMaxPerRow (optional) Maximum panels per row in repeat mode.
* @param pluginVersion Plugin version the panel should be modeled for. This has been tested with the default, '7', and '6.7'. * @param pluginVersion (default `'7'`) Plugin version the panel should be modeled for. This has been tested with the default, '7', and '6.7'.
* *
* @method addTarget(target) Adds a target object. * @method addTarget(target) Adds a target object.
* @method addTargets(targets) Adds an array of targets. * @method addTargets(targets) Adds an array of targets.
* @method addLink(link) Adds a link. Aregument format: `{ title: 'Link Title', url: 'https://...', targetBlank: true }`. * @method addLink(link) Adds a [panel link](https://grafana.com/docs/grafana/latest/linking/panel-links/). Argument format: `{ title: 'Link Title', url: 'https://...', targetBlank: true }`.
* @method addLinks(links) Adds an array of links. * @method addLinks(links) Adds an array of links.
* @method addThreshold(step) Adds a threshold step. Aregument format: `{ color: 'green', value: 0 }`. * @method addThreshold(step) Adds a [threshold](https://grafana.com/docs/grafana/latest/panels/thresholds/) step. Argument format: `{ color: 'green', value: 0 }`.
* @method addThresholds(steps) Adds an array of threshold steps. * @method addThresholds(steps) Adds an array of threshold steps.
* @method addMapping(mapping) Adds a value mapping. * @method addMapping(mapping) Adds a value mapping.
* @method addMappings(mappings) Adds an array of value mappings. * @method addMappings(mappings) Adds an array of value mappings.

View File

@ -1,23 +1,29 @@
{ {
/** /**
* Returns a new table panel that can be added in a row. * Creates a [table panel](https://grafana.com/docs/grafana/latest/panels/visualizations/table-panel/) that can be added in a row.
* It requires the table panel plugin in grafana, which is built-in. * It requires the table panel plugin in grafana, which is built-in.
* *
* @name table.new * @name table.new
* *
* @param title The title of the graph panel. * @param title The title of the graph panel.
* @param span Width of the panel * @param description (optional) Description of the panel
* @param height Height of the panel * @param span (optional) Width of the panel
* @param description Description of the panel * @param height (optional) Height of the panel
* @param datasource Datasource * @param datasource (optional) Datasource
* @param min_span Min span * @param min_span (optional) Min span
* @param styles Styles for the panel * @param styles (optional) Array of styles for the panel
* @param columns Columns for the panel * @param columns (optional) Array of columns for the panel
* @param sort Sorting instruction for the panel * @param sort (optional) Sorting instruction for the panel
* @param transform allow table manipulation to present data as desired * @param transform (optional) Allow table manipulation to present data as desired
* @param transparent Boolean (default: false) If set to true the panel will be transparent * @param transparent (default: 'false') Whether to display the panel without a background
* @param links Set of links for the panel. * @param links (optional) Array of links for the panel.
* @return A json that represents a table panel * @return A json that represents a table panel
*
* @method addTarget(target) Adds a target object
* @method addTargets(targets) Adds an array of targets
* @method addColumn(field, style) Adds a column
* @method hideColumn(field) Hides a column
* @method addLink(link) Adds a link
*/ */
new( new(
title, title,

View File

@ -1,23 +1,22 @@
{ {
/** /**
* Returns a new template that can be added to a dashboard. * Creates a [template](https://grafana.com/docs/grafana/latest/variables/templates-and-variables/#templates) that can be added to a dashboard.
* See what's a [template](https://grafana.com/docs/grafana/latest/variables/templates-and-variables/#templates).
* *
* @name template.new * @name template.new
* *
* @param name Name of variable * @param name Name of variable.
* @param datasource Template [datasource](https://grafana.com/docs/grafana/latest/variables/variable-types/add-data-source-variable/) * @param datasource Template [datasource](https://grafana.com/docs/grafana/latest/variables/variable-types/add-data-source-variable/)
* @param query [Query expression](https://grafana.com/docs/grafana/latest/variables/variable-types/add-query-variable/) for the datasource. * @param query [Query expression](https://grafana.com/docs/grafana/latest/variables/variable-types/add-query-variable/) for the datasource.
* @param label (optional) Display name of the variable dropdown. If null, then the dropdown label will be the variable name. * @param label (optional) Display name of the variable dropdown. If null, then the dropdown label will be the variable name.
* @param allValues (optional) Formatting for [multi-value variables](https://grafana.com/docs/grafana/latest/variables/formatting-multi-value-variables/#formatting-multi-value-variables) * @param allValues (optional) Formatting for [multi-value variables](https://grafana.com/docs/grafana/latest/variables/formatting-multi-value-variables/#formatting-multi-value-variables)
* @param tagValuesQuery (optional, experimental feature) Group values into [selectable tags](https://grafana.com/docs/grafana/latest/variables/variable-value-tags/) * @param tagValuesQuery (default `''`) Group values into [selectable tags](https://grafana.com/docs/grafana/latest/variables/variable-value-tags/)
* @param current * @param current (default `null`) Can be `null`, `'all'` for all, or any other custom text value.
* @param hide '' (default) the variable dropdown displays the variable Name or Label value. 'label' the variable dropdown only displays the selected variable value and a down arrow. Any other value, no variable dropdown is displayed on the dashboard. * @param hide (default `''`) `''`: the variable dropdown displays the variable Name or Label value. `'label'`: the variable dropdown only displays the selected variable value and a down arrow. Any other value: no variable dropdown is displayed on the dashboard.
* @param regex (optional) Regex expression to filter or capture specific parts of the names returned by your data source query. To see examples, refer to [Filter variables with regex](https://grafana.com/docs/grafana/latest/variables/filter-variables-with-regex/). * @param regex (default `''`) Regex expression to filter or capture specific parts of the names returned by your data source query. To see examples, refer to [Filter variables with regex](https://grafana.com/docs/grafana/latest/variables/filter-variables-with-regex/).
* @param refresh 'never' (default): Variables queries are cached and values are not updated. This is fine if the values never change, but problematic if they are dynamic and change a lot. 'load': Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized. 'time': Queries the data source when the dashboard time range changes. Only use this option if your variable options query contains a time range filter or is dependent on the dashboard time range. * @param refresh (default `'never'`) `'never'`: variables queries are cached and values are not updated. This is fine if the values never change, but problematic if they are dynamic and change a lot. `'load'`: Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized. `'time'`: Queries the data source when the dashboard time range changes. Only use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
* @param includeAll Whether all value option is available or not. False by default. * @param includeAll (default `false`) Whether all value option is available or not.
* @param multi Whether multiple values can be selected or not from variable value list. False by default. * @param multi (default `false`) Whether multiple values can be selected or not from variable value list.
* @param sort 0 (default): Without Sort, 1: Alphabetical (asc), 2: Alphabetical (desc), 3: Numerical (asc), 4: Numerical (desc). * @param sort (default `0`) `0`: Without Sort, `1`: Alphabetical (asc), `2`: Alphabetical (desc), `3`: Numerical (asc), `4`: Numerical (desc).
* *
* @return A [template](https://grafana.com/docs/grafana/latest/variables/templates-and-variables/#templates) * @return A [template](https://grafana.com/docs/grafana/latest/variables/templates-and-variables/#templates)
*/ */
@ -63,12 +62,12 @@
* @name template.interval * @name template.interval
* *
* @param name Variable name * @param name Variable name
* @param query * @param query Comma separated values without spacing of intervals available for selection. Add `'auto'` in the query to turn on the Auto Option. Ex: `'auto,5m,10m,20m'`.
* @param current * @param current Currently selected interval. Must be one of the values in the query. `'auto'` is allowed if defined in the query.
* @param hide '' (default) the variable dropdown displays the variable Name or Label value. 'label' the variable dropdown only displays the selected variable value and a down arrow. Any other value, no variable dropdown is displayed on the dashboard. * @param hide (default `''`) `''`: the variable dropdown displays the variable Name or Label value. `'label'`: the variable dropdown only displays the selected variable value and a down arrow. Any other value: no variable dropdown is displayed on the dashboard.
* @param label (optional) Display name of the variable dropdown. If null, then the dropdown label will be the variable name. * @param label (optional) Display name of the variable dropdown. If null, then the dropdown label will be the variable name.
* @param auto_count (default: 300) Valid only if 'auto' is defined in query. Number of times the current time range will be divided to calculate the value, similar to the Max data points query option. For example, if the current visible time range is 30 minutes, then the auto interval groups the data into 30 one-minute increments. The default value is 30 steps. * @param auto_count (default `300`) Valid only if `'auto'` is defined in query. Number of times the current time range will be divided to calculate the value, similar to the Max data points query option. For example, if the current visible time range is 30 minutes, then the auto interval groups the data into 30 one-minute increments. The default value is 30 steps.
* @param auto_min (default: '10s') Valid only if 'auto' is defined in query. The minimum threshold below which the step count intervals will not divide the time. To continue the 30 minute example, if the minimum interval is set to 2m, then Grafana would group the data into 15 two-minute increments. * @param auto_min (default `'10s'`) Valid only if `'auto'` is defined in query. The minimum threshold below which the step count intervals will not divide the time. To continue the 30 minute example, if the minimum interval is set to `'2m'`, then Grafana would group the data into 15 two-minute increments.
* *
* @return A new interval variable for templating. * @return A new interval variable for templating.
*/ */
@ -105,7 +104,21 @@
current, current,
}, },
/** /**
* Data [source variables](https://grafana.com/docs/grafana/latest/variables/variable-types/add-data-source-variable/)
* allow you to quickly change the data source for an entire dashboard.
* They are useful if you have multiple instances of a data source, perhaps in different environments.
*
* @name template.datasource * @name template.datasource
*
* @param name Data source variable name. Ex: `'PROMETHEUS_DS'`.
* @param query Type of data source. Ex: `'prometheus'`.
* @param current Ex: `'Prometheus'`.
* @param hide (default `''`) `''`: the variable dropdown displays the variable Name or Label value. `'label'`: the variable dropdown only displays the selected variable value and a down arrow. Any other value: no variable dropdown is displayed on the dashboard.
* @param label (optional) Display name of the variable dropdown. If null, then the dropdown label will be the variable name.
* @param regex (default `''`) Regex filter for which data source instances to choose from in the variable value drop-down list. Leave this field empty to display all instances.
* @param refresh (default `'load'`) `'never'`: Variables queries are cached and values are not updated. This is fine if the values never change, but problematic if they are dynamic and change a lot. `'load'`: Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized. `'time'`: Queries the data source when the dashboard time range changes. Only use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
*
* @return A [data source variable](https://grafana.com/docs/grafana/latest/variables/variable-types/add-data-source-variable/).
*/ */
datasource( datasource(
name, name,
@ -139,7 +152,23 @@
refresh, refresh,
filterAuto(str):: str != 'auto', filterAuto(str):: str != 'auto',
/** /**
* Use a [custom variable](https://grafana.com/docs/grafana/latest/variables/variable-types/add-custom-variable/)
* for values that do not change.
*
* @name template.custom * @name template.custom
* This might be numbers, strings, or even other variables.
* @param name Variable name
* @param query Comma separated without spacing list of selectable values.
* @param current Selected value
* @param refresh (default `'never'`) `'never'`: Variables queries are cached and values are not updated. This is fine if the values never change, but problematic if they are dynamic and change a lot. `'load'`: Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized. `'time'`: Queries the data source when the dashboard time range changes. Only use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
* @param label (default `''`) Display name of the variable dropdown. If you dont enter a display name, then the dropdown label will be the variable name.
* @param valuelabels (default `{}`) Display names for values defined in query. For example, if `query='new,old'`, then you may display them as follows `valuelabels={new: 'nouveau', old: 'ancien'}`.
* @param multi (default `false`) Whether multiple values can be selected or not from variable value list.
* @param allValues (optional) Formatting for [multi-value variables](https://grafana.com/docs/grafana/latest/variables/formatting-multi-value-variables/#formatting-multi-value-variables)
* @param includeAll (default `false`) Whether all value option is available or not.
* @param hide (default `''`) `''`: the variable dropdown displays the variable Name or Label value. `'label'`: the variable dropdown only displays the selected variable value and a down arrow. Any other value: no variable dropdown is displayed on the dashboard.
*
* @return A custom variable.
*/ */
custom( custom(
name, name,
@ -200,7 +229,18 @@
), ),
}, },
/** /**
* [Text box variables](https://grafana.com/docs/grafana/latest/variables/variable-types/add-text-box-variable/)
* display a free text input field with an optional default value.
* This is the most flexible variable, because you can enter any value.
* Use this type of variable if you have metrics with high cardinality or if you want to
* update multiple panels in a dashboard at the same time.
*
* @name template.text * @name template.text
*
* @param name Variable name.
* @param label (default `''`) Display name of the variable dropdown. If you dont enter a display name, then the dropdown label will be the variable name.
*
* @return A text box variable.
*/ */
text( text(
name, name,
@ -218,7 +258,20 @@
type: 'textbox', type: 'textbox',
}, },
/** /**
* [Ad hoc filters](https://grafana.com/docs/grafana/latest/variables/variable-types/add-ad-hoc-filters/)
* allow you to add key/value filters that are automatically added to all metric queries
* that use the specified data source. Unlike other variables, you do not use ad hoc filters in queries.
* Instead, you use ad hoc filters to write filters for existing queries.
* Note: Ad hoc filter variables only work with InfluxDB, Prometheus, and Elasticsearch data sources.
*
* @name template.adhoc * @name template.adhoc
*
* @param name Variable name.
* @param datasource Target data source
* @param label (optional) Display name of the variable dropdown. If you dont enter a display name, then the dropdown label will be the variable name.
* @param hide (default `''`) `''`: the variable dropdown displays the variable Name or Label value. `'label'`: the variable dropdown only displays the selected variable value and a down arrow. Any other value: no variable dropdown is displayed on the dashboard.
*
* @return An ad hoc filter
*/ */
adhoc( adhoc(
name, name,

View File

@ -1,6 +1,19 @@
{ {
/** /**
* Creates a [text panel](https://grafana.com/docs/grafana/latest/panels/visualizations/text-panel/).
*
* @name text.new * @name text.new
*
* @param title (default `''`) Panel title.
* @param description (optional) Panel description.
* @param datasource (optional) Panel datasource.
* @param span (optional)
* @param content (default `''`)
* @param mode (default `'markdown'`) Rendering of the content: 'markdown','html', ...
* @param transparent (optional) Whether to display the panel without a background.
* @param repeat (optional) Name of variable that should be used to repeat this panel.
* @param repeatDirection (default `'h'`) 'h' for horizontal or 'v' for vertical.
* @param repeatMaxPerRow (optional) Maximum panels per row in repeat mode.
*/ */
new( new(
title='', title='',
@ -10,6 +23,9 @@
transparent=null, transparent=null,
description=null, description=null,
datasource=null, datasource=null,
repeat=null,
repeatDirection=null,
repeatMaxPerRow=null,
):: )::
{ {
[if transparent != null then 'transparent']: transparent, [if transparent != null then 'transparent']: transparent,
@ -20,5 +36,8 @@
content: content, content: content,
[if description != null then 'description']: description, [if description != null then 'description']: description,
datasource: datasource, datasource: datasource,
[if repeat != null then 'repeat']: repeat,
[if repeat != null then 'repeatDirection']: repeatDirection,
[if repeat != null then 'maxPerRow']: repeatMaxPerRow,
}, },
} }

View File

@ -1,6 +1,11 @@
{ {
/** /**
* Creates a Timepicker
*
* @name timepicker.new * @name timepicker.new
*
* @param refresh_intervals (default: `['5s','10s','30s','1m','5m','15m','30m','1h','2h','1d']`) Array of time durations
* @param time_options (default: `['5m','15m','1h','6h','12h','24h','2d','7d','30d']`) Array of time durations
*/ */
new( new(
refresh_intervals=[ refresh_intervals=[

View File

@ -320,6 +320,25 @@
], ],
}, },
textPanel(title, markdown):: {
type: 'text',
title: title,
options: {
content: markdown,
mode: 'markdown',
},
transparent: true,
datasource: null,
timeFrom: null,
timeShift: null,
fieldConfig: {
defaults: {
custom: {},
},
overrides: [],
},
},
stack:: { stack:: {
stack: true, stack: true,
fill: 10, fill: 10,

View File

@ -88,14 +88,14 @@ local utils = import 'utils.libsonnet';
{ {
alert: 'AggregatedAPIDown', alert: 'AggregatedAPIDown',
expr: ||| expr: |||
(1 - max by(name, namespace)(avg_over_time(aggregator_unavailable_apiservice[5m]))) * 100 < 90 (1 - max by(name, namespace)(avg_over_time(aggregator_unavailable_apiservice[10m]))) * 100 < 85
||| % $._config, ||| % $._config,
'for': '5m', 'for': '5m',
labels: { labels: {
severity: 'warning', severity: 'warning',
}, },
annotations: { annotations: {
description: 'An aggregated API {{ $labels.name }}/{{ $labels.namespace }} has been only {{ $value | humanize }}% available over the last 5m.', description: 'An aggregated API {{ $labels.name }}/{{ $labels.namespace }} has been only {{ $value | humanize }}% available over the last 10m.',
summary: 'An aggregated API is down.', summary: 'An aggregated API is down.',
}, },
}, },

View File

@ -7,6 +7,9 @@
'cloud.google.com/impending-node-termination', 'cloud.google.com/impending-node-termination',
'aws-node-termination-handler/spot-itn', 'aws-node-termination-handler/spot-itn',
], ],
kubeletCertExpirationWarningSeconds: 7 * 24 * 3600,
kubeletCertExpirationCriticalSeconds: 1 * 24 * 3600,
}, },
prometheusAlerts+:: { prometheusAlerts+:: {
@ -41,6 +44,7 @@
description: '{{ $labels.node }} is unreachable and some workloads may be rescheduled.', description: '{{ $labels.node }} is unreachable and some workloads may be rescheduled.',
summary: 'Node is unreachable.', summary: 'Node is unreachable.',
}, },
'for': '15m',
alert: 'KubeNodeUnreachable', alert: 'KubeNodeUnreachable',
}, },
{ {
@ -107,6 +111,86 @@
summary: 'Kubelet Pod startup latency is too high.', summary: 'Kubelet Pod startup latency is too high.',
}, },
}, },
{
alert: 'KubeletClientCertificateExpiration',
expr: |||
kubelet_certificate_manager_client_ttl_seconds < %(kubeletCertExpirationWarningSeconds)s
||| % $._config,
labels: {
severity: 'warning',
},
annotations: {
description: 'Client certificate for Kubelet on node {{ $labels.node }} expires in {{ $value | humanizeDuration }}.',
summary: 'Kubelet client certificate is about to expire.',
},
},
{
alert: 'KubeletClientCertificateExpiration',
expr: |||
kubelet_certificate_manager_client_ttl_seconds < %(kubeletCertExpirationCriticalSeconds)s
||| % $._config,
labels: {
severity: 'critical',
},
annotations: {
description: 'Client certificate for Kubelet on node {{ $labels.node }} expires in {{ $value | humanizeDuration }}.',
summary: 'Kubelet client certificate is about to expire.',
},
},
{
alert: 'KubeletServerCertificateExpiration',
expr: |||
kubelet_certificate_manager_server_ttl_seconds < %(kubeletCertExpirationWarningSeconds)s
||| % $._config,
labels: {
severity: 'warning',
},
annotations: {
description: 'Server certificate for Kubelet on node {{ $labels.node }} expires in {{ $value | humanizeDuration }}.',
summary: 'Kubelet server certificate is about to expire.',
},
},
{
alert: 'KubeletServerCertificateExpiration',
expr: |||
kubelet_certificate_manager_server_ttl_seconds < %(kubeletCertExpirationCriticalSeconds)s
||| % $._config,
labels: {
severity: 'critical',
},
annotations: {
description: 'Server certificate for Kubelet on node {{ $labels.node }} expires in {{ $value | humanizeDuration }}.',
summary: 'Kubelet server certificate is about to expire.',
},
},
{
alert: 'KubeletClientCertificateRenewalErrors',
expr: |||
increase(kubelet_certificate_manager_client_expiration_renew_errors[5m]) > 0
||| % $._config,
labels: {
severity: 'warning',
},
'for': '15m',
annotations: {
description: 'Kubelet on node {{ $labels.node }} has failed to renew its client certificate ({{ $value | humanize }} errors in the last 5 minutes).',
summary: 'Kubelet has failed to renew its client certificate.',
},
},
{
alert: 'KubeletServerCertificateRenewalErrors',
expr: |||
increase(kubelet_server_expiration_renew_errors[5m]) > 0
||| % $._config,
labels: {
severity: 'warning',
},
'for': '15m',
annotations: {
description: 'Kubelet on node {{ $labels.node }} has failed to renew its server certificate ({{ $value | humanize }} errors in the last 5 minutes).',
summary: 'Kubelet has failed to renew its server certificate.',
},
},
(import '../lib/absent_alert.libsonnet') { (import '../lib/absent_alert.libsonnet') {
componentName:: 'Kubelet', componentName:: 'Kubelet',
selector:: $._config.kubeletSelector, selector:: $._config.kubeletSelector,

View File

@ -94,13 +94,30 @@
}, },
'for': '5m', 'for': '5m',
}, },
{
alert: 'KubeQuotaAlmostFull',
expr: |||
kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="used"}
/ ignoring(instance, job, type)
(kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard"} > 0)
> 0.9 < 1
||| % $._config,
'for': '15m',
labels: {
severity: 'info',
},
annotations: {
description: 'Namespace {{ $labels.namespace }} is using {{ $value | humanizePercentage }} of its {{ $labels.resource }} quota.',
summary: 'Namespace quota is going to be full.',
},
},
{ {
alert: 'KubeQuotaFullyUsed', alert: 'KubeQuotaFullyUsed',
expr: ||| expr: |||
kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="used"} kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="used"}
/ ignoring(instance, job, type) / ignoring(instance, job, type)
(kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard"} > 0) (kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard"} > 0)
>= 1 == 1
||| % $._config, ||| % $._config,
'for': '15m', 'for': '15m',
labels: { labels: {
@ -111,6 +128,23 @@
summary: 'Namespace quota is fully used.', summary: 'Namespace quota is fully used.',
}, },
}, },
{
alert: 'KubeQuotaExceeded',
expr: |||
kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="used"}
/ ignoring(instance, job, type)
(kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard"} > 0)
> 1
||| % $._config,
'for': '15m',
labels: {
severity: 'warning',
},
annotations: {
description: 'Namespace {{ $labels.namespace }} is using {{ $value | humanizePercentage }} of its {{ $labels.resource }} quota.',
summary: 'Namespace quota has exceeded the limits.',
},
},
{ {
alert: 'CPUThrottlingHigh', alert: 'CPUThrottlingHigh',
expr: ||| expr: |||

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;
@ -26,7 +26,7 @@ local singlestat = grafana.singlestat;
span=2, span=2,
valueName='min', valueName='min',
) )
.addTarget(prometheus.target('sum(kubelet_running_pod_count{%(clusterLabel)s="$cluster", %(kubeletSelector)s, instance=~"$instance"})' % $._config, legendFormat='{{instance}}')); .addTarget(prometheus.target('sum(kubelet_running_pods{%(clusterLabel)s="$cluster", %(kubeletSelector)s, instance=~"$instance"})' % $._config, legendFormat='{{instance}}'));
local runningContainerCount = local runningContainerCount =
singlestat.new( singlestat.new(
@ -35,7 +35,7 @@ local singlestat = grafana.singlestat;
span=2, span=2,
valueName='min', valueName='min',
) )
.addTarget(prometheus.target('sum(kubelet_running_container_count{%(clusterLabel)s="$cluster", %(kubeletSelector)s, instance=~"$instance"})' % $._config, legendFormat='{{instance}}')); .addTarget(prometheus.target('sum(kubelet_running_containers{%(clusterLabel)s="$cluster", %(kubeletSelector)s, instance=~"$instance"})' % $._config, legendFormat='{{instance}}'));
local actualVolumeCount = local actualVolumeCount =
singlestat.new( singlestat.new(

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,5 +1,5 @@
local g = import 'grafana-builder/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local grafana = import 'grafonnet/grafana.libsonnet'; local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet';
local template = grafana.template; local template = grafana.template;
{ {

View File

@ -1,5 +1,5 @@
local g = import 'grafana-builder/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local grafana = import 'grafonnet/grafana.libsonnet'; local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet';
local template = grafana.template; local template = grafana.template;
{ {
@ -86,7 +86,7 @@ local template = grafana.template;
.addRow( .addRow(
g.row('Memory Requests') g.row('Memory Requests')
.addPanel( .addPanel(
g.panel('Requests by Namespace') + g.panel('Requests by Cluster') +
g.tablePanel([ g.tablePanel([
// Not using container_memory_usage_bytes here because that includes page cache // Not using container_memory_usage_bytes here because that includes page cache
'sum(container_memory_rss{container!=""}) by (%(clusterLabel)s)' % $._config, 'sum(container_memory_rss{container!=""}) by (%(clusterLabel)s)' % $._config,

View File

@ -1,5 +1,5 @@
local g = import 'grafana-builder/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local grafana = import 'grafonnet/grafana.libsonnet'; local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet';
local template = grafana.template; local template = grafana.template;
{ {

View File

@ -1,5 +1,5 @@
local g = import 'grafana-builder/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local grafana = import 'grafonnet/grafana.libsonnet'; local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet';
local template = grafana.template; local template = grafana.template;
{ {

View File

@ -1,5 +1,5 @@
local g = import 'grafana-builder/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local grafana = import 'grafonnet/grafana.libsonnet'; local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet';
local template = grafana.template; local template = grafana.template;
{ {
@ -191,9 +191,9 @@ local template = grafana.template;
g.tablePanel([ g.tablePanel([
'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="POD", container!="", image!=""}) by (container)' % $._config, 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="POD", container!="", image!=""}) by (container)' % $._config,
'sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config, 'sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config,
'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", image!=""}) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{namespace="$namespace", pod="$pod"}) by (container)' % $._config, 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", image!=""}) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config,
'sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!=""}) by (container)' % $._config, 'sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!=""}) by (container)' % $._config,
'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="", image!=""}) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{namespace="$namespace", pod="$pod"}) by (container)' % $._config, 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="", image!=""}) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config,
'sum(container_memory_rss{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config, 'sum(container_memory_rss{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config,
'sum(container_memory_cache{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config, 'sum(container_memory_cache{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config,
'sum(container_memory_swap{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config, 'sum(container_memory_swap{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config,

View File

@ -1,5 +1,5 @@
local g = import 'grafana-builder/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local grafana = import 'grafonnet/grafana.libsonnet'; local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet';
local template = grafana.template; local template = grafana.template;
{ {

View File

@ -1,5 +1,5 @@
local g = import 'grafana-builder/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local grafana = import 'grafonnet/grafana.libsonnet'; local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet';
local template = grafana.template; local template = grafana.template;
{ {

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local graphPanel = grafana.graphPanel; local graphPanel = grafana.graphPanel;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard; local dashboard = grafana.dashboard;
local row = grafana.row; local row = grafana.row;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;
@ -7,7 +7,7 @@ local graphPanel = grafana.graphPanel;
local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet';
local numbersinglestat = promgrafonnet.numbersinglestat; local numbersinglestat = promgrafonnet.numbersinglestat;
local gauge = promgrafonnet.gauge; local gauge = promgrafonnet.gauge;
local g = import 'grafana-builder/grafana.libsonnet'; local g = import 'github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet';
{ {
grafanaDashboards+:: { grafanaDashboards+:: {
@ -47,7 +47,7 @@ local g = import 'grafana-builder/grafana.libsonnet';
}) })
.addPanel( .addPanel(
g.panel('CPU Utilisation') + g.panel('CPU Utilisation') +
g.statPanel('1 - avg(rate(wmi_cpu_time_total{mode="idle"}[1m]))') g.statPanel('1 - avg(rate(windows_cpu_time_total{mode="idle"}[1m]))')
) )
.addPanel( .addPanel(
g.panel('CPU Requests Commitment') + g.panel('CPU Requests Commitment') +
@ -459,7 +459,7 @@ local g = import 'grafana-builder/grafana.libsonnet';
template.new( template.new(
'instance', 'instance',
'$datasource', '$datasource',
'label_values(wmi_system_system_up_time, instance)', 'label_values(windows_system_system_up_time, instance)',
label='Instance', label='Instance',
refresh='time', refresh='time',
sort=1, sort=1,
@ -474,7 +474,7 @@ local g = import 'grafana-builder/grafana.libsonnet';
) )
.addPanel( .addPanel(
g.panel('CPU Usage Per Core') + g.panel('CPU Usage Per Core') +
g.queryPanel('sum by (core) (irate(wmi_cpu_time_total{%(wmiExporterSelector)s, mode!="idle", instance="$instance"}[5m]))' % $._config, '{{core}}') + g.queryPanel('sum by (core) (irate(windows_cpu_time_total{%(wmiExporterSelector)s, mode!="idle", instance="$instance"}[5m]))' % $._config, '{{core}}') +
{ yaxes: g.yaxes('percentunit') }, { yaxes: g.yaxes('percentunit') },
) )
) )
@ -492,13 +492,13 @@ local g = import 'grafana-builder/grafana.libsonnet';
.addTarget(prometheus.target( .addTarget(prometheus.target(
||| |||
max( max(
wmi_os_visible_memory_bytes{%(wmiExporterSelector)s, instance="$instance"} windows_os_visible_memory_bytes{%(wmiExporterSelector)s, instance="$instance"}
- wmi_memory_available_bytes{%(wmiExporterSelector)s, instance="$instance"} - windows_memory_available_bytes{%(wmiExporterSelector)s, instance="$instance"}
) )
||| % $._config, legendFormat='memory used' ||| % $._config, legendFormat='memory used'
)) ))
.addTarget(prometheus.target('max(node:windows_node_memory_totalCached_bytes:sum{%(wmiExporterSelector)s, instance="$instance"})' % $._config, legendFormat='memory cached')) .addTarget(prometheus.target('max(node:windows_node_memory_totalCached_bytes:sum{%(wmiExporterSelector)s, instance="$instance"})' % $._config, legendFormat='memory cached'))
.addTarget(prometheus.target('max(wmi_memory_available_bytes{%(wmiExporterSelector)s, instance="$instance"})' % $._config, legendFormat='memory free')) .addTarget(prometheus.target('max(windows_memory_available_bytes{%(wmiExporterSelector)s, instance="$instance"})' % $._config, legendFormat='memory free'))
) )
.addPanel( .addPanel(
g.panel('Memory Saturation (Swap I/O) Pages') + g.panel('Memory Saturation (Swap I/O) Pages') +
@ -515,9 +515,9 @@ local g = import 'grafana-builder/grafana.libsonnet';
) )
.addPanel( .addPanel(
graphPanel.new('Disk I/O',) graphPanel.new('Disk I/O',)
.addTarget(prometheus.target('max(rate(wmi_logical_disk_read_bytes_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='read')) .addTarget(prometheus.target('max(rate(windows_logical_disk_read_bytes_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='read'))
.addTarget(prometheus.target('max(rate(wmi_logical_disk_write_bytes_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='written')) .addTarget(prometheus.target('max(rate(windows_logical_disk_write_bytes_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='written'))
.addTarget(prometheus.target('max(rate(wmi_logical_disk_read_seconds_total{%(wmiExporterSelector)s, instance="$instance"}[2m]) + rate(wmi_logical_disk_write_seconds_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='io time')) + .addTarget(prometheus.target('max(rate(windows_logical_disk_read_seconds_total{%(wmiExporterSelector)s, instance="$instance"}[2m]) + rate(windows_logical_disk_write_seconds_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='io time')) +
{ {
seriesOverrides: [ seriesOverrides: [
{ {

View File

@ -1,24 +1,24 @@
{ {
"version": 1,
"dependencies": [ "dependencies": [
{ {
"name": "grafana-builder",
"source": { "source": {
"git": { "git": {
"remote": "https://github.com/grafana/jsonnet-libs", "remote": "https://github.com/grafana/grafonnet-lib.git",
"subdir": "grafana-builder" "subdir": "grafonnet"
} }
}, },
"version": "master" "version": "master"
}, },
{ {
"name": "grafonnet",
"source": { "source": {
"git": { "git": {
"remote": "https://github.com/grafana/grafonnet-lib", "remote": "https://github.com/grafana/jsonnet-libs.git",
"subdir": "grafonnet" "subdir": "grafana-builder"
} }
}, },
"version": "master" "version": "master"
} }
] ],
"legacyImports": false
} }

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local singlestat = grafana.singlestat; local singlestat = grafana.singlestat;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -1,4 +1,4 @@
local grafana = import 'grafonnet/grafana.libsonnet'; local grafana = import 'github.com/grafana/grafonnet-lib/grafonnet/grafana.libsonnet';
local singlestat = grafana.singlestat; local singlestat = grafana.singlestat;
local prometheus = grafana.prometheus; local prometheus = grafana.prometheus;

View File

@ -9,7 +9,7 @@
record: 'node:windows_node:sum', record: 'node:windows_node:sum',
expr: ||| expr: |||
count ( count (
wmi_system_system_up_time{%(wmiExporterSelector)s} windows_system_system_up_time{%(wmiExporterSelector)s}
) )
||| % $._config, ||| % $._config,
}, },
@ -18,7 +18,7 @@
record: 'node:windows_node_num_cpu:sum', record: 'node:windows_node_num_cpu:sum',
expr: ||| expr: |||
count by (instance) (sum by (instance, core) ( count by (instance) (sum by (instance, core) (
wmi_cpu_time_total{%(wmiExporterSelector)s} windows_cpu_time_total{%(wmiExporterSelector)s}
)) ))
||| % $._config, ||| % $._config,
}, },
@ -26,7 +26,7 @@
// CPU utilisation is % CPU is not idle. // CPU utilisation is % CPU is not idle.
record: ':windows_node_cpu_utilisation:avg1m', record: ':windows_node_cpu_utilisation:avg1m',
expr: ||| expr: |||
1 - avg(rate(wmi_cpu_time_total{%(wmiExporterSelector)s,mode="idle"}[1m])) 1 - avg(rate(windows_cpu_time_total{%(wmiExporterSelector)s,mode="idle"}[1m]))
||| % $._config, ||| % $._config,
}, },
{ {
@ -34,7 +34,7 @@
record: 'node:windows_node_cpu_utilisation:avg1m', record: 'node:windows_node_cpu_utilisation:avg1m',
expr: ||| expr: |||
1 - avg by (instance) ( 1 - avg by (instance) (
rate(wmi_cpu_time_total{%(wmiExporterSelector)s,mode="idle"}[1m]) rate(windows_cpu_time_total{%(wmiExporterSelector)s,mode="idle"}[1m])
) )
||| % $._config, ||| % $._config,
}, },
@ -42,9 +42,9 @@
record: ':windows_node_memory_utilisation:', record: ':windows_node_memory_utilisation:',
expr: ||| expr: |||
1 - 1 -
sum(wmi_memory_available_bytes{%(wmiExporterSelector)s}) sum(windows_memory_available_bytes{%(wmiExporterSelector)s})
/ /
sum(wmi_os_visible_memory_bytes{%(wmiExporterSelector)s}) sum(windows_os_visible_memory_bytes{%(wmiExporterSelector)s})
||| % $._config, ||| % $._config,
}, },
// Add separate rules for Free & Total, so we can aggregate across clusters // Add separate rules for Free & Total, so we can aggregate across clusters
@ -52,19 +52,19 @@
{ {
record: ':windows_node_memory_MemFreeCached_bytes:sum', record: ':windows_node_memory_MemFreeCached_bytes:sum',
expr: ||| expr: |||
sum(wmi_memory_available_bytes{%(wmiExporterSelector)s} + wmi_memory_cache_bytes{%(wmiExporterSelector)s}) sum(windows_memory_available_bytes{%(wmiExporterSelector)s} + windows_memory_cache_bytes{%(wmiExporterSelector)s})
||| % $._config, ||| % $._config,
}, },
{ {
record: 'node:windows_node_memory_totalCached_bytes:sum', record: 'node:windows_node_memory_totalCached_bytes:sum',
expr: ||| expr: |||
(wmi_memory_cache_bytes{%(wmiExporterSelector)s} + wmi_memory_modified_page_list_bytes{%(wmiExporterSelector)s} + wmi_memory_standby_cache_core_bytes{%(wmiExporterSelector)s} + wmi_memory_standby_cache_normal_priority_bytes{%(wmiExporterSelector)s} + wmi_memory_standby_cache_reserve_bytes{%(wmiExporterSelector)s}) (windows_memory_cache_bytes{%(wmiExporterSelector)s} + windows_memory_modified_page_list_bytes{%(wmiExporterSelector)s} + windows_memory_standby_cache_core_bytes{%(wmiExporterSelector)s} + windows_memory_standby_cache_normal_priority_bytes{%(wmiExporterSelector)s} + windows_memory_standby_cache_reserve_bytes{%(wmiExporterSelector)s})
||| % $._config, ||| % $._config,
}, },
{ {
record: ':windows_node_memory_MemTotal_bytes:sum', record: ':windows_node_memory_MemTotal_bytes:sum',
expr: ||| expr: |||
sum(wmi_os_visible_memory_bytes{%(wmiExporterSelector)s}) sum(windows_os_visible_memory_bytes{%(wmiExporterSelector)s})
||| % $._config, ||| % $._config,
}, },
{ {
@ -73,7 +73,7 @@
record: 'node:windows_node_memory_bytes_available:sum', record: 'node:windows_node_memory_bytes_available:sum',
expr: ||| expr: |||
sum by (instance) ( sum by (instance) (
(wmi_memory_available_bytes{%(wmiExporterSelector)s}) (windows_memory_available_bytes{%(wmiExporterSelector)s})
) )
||| % $._config, ||| % $._config,
}, },
@ -82,7 +82,7 @@
record: 'node:windows_node_memory_bytes_total:sum', record: 'node:windows_node_memory_bytes_total:sum',
expr: ||| expr: |||
sum by (instance) ( sum by (instance) (
wmi_os_visible_memory_bytes{%(wmiExporterSelector)s} windows_os_visible_memory_bytes{%(wmiExporterSelector)s}
) )
||| % $._config, ||| % $._config,
}, },
@ -104,15 +104,15 @@
{ {
record: 'node:windows_node_memory_swap_io_pages:irate', record: 'node:windows_node_memory_swap_io_pages:irate',
expr: ||| expr: |||
irate(wmi_memory_swap_page_operations_total{%(wmiExporterSelector)s}[5m]) irate(windows_memory_swap_page_operations_total{%(wmiExporterSelector)s}[5m])
||| % $._config, ||| % $._config,
}, },
{ {
// Disk utilisation (ms spent, by rate() it's bound by 1 second) // Disk utilisation (ms spent, by rate() it's bound by 1 second)
record: ':windows_node_disk_utilisation:avg_irate', record: ':windows_node_disk_utilisation:avg_irate',
expr: ||| expr: |||
avg(irate(wmi_logical_disk_read_seconds_total{%(wmiExporterSelector)s}[1m]) + avg(irate(windows_logical_disk_read_seconds_total{%(wmiExporterSelector)s}[1m]) +
irate(wmi_logical_disk_write_seconds_total{%(wmiExporterSelector)s}[1m]) irate(windows_logical_disk_write_seconds_total{%(wmiExporterSelector)s}[1m])
) )
||| % $._config, ||| % $._config,
}, },
@ -121,8 +121,8 @@
record: 'node:windows_node_disk_utilisation:avg_irate', record: 'node:windows_node_disk_utilisation:avg_irate',
expr: ||| expr: |||
avg by (instance) ( avg by (instance) (
(irate(wmi_logical_disk_read_seconds_total{%(wmiExporterSelector)s}[1m]) + (irate(windows_logical_disk_read_seconds_total{%(wmiExporterSelector)s}[1m]) +
irate(wmi_logical_disk_write_seconds_total{%(wmiExporterSelector)s}[1m])) irate(windows_logical_disk_write_seconds_total{%(wmiExporterSelector)s}[1m]))
) )
||| % $._config, ||| % $._config,
}, },
@ -130,45 +130,45 @@
record: 'node:windows_node_filesystem_usage:', record: 'node:windows_node_filesystem_usage:',
expr: ||| expr: |||
max by (instance,volume)( max by (instance,volume)(
(wmi_logical_disk_size_bytes{%(wmiExporterSelector)s} (windows_logical_disk_size_bytes{%(wmiExporterSelector)s}
- wmi_logical_disk_free_bytes{%(wmiExporterSelector)s}) - windows_logical_disk_free_bytes{%(wmiExporterSelector)s})
/ wmi_logical_disk_size_bytes{%(wmiExporterSelector)s} / windows_logical_disk_size_bytes{%(wmiExporterSelector)s}
) )
||| % $._config, ||| % $._config,
}, },
{ {
record: 'node:windows_node_filesystem_avail:', record: 'node:windows_node_filesystem_avail:',
expr: ||| expr: |||
max by (instance, volume) (wmi_logical_disk_free_bytes{%(wmiExporterSelector)s} / wmi_logical_disk_size_bytes{%(wmiExporterSelector)s}) max by (instance, volume) (windows_logical_disk_free_bytes{%(wmiExporterSelector)s} / windows_logical_disk_size_bytes{%(wmiExporterSelector)s})
||| % $._config, ||| % $._config,
}, },
{ {
record: ':windows_node_net_utilisation:sum_irate', record: ':windows_node_net_utilisation:sum_irate',
expr: ||| expr: |||
sum(irate(wmi_net_bytes_total{%(wmiExporterSelector)s}[1m])) sum(irate(windows_net_bytes_total{%(wmiExporterSelector)s}[1m]))
||| % $._config, ||| % $._config,
}, },
{ {
record: 'node:windows_node_net_utilisation:sum_irate', record: 'node:windows_node_net_utilisation:sum_irate',
expr: ||| expr: |||
sum by (instance) ( sum by (instance) (
(irate(wmi_net_bytes_total{%(wmiExporterSelector)s}[1m])) (irate(windows_net_bytes_total{%(wmiExporterSelector)s}[1m]))
) )
||| % $._config, ||| % $._config,
}, },
{ {
record: ':windows_node_net_saturation:sum_irate', record: ':windows_node_net_saturation:sum_irate',
expr: ||| expr: |||
sum(irate(wmi_net_packets_received_discarded{%(wmiExporterSelector)s}[1m])) + sum(irate(windows_net_packets_received_discarded{%(wmiExporterSelector)s}[1m])) +
sum(irate(wmi_net_packets_outbound_discarded{%(wmiExporterSelector)s}[1m])) sum(irate(windows_net_packets_outbound_discarded{%(wmiExporterSelector)s}[1m]))
||| % $._config, ||| % $._config,
}, },
{ {
record: 'node:windows_node_net_saturation:sum_irate', record: 'node:windows_node_net_saturation:sum_irate',
expr: ||| expr: |||
sum by (instance) ( sum by (instance) (
(irate(wmi_net_packets_received_discarded{%(wmiExporterSelector)s}[1m]) + (irate(windows_net_packets_received_discarded{%(wmiExporterSelector)s}[1m]) +
irate(wmi_net_packets_outbound_discarded{%(wmiExporterSelector)s}[1m])) irate(windows_net_packets_outbound_discarded{%(wmiExporterSelector)s}[1m]))
) )
||| % $._config, ||| % $._config,
}, },
@ -180,37 +180,37 @@
{ {
record: 'windows_container_available', record: 'windows_container_available',
expr: ||| expr: |||
wmi_container_available{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) windows_container_available{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace)
||| % $._config, ||| % $._config,
}, },
{ {
record: 'windows_container_total_runtime', record: 'windows_container_total_runtime',
expr: ||| expr: |||
wmi_container_cpu_usage_seconds_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) windows_container_cpu_usage_seconds_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace)
||| % $._config, ||| % $._config,
}, },
{ {
record: 'windows_container_memory_usage', record: 'windows_container_memory_usage',
expr: ||| expr: |||
wmi_container_memory_usage_commit_bytes{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) windows_container_memory_usage_commit_bytes{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace)
||| % $._config, ||| % $._config,
}, },
{ {
record: 'windows_container_private_working_set_usage', record: 'windows_container_private_working_set_usage',
expr: ||| expr: |||
wmi_container_memory_usage_private_working_set_bytes{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) windows_container_memory_usage_private_working_set_bytes{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace)
||| % $._config, ||| % $._config,
}, },
{ {
record: 'windows_container_network_receive_bytes_total', record: 'windows_container_network_receive_bytes_total',
expr: ||| expr: |||
wmi_container_network_receive_bytes_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) windows_container_network_receive_bytes_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace)
||| % $._config, ||| % $._config,
}, },
{ {
record: 'windows_container_network_transmit_bytes_total', record: 'windows_container_network_transmit_bytes_total',
expr: ||| expr: |||
wmi_container_network_transmit_bytes_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) windows_container_network_transmit_bytes_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace)
||| % $._config, ||| % $._config,
}, },
{ {

View File

@ -80,9 +80,15 @@ This page collects this repositories alerts and begins the process of describing
##### Alert Name: "KubeMemOvercommit" ##### Alert Name: "KubeMemOvercommit"
+ *Message*: `Overcommited Memory resource request quota on Namespaces.` + *Message*: `Overcommited Memory resource request quota on Namespaces.`
+ *Severity*: warning + *Severity*: warning
##### Alert Name: "KubeQuotaAlmostFull"
+ *Message*: `{{ $value | humanizePercentage }} usage of {{ $labels.resource }} in namespace {{ $labels.namespace }}.`
+ *Severity*: info
##### Alert Name: "KubeQuotaFullyUsed" ##### Alert Name: "KubeQuotaFullyUsed"
+ *Message*: `{{ $value | humanizePercentage }} usage of {{ $labels.resource }} in namespace {{ $labels.namespace }}.` + *Message*: `{{ $value | humanizePercentage }} usage of {{ $labels.resource }} in namespace {{ $labels.namespace }}.`
+ *Severity*: info + *Severity*: info
##### Alert Name: "KubeQuotaExceeded"
+ *Message*: `{{ $value | humanizePercentage }} usage of {{ $labels.resource }} in namespace {{ $labels.namespace }}.`
+ *Severity*: warning
### Group Name: "kubernetes-storage" ### Group Name: "kubernetes-storage"
##### Alert Name: "KubePersistentVolumeFillingUp" ##### Alert Name: "KubePersistentVolumeFillingUp"
+ *Message*: `The persistent volume claimed by {{ $labels.persistentvolumeclaim }} in namespace {{ $labels.namespace }} has {{ $value | humanizePercentage }} free.` + *Message*: `The persistent volume claimed by {{ $labels.persistentvolumeclaim }} in namespace {{ $labels.namespace }} has {{ $value | humanizePercentage }} free.`

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
{ {
_config+:: { _config+:: {
@ -81,7 +81,8 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
.withStringData({ 'alertmanager.yaml': std.manifestYamlDoc($._config.alertmanager.config) }) + .withStringData({ 'alertmanager.yaml': std.manifestYamlDoc($._config.alertmanager.config) }) +
secret.mixin.metadata.withNamespace($._config.namespace) secret.mixin.metadata.withNamespace($._config.namespace)
else else
secret.new('alertmanager-' + $._config.alertmanager.name, { 'alertmanager.yaml': std.base64($._config.alertmanager.config) }) + secret.new('alertmanager-' + $._config.alertmanager.name, {})
.withStringData({ 'alertmanager.yaml': $._config.alertmanager.config }) +
secret.mixin.metadata.withNamespace($._config.namespace), secret.mixin.metadata.withNamespace($._config.namespace),
serviceAccount: serviceAccount:

View File

@ -13,7 +13,7 @@
{ {
"source": { "source": {
"git": { "git": {
"remote": "https://github.com/coreos/etcd", "remote": "https://github.com/etcd-io/etcd",
"subdir": "Documentation/etcd-mixin" "subdir": "Documentation/etcd-mixin"
} }
}, },
@ -26,7 +26,7 @@
"subdir": "jsonnet/prometheus-operator" "subdir": "jsonnet/prometheus-operator"
} }
}, },
"version": "release-0.41" "version": "release-0.42"
}, },
{ {
"source": { "source": {

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
{ {
_config+:: { _config+:: {

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
{ {
prometheus+:: { prometheus+:: {

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local statefulSet = k.apps.v1.statefulSet; local statefulSet = k.apps.v1.statefulSet;
local affinity = statefulSet.mixin.spec.template.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecutionType; local affinity = statefulSet.mixin.spec.template.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecutionType;
local matchExpression = affinity.mixin.podAffinityTerm.labelSelector.matchExpressionsType; local matchExpression = affinity.mixin.podAffinityTerm.labelSelector.matchExpressionsType;

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
// Custom metrics API allows the HPA v2 to scale based on arbirary metrics. // Custom metrics API allows the HPA v2 to scale based on arbirary metrics.
// For more details on usage visit https://github.com/DirectXMan12/k8s-prometheus-adapter#quick-links // For more details on usage visit https://github.com/DirectXMan12/k8s-prometheus-adapter#quick-links

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,4 +1,4 @@
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet'); local kp = (import './kube-prometheus/kube-prometheus.libsonnet');
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } + { ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } + { ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,6 +1,6 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
(import 'etcd-mixin/mixin.libsonnet') + { (import 'github.com/etcd-io/etcd/Documentation/etcd-mixin/mixin.libsonnet') + {
_config+:: { _config+:: {
etcd: { etcd: {
ips: [], ips: [],

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service; local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType; local servicePort = k.core.v1.service.mixin.spec.portsType;
@ -183,7 +183,7 @@ local servicePort = k.core.v1.service.mixin.spec.portsType;
], ],
}, },
grafanaDashboards+:: { grafanaDashboards+:: {
'weave-net.json': (import 'grafana-weave-net.json'), 'weave-net.json': (import './grafana-weave-net.json'),
'weave-net-cluster.json': (import 'grafana-weave-net-cluster.json'), 'weave-net-cluster.json': (import './grafana-weave-net-cluster.json'),
}, },
} }

View File

@ -1,20 +1,20 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local k3 = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; local k3 = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.3/k.libsonnet';
local configMapList = k3.core.v1.configMapList; local configMapList = k3.core.v1.configMapList;
(import 'grafana/grafana.libsonnet') + (import 'github.com/brancz/kubernetes-grafana/grafana/grafana.libsonnet') +
(import 'kube-state-metrics/kube-state-metrics.libsonnet') + (import './kube-state-metrics/kube-state-metrics.libsonnet') +
(import 'kube-state-metrics-mixin/mixin.libsonnet') + (import 'github.com/kubernetes/kube-state-metrics/jsonnet/kube-state-metrics-mixin/mixin.libsonnet') +
(import 'node-exporter/node-exporter.libsonnet') + (import './node-exporter/node-exporter.libsonnet') +
(import 'node-mixin/mixin.libsonnet') + (import 'github.com/prometheus/node_exporter/docs/node-mixin/mixin.libsonnet') +
(import 'alertmanager/alertmanager.libsonnet') + (import './alertmanager/alertmanager.libsonnet') +
(import 'prometheus-operator/prometheus-operator.libsonnet') + (import 'github.com/prometheus-operator/prometheus-operator/jsonnet/prometheus-operator/prometheus-operator.libsonnet') +
(import 'prometheus/prometheus.libsonnet') + (import './prometheus/prometheus.libsonnet') +
(import 'prometheus-adapter/prometheus-adapter.libsonnet') + (import './prometheus-adapter/prometheus-adapter.libsonnet') +
(import 'kubernetes-mixin/mixin.libsonnet') + (import 'github.com/kubernetes-monitoring/kubernetes-mixin/mixin.libsonnet') +
(import 'prometheus/mixin.libsonnet') + (import 'github.com/prometheus/prometheus/documentation/prometheus-mixin/mixin.libsonnet') +
(import 'alerts/alerts.libsonnet') + (import './alerts/alerts.libsonnet') +
(import 'rules/rules.libsonnet') + { (import './rules/rules.libsonnet') + {
kubePrometheus+:: { kubePrometheus+:: {
namespace: k.core.v1.namespace.new($._config.namespace), namespace: k.core.v1.namespace.new($._config.namespace),
}, },
@ -105,6 +105,11 @@ local configMapList = k3.core.v1.configMapList;
versions+:: { versions+:: {
grafana: '7.1.0', grafana: '7.1.0',
kubeRbacProxy: 'v0.6.0',
},
imageRepos+:: {
kubeRbacProxy: 'quay.io/brancz/kube-rbac-proxy',
}, },
tlsCipherSuites: [ tlsCipherSuites: [

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
local deployment = k.apps.v1.deployment; local deployment = k.apps.v1.deployment;
local container = deployment.mixin.spec.template.spec.containersType; local container = deployment.mixin.spec.template.spec.containersType;
local containerPort = container.portsType; local containerPort = container.portsType;

View File

@ -11,7 +11,7 @@
scrapeTimeout: '30s', scrapeTimeout: '30s',
}, },
}, },
kubeStateMetrics+:: (import 'kube-state-metrics/kube-state-metrics.libsonnet') + kubeStateMetrics+:: (import 'github.com/kubernetes/kube-state-metrics/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet') +
{ {
local ksm = self, local ksm = self,
name:: 'kube-state-metrics', name:: 'kube-state-metrics',

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
{ {
_config+:: { _config+:: {
@ -6,12 +6,10 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
versions+:: { versions+:: {
nodeExporter: 'v0.18.1', nodeExporter: 'v0.18.1',
kubeRbacProxy: 'v0.4.1',
}, },
imageRepos+:: { imageRepos+:: {
nodeExporter: 'quay.io/prometheus/node-exporter', nodeExporter: 'quay.io/prometheus/node-exporter',
kubeRbacProxy: 'quay.io/coreos/kube-rbac-proxy',
}, },
nodeExporter+:: { nodeExporter+:: {
@ -137,6 +135,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
daemonset.mixin.metadata.withNamespace($._config.namespace) + daemonset.mixin.metadata.withNamespace($._config.namespace) +
daemonset.mixin.metadata.withLabels(podLabels) + daemonset.mixin.metadata.withLabels(podLabels) +
daemonset.mixin.spec.selector.withMatchLabels(selectorLabels) + daemonset.mixin.spec.selector.withMatchLabels(selectorLabels) +
daemonset.mixin.spec.updateStrategy.rollingUpdate.withMaxUnavailable('10%') +
daemonset.mixin.spec.template.metadata.withLabels(podLabels) + daemonset.mixin.spec.template.metadata.withLabels(podLabels) +
daemonset.mixin.spec.template.spec.withTolerations([existsToleration]) + daemonset.mixin.spec.template.spec.withTolerations([existsToleration]) +
daemonset.mixin.spec.template.spec.withNodeSelector({ 'kubernetes.io/os': 'linux' }) + daemonset.mixin.spec.template.spec.withNodeSelector({ 'kubernetes.io/os': 'linux' }) +

View File

@ -1,4 +1,4 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
{ {
_config+:: { _config+:: {

Some files were not shown because too many files have changed in this diff Show More