diff --git a/example.jsonnet b/example.jsonnet index 8974158bcd..65c46f37e0 100644 --- a/example.jsonnet +++ b/example.jsonnet @@ -29,6 +29,7 @@ local kp = { ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } + { ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } + { ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } + +{ ['perses-operator-' + name]: kp.persesOperator[name] for name in std.objectFields(kp.persesOperator) } + // { ['pyrra-' + name]: kp.pyrra[name] for name in std.objectFields(kp.pyrra) if name != 'crd' } + { ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } + { ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) } diff --git a/jsonnet/kube-prometheus/components/perses-operator.libsonnet b/jsonnet/kube-prometheus/components/perses-operator.libsonnet new file mode 100644 index 0000000000..8fb02796b3 --- /dev/null +++ b/jsonnet/kube-prometheus/components/perses-operator.libsonnet @@ -0,0 +1,197 @@ +local persesOperator = import 'github.com/perses/perses-operator/jsonnet/perses-operator.libsonnet'; +local communityDashboards = import 'github.com/saswatamcode/community-dashboards/jsonnet/dashboards.libsonnet'; + +local defaults = { + local defaults = self, + name:: 'perses-operator', + namespace:: error 'must provide namespace', + version:: error 'must provide version', + image:: error 'must provide image', + persesImage:: error 'must provide perses image', + prometheusName:: error 'must provide prometheus name', + components:: error 'must provide components', + resources:: { + requests: { cpu: '100m', memory: '100Mi' }, + limits: { cpu: '200m', memory: '200Mi' }, + }, + commonLabels:: { + 'app.kubernetes.io/name': defaults.name, + 'app.kubernetes.io/version': defaults.version, + 'app.kubernetes.io/component': 'perses-operator', + 'app.kubernetes.io/part-of': 'kube-prometheus', + }, + selectorLabels:: { + [labelName]: defaults.commonLabels[labelName] + for labelName in std.objectFields(defaults.commonLabels) + if !std.setMember(labelName, ['app.kubernetes.io/version']) + }, +}; + +function(params) + local config = defaults + params; + // Safety check + assert std.isObject(config.resources); + assert std.isArray(config.components); + + local po = persesOperator(config); + local cd = communityDashboards(config { + datasource: 'prometheus-' + config.prometheusName + '-datasource', + }); + + po { + deployment+: { + spec+: { + template+: { + spec+: { + automountServiceAccountToken: false, + securityContext+: { + runAsGroup: 65534, + }, + }, + }, + }, + }, + } + { + [dashboard.metadata.name]: dashboard + for dashboard in cd.dashboards + } + { + datasource: { + apiVersion: 'perses.dev/v1alpha1', + kind: 'PersesDatasource', + metadata: { + name: 'prometheus-' + config.prometheusName + '-datasource', + labels: config.commonLabels { + 'app.kubernetes.io/instance': 'perses-datasource', + }, + namespace: config.namespace, + }, + spec: { + config: { + default: true, + display: { + name: 'Prometheus ' + config.prometheusName + ' Datasource', + }, + plugin: { + kind: 'PrometheusDatasource', + spec: { + proxy: { + kind: 'HTTPProxy', + spec: { + url: 'http://prometheus-' + config.prometheusName + '.' + config.namespace + '.svc:9090', + }, + }, + }, + }, + }, + }, + }, + } + { + perses: { + apiVersion: 'perses.dev/v1alpha1', + kind: 'Perses', + metadata: { + finalizers: ['perses.dev/finalizer'], + labels: config.commonLabels { + 'app.kubernetes.io/instance': 'perses-' + config.prometheusName, + }, + name: 'perses-' + config.prometheusName, + namespace: config.namespace, + }, + spec: { + image: config.persesImage, + config: { + database: { + file: { + extension: 'yaml', + folder: '/perses', + case_sensitive: false, + }, + }, + ephemeral_dashboard: { + cleanup_interval: '1s', + enable: true, + }, + frontend: { + disable: false, + explorer: { + enable: true, + }, + time_range: { + disable_custom: false, + }, + }, + security: { + authentication: { + disable_sign_up: false, + providers: { + enable_native: false, + }, + }, + cookie: { + secure: false, + }, + enable_auth: false, + readonly: false, + }, + }, + containerPort: 8080, + livenessProbe: { + failureThreshold: 5, + initialDelaySeconds: 10, + periodSeconds: 10, + successThreshold: 1, + timeoutSeconds: 5, + }, + readinessProbe: { + failureThreshold: 5, + initialDelaySeconds: 10, + periodSeconds: 10, + successThreshold: 1, + timeoutSeconds: 5, + }, + storage: { + size: '1Gi', + }, + metadata: { + labels: { + 'app.kubernetes.io/instance': 'perses-' + config.prometheusName, + }, + }, + }, + }, + } + { + //TODO(saswatamcode): Add proper labels. + networkPolicy: { + apiVersion: 'networking.k8s.io/v1', + kind: 'NetworkPolicy', + metadata: { + name: 'perses-' + config.prometheusName, + namespace: config.namespace, + labels: config.commonLabels { + 'app.kubernetes.io/instance': 'perses-' + config.prometheusName, + }, + }, + spec: { + podSelector: { + matchLabels: config.selectorLabels, + }, + policyTypes: ['Egress', 'Ingress'], + egress: [{}], + ingress: [{ + from: [{ + podSelector: { + matchLabels: { + 'app.kubernetes.io/name': 'prometheus', + }, + }, + }], + ports: [ + { + port: 8080, + protocol: 'TCP', + }, + ], + }], + }, + }, + } diff --git a/jsonnet/kube-prometheus/jsonnetfile.json b/jsonnet/kube-prometheus/jsonnetfile.json index 0ee53bb0f6..9042a523ac 100644 --- a/jsonnet/kube-prometheus/jsonnetfile.json +++ b/jsonnet/kube-prometheus/jsonnetfile.json @@ -123,6 +123,26 @@ }, "version": "main", "name": "thanos-mixin" + }, + { + "source": { + "git": { + "remote": "https://github.com/perses/perses-operator", + "subdir": "jsonnet" + } + }, + "version": "main", + "name": "perses-operator" + }, + { + "source": { + "git": { + "remote": "https://github.com/saswatamcode/community-dashboards", + "subdir": "jsonnet" + } + }, + "version": "c3b0b402c32ae174a1a517ac52dc90b50259435a", + "name": "community-dashboards" } ], "legacyImports": true diff --git a/jsonnet/kube-prometheus/main.libsonnet b/jsonnet/kube-prometheus/main.libsonnet index d8aa5028af..8f62b864e1 100644 --- a/jsonnet/kube-prometheus/main.libsonnet +++ b/jsonnet/kube-prometheus/main.libsonnet @@ -5,6 +5,7 @@ local kubernetesControlPlane = import './components/k8s-control-plane.libsonnet' local kubeStateMetrics = import './components/kube-state-metrics.libsonnet'; local customMixin = import './components/mixin/custom.libsonnet'; local nodeExporter = import './components/node-exporter.libsonnet'; +local persesOperator = import './components/perses-operator.libsonnet'; local prometheusAdapter = import './components/prometheus-adapter.libsonnet'; local prometheusOperator = import './components/prometheus-operator.libsonnet'; local prometheus = import './components/prometheus.libsonnet'; @@ -28,6 +29,8 @@ local utils = import './lib/utils.libsonnet'; alertmanager: error 'must provide version', blackboxExporter: error 'must provide version', grafana: error 'must provide version', + persesOperator: error 'must provide version', + perses: error 'must provide version', kubeStateMetrics: error 'must provide version', nodeExporter: error 'must provide version', prometheus: error 'must provide version', @@ -40,6 +43,8 @@ local utils = import './lib/utils.libsonnet'; alertmanager: 'quay.io/prometheus/alertmanager:v' + $.values.common.versions.alertmanager, blackboxExporter: 'quay.io/prometheus/blackbox-exporter:v' + $.values.common.versions.blackboxExporter, grafana: 'grafana/grafana:' + $.values.common.versions.grafana, + perses: 'persesdev/perses:v' + $.values.common.versions.perses, + persesOperator: 'persesdev/perses-operator:v' + $.values.common.versions.persesOperator, kubeStateMetrics: 'registry.k8s.io/kube-state-metrics/kube-state-metrics:v' + $.values.common.versions.kubeStateMetrics, nodeExporter: 'quay.io/prometheus/node-exporter:v' + $.values.common.versions.nodeExporter, prometheus: 'quay.io/prometheus/prometheus:v' + $.values.common.versions.prometheus, @@ -77,6 +82,14 @@ local utils = import './lib/utils.libsonnet'; $.grafana.mixin.grafanaDashboards, mixin+: { ruleLabels: $.values.common.ruleLabels }, }, + persesOperator: { + namespace: $.values.common.namespace, + version: $.values.common.versions.persesOperator, + image: $.values.common.images.persesOperator, + persesImage: $.values.common.images.perses, + prometheusName: $.values.prometheus.name, + components: ['kubernetes', 'etcd', 'node-exporter', 'alertmanager', 'prometheus', 'perses'], + }, kubeStateMetrics: { namespace: $.values.common.namespace, version: $.values.common.versions.kubeStateMetrics, @@ -133,6 +146,7 @@ local utils = import './lib/utils.libsonnet'; alertmanager: alertmanager($.values.alertmanager), blackboxExporter: blackboxExporter($.values.blackboxExporter), grafana: grafana($.values.grafana), + persesOperator: persesOperator($.values.persesOperator), kubeStateMetrics: kubeStateMetrics($.values.kubeStateMetrics), nodeExporter: nodeExporter($.values.nodeExporter), prometheus: prometheus($.values.prometheus), diff --git a/jsonnet/kube-prometheus/versions.json b/jsonnet/kube-prometheus/versions.json index a0505e3ca3..fb56e53f79 100644 --- a/jsonnet/kube-prometheus/versions.json +++ b/jsonnet/kube-prometheus/versions.json @@ -2,6 +2,8 @@ "alertmanager": "0.28.1", "blackboxExporter": "0.26.0", "grafana": "12.0.0", + "perses": "0.51.0-rc.0", + "persesOperator": "0.1.10", "kubeStateMetrics": "2.15.0", "nodeExporter": "1.9.1", "prometheus": "3.3.1", diff --git a/jsonnetfile.lock.json b/jsonnetfile.lock.json index 0e5444a9a2..ce75d20e2c 100644 --- a/jsonnetfile.lock.json +++ b/jsonnetfile.lock.json @@ -18,7 +18,7 @@ "subdir": "contrib/mixin" } }, - "version": "6e1d8153ac91bd047b73895c4ffae84d8b3527ee", + "version": "a029b090cb9fc55bee9811e52c2995dadbc3839b", "sum": "XmXkOCriQIZmXwlIIFhqlJMa0e6qGWdxZD+ZDYaN0Po=" }, { @@ -78,7 +78,7 @@ "subdir": "grafana-builder" } }, - "version": "e338662d07e9bba0090dce00e81f037e6787b034", + "version": "254dfb6a7e4468dd16a5c40fcc5370c20a5a011e", "sum": "G7B6E5sqWirDbMWRhifbLRfGgRFbIh9WCYa6X3kMh6g=" }, { @@ -88,8 +88,8 @@ "subdir": "mixin-utils" } }, - "version": "e338662d07e9bba0090dce00e81f037e6787b034", - "sum": "SRElwa/XrKAN8aZA9zvdRUx8iebl2It7KNQ7VFvMcBA=" + "version": "254dfb6a7e4468dd16a5c40fcc5370c20a5a011e", + "sum": "iu4NT+YOgpxQnxElKML76cSxgTA0cwTmFfI0hOfHHmw=" }, { "source": { @@ -118,8 +118,8 @@ "subdir": "" } }, - "version": "b131a7323f04fc4de88fc2a730833b03885f2c43", - "sum": "B80KfK03VoU0M5Cx+DokrvMa34ZPKJTcM7nclMZMJhY=" + "version": "6c82d5abe587b4c1dda7f1b0013af7d81e84c9fe", + "sum": "+DYf7GXP1DVnkvFIyjm7PcuoqYET3wAnKcVRFMSoj3o=" }, { "source": { @@ -128,7 +128,7 @@ "subdir": "jsonnet/kube-state-metrics" } }, - "version": "090535fcd25170824aa2318e79e437fe71254780", + "version": "1018969872e80b210629ea1748ab8235bb5909fa", "sum": "3bioG7CfTfY9zeu5xU4yon6Zt3kYvNkyl492nOhQxnM=" }, { @@ -138,9 +138,20 @@ "subdir": "jsonnet/kube-state-metrics-mixin" } }, - "version": "090535fcd25170824aa2318e79e437fe71254780", + "version": "1018969872e80b210629ea1748ab8235bb5909fa", "sum": "qclI7LwucTjBef3PkGBkKxF0mfZPbHnn4rlNWKGtR4c=" }, + { + "source": { + "git": { + "remote": "https://github.com/perses/perses-operator.git", + "subdir": "jsonnet" + } + }, + "version": "6855a844c9e680c5cab3772e88cdac110e05bf2c", + "sum": "v1Rbqk0TzQRzKCareR3lLv3WuX+apdoK6KUe+jPU7TI=", + "name": "perses-operator" + }, { "source": { "git": { @@ -148,7 +159,7 @@ "subdir": "jsonnet/mixin" } }, - "version": "fdfc9aa5f3f99fcc8669548f8713b25efb1aacaf", + "version": "6e6db291923c20e8d5846ff484b2743f7c5e812d", "sum": "gi+knjdxs2T715iIQIntrimbHRgHnpM8IFBJDD1gYfs=", "name": "prometheus-operator-mixin" }, @@ -159,8 +170,8 @@ "subdir": "jsonnet/prometheus-operator" } }, - "version": "fdfc9aa5f3f99fcc8669548f8713b25efb1aacaf", - "sum": "p12q3AVid+40sY+D7uGYWG3gay03I3I4QkEVZH5jCXI=" + "version": "6e6db291923c20e8d5846ff484b2743f7c5e812d", + "sum": "yri/B9UZ7LyE8fwbpNVbZL8WHoWGS5/07wHC709DMsQ=" }, { "source": { @@ -180,7 +191,7 @@ "subdir": "docs/node-mixin" } }, - "version": "38d32a397720dfdaf547429ea1b40ab8cfa57e85", + "version": "467d1f3d7d40ef46ae60fdcb01bb0cbe99221518", "sum": "NcpQ0Hz0qciUqmOYoAR0X8GUK5pH/QiUXm1aDNgvua0=" }, { @@ -190,7 +201,7 @@ "subdir": "documentation/prometheus-mixin" } }, - "version": "ca70ed4fed3b5f41fe8fb14d27244a21c2c2b61a", + "version": "eb940d9c3b94ae86de8cc06652d8009cbfbc15ed", "sum": "2c+wttfee9TwuQJZIkNV7Tekem74Qgc7iZ842P28rNw=", "name": "prometheus" }, @@ -205,6 +216,17 @@ "sum": "cxAPQovFkM16zNB5/94O+sk/n3SETk6ao6Oas2Sa6RE=", "name": "pyrra" }, + { + "source": { + "git": { + "remote": "https://github.com/saswatamcode/community-dashboards.git", + "subdir": "jsonnet" + } + }, + "version": "c3b0b402c32ae174a1a517ac52dc90b50259435a", + "sum": "wPgQqzRZMBr8FXbx/L6obU/JkxzOiI5WWENogmQFK1c=", + "name": "community-dashboards" + }, { "source": { "git": { @@ -212,7 +234,7 @@ "subdir": "mixin" } }, - "version": "2a5a856e34adb2653dda700c4d87637236afb2dd", + "version": "88092449cd92ef51e9ef1027715349fd8db89d02", "sum": "ieCD4eMgGbOlrI8GmckGPHBGQDcLasE1rULYq56W/bs=", "name": "thanos-mixin" }, diff --git a/kustomization.yaml b/kustomization.yaml index e0d8039ed7..c1696522a0 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -50,6 +50,47 @@ resources: - ./manifests/nodeExporter-service.yaml - ./manifests/nodeExporter-serviceAccount.yaml - ./manifests/nodeExporter-serviceMonitor.yaml +- ./manifests/persesOperator-alertmanager-overview.yaml +- ./manifests/persesOperator-api-server-overview.yaml +- ./manifests/persesOperator-controller-manager-overview.yaml +- ./manifests/persesOperator-datasource.yaml +- ./manifests/persesOperator-deployment.yaml +- ./manifests/persesOperator-etcd-overview.yaml +- ./manifests/persesOperator-kubelet-overview.yaml +- ./manifests/persesOperator-kubernetes-cluster-networking-overview.yaml +- ./manifests/persesOperator-kubernetes-cluster-resources-overview.yaml +- ./manifests/persesOperator-kubernetes-multi-cluster-resources-overview.yaml +- ./manifests/persesOperator-kubernetes-namespace-networking-overview.yaml +- ./manifests/persesOperator-kubernetes-namespace-resources-overview.yaml +- ./manifests/persesOperator-kubernetes-node-resources-overview.yaml +- ./manifests/persesOperator-kubernetes-persistent-volume-overview.yaml +- ./manifests/persesOperator-kubernetes-pod-networking-overview.yaml +- ./manifests/persesOperator-kubernetes-pod-resources-overview.yaml +- ./manifests/persesOperator-kubernetes-workload-networking-overview.yaml +- ./manifests/persesOperator-kubernetes-workload-ns-networking-overview.yaml +- ./manifests/persesOperator-kubernetes-workload-ns-resources-overview.yaml +- ./manifests/persesOperator-kubernetes-workload-resources-overview.yaml +- ./manifests/persesOperator-leaderElectionRole.yaml +- ./manifests/persesOperator-leaderElectionRoleBinding.yaml +- ./manifests/persesOperator-networkPolicy.yaml +- ./manifests/persesOperator-node-exporter-cluster-use-method.yaml +- ./manifests/persesOperator-node-exporter-nodes.yaml +- ./manifests/persesOperator-perses.yaml +- ./manifests/persesOperator-perses-overview.yaml +- ./manifests/persesOperator-persesDashboardEditorRole.yaml +- ./manifests/persesOperator-persesDashboardViewerRole.yaml +- ./manifests/persesOperator-persesDatasourceEditorRole.yaml +- ./manifests/persesOperator-persesDatasourceViewerRole.yaml +- ./manifests/persesOperator-persesEditorRole.yaml +- ./manifests/persesOperator-persesViewerRole.yaml +- ./manifests/persesOperator-prometheus-overview.yaml +- ./manifests/persesOperator-prometheus-remote-write.yaml +- ./manifests/persesOperator-proxy-overview.yaml +- ./manifests/persesOperator-role.yaml +- ./manifests/persesOperator-roleBinding.yaml +- ./manifests/persesOperator-scheduler-overview.yaml +- ./manifests/persesOperator-serviceAccount.yaml +- ./manifests/persesOperator-serviceMonitor.yaml - ./manifests/prometheus-clusterRole.yaml - ./manifests/prometheus-clusterRoleBinding.yaml - ./manifests/prometheus-networkPolicy.yaml @@ -87,6 +128,9 @@ resources: - ./manifests/prometheusOperator-serviceMonitor.yaml - ./manifests/setup/0alertmanagerConfigCustomResourceDefinition.yaml - ./manifests/setup/0alertmanagerCustomResourceDefinition.yaml +- ./manifests/setup/0persesCustomResourceDefinition.yaml +- ./manifests/setup/0persesdashboardsCustomResourceDefinition.yaml +- ./manifests/setup/0persesdatasourcesCustomResourceDefinition.yaml - ./manifests/setup/0podmonitorCustomResourceDefinition.yaml - ./manifests/setup/0probeCustomResourceDefinition.yaml - ./manifests/setup/0prometheusCustomResourceDefinition.yaml diff --git a/manifests/persesOperator-alertmanager-overview.yaml b/manifests/persesOperator-alertmanager-overview.yaml new file mode 100644 index 0000000000..1db8a6d761 --- /dev/null +++ b/manifests/persesOperator-alertmanager-overview.yaml @@ -0,0 +1,291 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: alertmanager-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: alertmanager-overview + namespace: monitoring +spec: + config: + display: + name: Alertmanager / Overview + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Alerts + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Notifications + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows current alerts in Alertmanager + name: Alerts + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (instance) (alertmanager_alerts{job=~"$job"}) + seriesNameFormat: '{{instance}} - Alertmanager - Alerts' + "0_1": + kind: Panel + spec: + display: + description: Shows alert receive rate in Alertmanager + name: Alerts receive rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (job, instance) (rate(alertmanager_alerts_received_total{job=~"$job"}[$__rate_interval])) + seriesNameFormat: '{{instance}} - Alertmanager - Received' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (job, instance) (rate(alertmanager_alerts_invalid_total{job=~"$job"}[$__rate_interval])) + seriesNameFormat: '{{instance}} - Alertmanager - Invalid' + "1_0": + kind: Panel + spec: + display: + description: Shows notification send rate for the Alertmanager + name: Notifications Send Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (integration, instance) ( + rate(alertmanager_notifications_total{integration=~"$integration",job=~"$job"}[$__rate_interval]) + ) + seriesNameFormat: '{{instance}} - {{integration}} - Total' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (integration, instance) ( + rate(alertmanager_notifications_failed_total{integration=~"$integration",job=~"$job"}[$__rate_interval]) + ) + seriesNameFormat: '{{instance}} - {{integration}} - Failed' + "1_1": + kind: Panel + spec: + display: + description: Shows notification latency for the Alertmanager + name: Notification Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (le, integration, instance) ( + rate( + alertmanager_notification_latency_seconds_bucket{integration=~"$integration",job=~"$job"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} - {{integration}} - 99th Percentile' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.5, + sum by (le, integration, instance) ( + rate( + alertmanager_notification_latency_seconds_bucket{integration=~"$integration",job=~"$job"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} - {{integration}} - Median' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (integration, instance) ( + rate( + alertmanager_notification_latency_seconds_sum{integration=~"$integration",job=~"$job"}[$__rate_interval] + ) + ) + / + sum by (integration, instance) ( + rate( + alertmanager_notification_latency_seconds_count{integration=~"$integration",job=~"$job"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}} - {{integration}} - Average' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: job + name: job + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: job + matchers: + - alertmanager_alerts{} + - kind: ListVariable + spec: + allowAllValue: true + allowMultiple: true + display: + hidden: false + name: integration + name: integration + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: integration + matchers: + - alertmanager_notifications_total{job="$job"} +status: {} diff --git a/manifests/persesOperator-api-server-overview.yaml b/manifests/persesOperator-api-server-overview.yaml new file mode 100644 index 0000000000..2ca87cfb98 --- /dev/null +++ b/manifests/persesOperator-api-server-overview.yaml @@ -0,0 +1,837 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: api-server-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: api-server-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / API server + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Notice + items: + - content: + $ref: '#/spec/panels/0_0' + height: 3 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: All Availability And Error Budget + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: API Server Read + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 6 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 6 + x: 6 + "y": 0 + - content: + $ref: '#/spec/panels/2_2' + height: 8 + width: 6 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/2_3' + height: 8 + width: 6 + x: 18 + "y": 0 + - kind: Grid + spec: + display: + title: API Server Write + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 6 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 6 + x: 6 + "y": 0 + - content: + $ref: '#/spec/panels/3_2' + height: 8 + width: 6 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/3_3' + height: 8 + width: 6 + x: 18 + "y": 0 + - kind: Grid + spec: + display: + title: Work Queue + items: + - content: + $ref: '#/spec/panels/4_0' + height: 8 + width: 8 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 8 + width: 8 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/4_2' + height: 8 + width: 8 + x: 16 + "y": 0 + - kind: Grid + spec: + display: + title: Resource Usage + items: + - content: + $ref: '#/spec/panels/5_0' + height: 10 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/5_1' + height: 10 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/5_2' + height: 10 + width: 12 + x: 0 + "y": 10 + - content: + $ref: '#/spec/panels/5_3' + height: 10 + width: 12 + x: 12 + "y": 10 + panels: + "0_0": + kind: Panel + spec: + display: + name: Notice + plugin: + kind: Markdown + spec: + text: The SLO (service level objective) and other metrics displayed on this dashboard are for informational purposes only. + "1_0": + kind: Panel + spec: + display: + description: How many percent of requests (both read and write) in 30 days have been answered successfully and fast enough? + name: Availability (30d) > 99.000% + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 3 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: apiserver_request:availability30d{cluster=~"$cluster",verb="all"} + "1_1": + kind: Panel + spec: + display: + description: How much error budget is left looking at our 0.990% availability guarantees? + name: ErrorBudget (30d) > 99.000% + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: percent + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: 100 * (apiserver_request:availability30d{cluster=~"$cluster",verb="all"} - 0.99) + seriesNameFormat: errorbudget + "2_0": + kind: Panel + spec: + display: + description: How many percent of read requests (LIST,GET) in 30 days have been answered successfully and fast enough? + name: Read Availability (30d) + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 3 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: apiserver_request:availability30d{cluster=~"$cluster",verb="read"} + "2_1": + kind: Panel + spec: + display: + description: How many read requests (LIST,GET) per second do the apiservers get by code? + name: Read SLI - Requests + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: requests/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (code) (code_resource:apiserver_request_total:rate5m{cluster=~"$cluster",verb="read"}) + seriesNameFormat: '{{ code }}' + "2_2": + kind: Panel + spec: + display: + description: How many percent of read requests (LIST,GET) per second are returned with errors (5xx)? + name: Read SLI - Errors + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: percent + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (resource) ( + code_resource:apiserver_request_total:rate5m{cluster=~"$cluster",code=~"5..",verb="read"} + ) + / + sum by (resource) (code_resource:apiserver_request_total:rate5m{cluster=~"$cluster",verb="read"}) + seriesNameFormat: '{{ resource }}' + "2_3": + kind: Panel + spec: + display: + description: How many seconds is the 99th percentile for reading (LIST|GET) a given resource? + name: Read SLI - Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: cluster_quantile:apiserver_request_sli_duration_seconds:histogram_quantile{cluster=~"$cluster",verb="read"} + seriesNameFormat: '{{ resource }}' + "3_0": + kind: Panel + spec: + display: + description: How many percent of write requests (POST|PUT|PATCH|DELETE) in 30 days have been answered successfully and fast enough? + name: Write Availability (30d) + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 3 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: apiserver_request:availability30d{cluster=~"$cluster",verb="write"} + "3_1": + kind: Panel + spec: + display: + description: How many write requests (POST|PUT|PATCH|DELETE) per second do the apiservers get by code? + name: Write SLI - Requests + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: requests/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (code) (code_resource:apiserver_request_total:rate5m{cluster=~"$cluster",verb="write"}) + seriesNameFormat: '{{ code }}' + "3_2": + kind: Panel + spec: + display: + description: How many percent of write requests (POST|PUT|PATCH|DELETE) per second are returned with errors (5xx)? + name: Write SLI - Errors + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: percent + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (resource) ( + code_resource:apiserver_request_total:rate5m{cluster=~"$cluster",code=~"5..",verb="write"} + ) + / + sum by (resource) (code_resource:apiserver_request_total:rate5m{cluster=~"$cluster",verb="write"}) + seriesNameFormat: '{{ resource }}' + "3_3": + kind: Panel + spec: + display: + description: How many seconds is the 99th percentile for writing (POST|PUT|PATCH|DELETE) a given resource? + name: Write SLI - Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: cluster_quantile:apiserver_request_sli_duration_seconds:histogram_quantile{cluster=~"$cluster",verb="write"} + seriesNameFormat: '{{ resource }}' + "4_0": + kind: Panel + spec: + display: + description: Shows the rate of work queue add events. + name: Work Queue Add Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance, name) ( + rate( + workqueue_adds_total{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}} {{name}}' + "4_1": + kind: Panel + spec: + display: + description: Shows the depth of the work queue. + name: Work Queue Depth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance, name) ( + rate(workqueue_depth{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"}[$__rate_interval]) + ) + seriesNameFormat: '{{instance}} {{name}}' + "4_2": + kind: Panel + spec: + display: + description: Shows the 99th percentile latency of items queued in the work queue + name: Work Queue Latency + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, name, le) ( + rate( + workqueue_queue_duration_seconds_bucket{cluster="$cluster",instance=~"$instance",job="kube-apiserver"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} {{name}}' + "5_0": + kind: Panel + spec: + display: + description: Shows various memory usage metrics of the component. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"} + seriesNameFormat: Alloc All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"} + seriesNameFormat: Alloc Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_alloc_bytes_total{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_stack_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"} + seriesNameFormat: Inuse Stack {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"} + seriesNameFormat: Inuse Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_resident_memory_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"} + seriesNameFormat: Resident Memory {{instance}} + "5_1": + kind: Panel + spec: + display: + description: Shows the CPU usage of the component. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + process_cpu_seconds_total{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"}[$__rate_interval] + ) + seriesNameFormat: '{{instance}}' + "5_2": + kind: Panel + spec: + display: + description: Shows the number of goroutines being used by the component. + name: Goroutines + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_goroutines{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"} + seriesNameFormat: '{{instance}}' + "5_3": + kind: Panel + spec: + display: + description: Shows the Go garbage collection pause durations for the component. + name: GC Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_gc_duration_seconds{cluster=~"$cluster",instance=~"$instance",job="kube-apiserver"} + seriesNameFormat: '{{quantile}} - {{instance}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kube-apiserver"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - up{cluster="$cluster",job="kube-apiserver"} +status: {} diff --git a/manifests/persesOperator-controller-manager-overview.yaml b/manifests/persesOperator-controller-manager-overview.yaml new file mode 100644 index 0000000000..7ce6c787de --- /dev/null +++ b/manifests/persesOperator-controller-manager-overview.yaml @@ -0,0 +1,652 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: controller-manager-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: controller-manager-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Controller Manager + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Controller Manager Status + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Work Queue + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 8 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 8 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/1_2' + height: 8 + width: 8 + x: 16 + "y": 0 + - kind: Grid + spec: + display: + title: Kube API Requests + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 8 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 8 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/2_2' + height: 8 + width: 8 + x: 16 + "y": 0 + - kind: Grid + spec: + display: + title: Resource Usage + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/3_2' + height: 8 + width: 12 + x: 0 + "y": 8 + - content: + $ref: '#/spec/panels/3_3' + height: 8 + width: 12 + x: 12 + "y": 8 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the status of the controller manager. + name: Up + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum(up{cluster="$cluster",job="kube-controller-manager"}) + "1_0": + kind: Panel + spec: + display: + description: Shows the rate of work queue add events. + name: Work Queue Add Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (cluster, instance, name) ( + rate( + workqueue_adds_total{cluster="$cluster",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} {{name}}' + "1_1": + kind: Panel + spec: + display: + description: Shows the depth of the work queue. + name: Work Queue Depth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (cluster, instance, name) ( + rate( + workqueue_depth{cluster="$cluster",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} {{name}}' + "1_2": + kind: Panel + spec: + display: + description: Shows the 99th percentile latency of items queued in the work queue. + name: Work Queue Latency + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (cluster, instance, name, le) ( + rate( + workqueue_queue_duration_seconds_bucket{cluster="$cluster",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} {{name}}' + "2_0": + kind: Panel + spec: + display: + description: Shows the rate of requests to the Kube API. + name: Kube API Request Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: requests/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"2..",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + ) + seriesNameFormat: 2xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"3..",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + ) + seriesNameFormat: 3xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"4..",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + ) + seriesNameFormat: 4xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"5..",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + ) + seriesNameFormat: 5xx + "2_1": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of post requests to the Kube API. + name: Post Request Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (verb, le) ( + rate( + rest_client_request_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager",verb="POST"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{verb}}' + "2_2": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of get requests to the Kube API. + name: Get Request Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (verb, le) ( + rate( + rest_client_request_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager",verb="GET"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{verb}}' + "3_0": + kind: Panel + spec: + display: + description: Shows various memory usage metrics of the component. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"} + seriesNameFormat: Alloc All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"} + seriesNameFormat: Alloc Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_alloc_bytes_total{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_stack_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"} + seriesNameFormat: Inuse Stack {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"} + seriesNameFormat: Inuse Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_resident_memory_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"} + seriesNameFormat: Resident Memory {{instance}} + "3_1": + kind: Panel + spec: + display: + description: Shows the CPU usage of the component. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + process_cpu_seconds_total{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"}[$__rate_interval] + ) + seriesNameFormat: '{{instance}}' + "3_2": + kind: Panel + spec: + display: + description: Shows the number of goroutines being used by the component. + name: Goroutines + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_goroutines{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"} + seriesNameFormat: '{{instance}}' + "3_3": + kind: Panel + spec: + display: + description: Shows the Go garbage collection pause durations for the component. + name: GC Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_gc_duration_seconds{cluster=~"$cluster",instance=~"$instance",job="kube-controller-manager"} + seriesNameFormat: '{{quantile}} - {{instance}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kube-controller-manager"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - up{cluster="$cluster",job="kube-controller-manager"} +status: {} diff --git a/manifests/persesOperator-datasource.yaml b/manifests/persesOperator-datasource.yaml new file mode 100644 index 0000000000..51cc8f2db3 --- /dev/null +++ b/manifests/persesOperator-datasource.yaml @@ -0,0 +1,23 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDatasource +metadata: + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: perses-datasource + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: prometheus-k8s-datasource + namespace: monitoring +spec: + config: + default: true + display: + name: Prometheus k8s Datasource + plugin: + kind: PrometheusDatasource + spec: + proxy: + kind: HTTPProxy + spec: + url: http://prometheus-k8s.monitoring.svc:9090 diff --git a/manifests/persesOperator-deployment.yaml b/manifests/persesOperator-deployment.yaml new file mode 100644 index 0000000000..ce71f953a1 --- /dev/null +++ b/manifests/persesOperator-deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-operator + namespace: monitoring +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - arm64 + - key: kubernetes.io/os + operator: In + values: + - linux + automountServiceAccountToken: false + containers: + - args: + - --leader-elect + image: persesdev/perses-operator:v0.1.10 + imagePullPolicy: Always + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 200m + memory: 200Mi + requests: + cpu: 100m + memory: 100Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + securityContext: + runAsGroup: 65534 + serviceAccountName: perses-operator + terminationGracePeriodSeconds: 10 diff --git a/manifests/persesOperator-etcd-overview.yaml b/manifests/persesOperator-etcd-overview.yaml new file mode 100644 index 0000000000..89d1ee1238 --- /dev/null +++ b/manifests/persesOperator-etcd-overview.yaml @@ -0,0 +1,795 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: etcd-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: etcd-overview + namespace: monitoring +spec: + config: + display: + name: etcd / Overview + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: etcd Status + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: RPC and Streams + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: etcd DB + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: etcd Raft + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: etcd Traffic + items: + - content: + $ref: '#/spec/panels/4_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/4_2' + height: 8 + width: 12 + x: 0 + "y": 8 + - content: + $ref: '#/spec/panels/4_3' + height: 8 + width: 12 + x: 12 + "y": 8 + - kind: Grid + spec: + display: + title: etcd Peer Round Trip Time + items: + - content: + $ref: '#/spec/panels/5_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Resource Usage + items: + - content: + $ref: '#/spec/panels/6_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/6_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/6_2' + height: 8 + width: 12 + x: 0 + "y": 8 + - content: + $ref: '#/spec/panels/6_3' + height: 8 + width: 12 + x: 12 + "y": 8 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the status of etcd. + name: Up + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum(etcd_server_has_leader{cluster="$cluster",job=~".*etcd.*"}) + seriesNameFormat: '{{cluster}} {{namespace}}' + "1_0": + kind: Panel + spec: + display: + description: Shows the rate of gRPC requests. + name: RPC Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate(grpc_server_started_total{cluster="$cluster",grpc_type="unary",job=~".*etcd.*"}[$__rate_interval]) + ) + seriesNameFormat: RPC Rate + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + grpc_server_handled_total{cluster="$cluster",grpc_code=~"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded",grpc_type="unary",job=~".*etcd.*"}[$__rate_interval] + ) + ) + seriesNameFormat: RPC failed Rate + "1_1": + kind: Panel + spec: + display: + description: Shows the number of active streams. + name: Active Streams + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum( + grpc_server_started_total{cluster="$cluster",grpc_service="etcdserverpb.Watch",grpc_type="bidi_stream",job=~".*etcd.*"} + ) + - + sum( + grpc_server_handled_total{cluster="$cluster",grpc_service="etcdserverpb.Watch",grpc_type="bidi_stream"} + ) + seriesNameFormat: Watch Streams + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum( + grpc_server_started_total{cluster="$cluster",grpc_service="etcdserverpb.Lease",grpc_type="bidi_stream",job=~".*etcd.*"} + ) + - + sum( + grpc_server_handled_total{cluster="$cluster",grpc_service="etcdserverpb.Lease",grpc_type="bidi_stream"} + ) + seriesNameFormat: Lease Streams + "2_0": + kind: Panel + spec: + display: + description: Shows the size of the etcd database. + name: DB Size + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: etcd_mvcc_db_total_size_in_bytes{cluster="$cluster",job=~".*etcd.*"} + seriesNameFormat: '{{instance}} DB Size' + "2_1": + kind: Panel + spec: + display: + description: Shows the duration of the etcd disk sync for WAL and DB. + name: Disk Sync Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, le) ( + rate(etcd_disk_wal_fsync_duration_seconds_bucket{cluster="$cluster",job=~".*etcd.*"}[$__rate_interval]) + ) + ) + seriesNameFormat: '{{instance}} WAL fsync' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, le) ( + rate( + etcd_disk_backend_commit_duration_seconds_bucket{cluster="$cluster",job=~".*etcd.*"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} DB fsync' + "3_0": + kind: Panel + spec: + display: + description: Shows the number of times etcd has leader elections in a day. + name: Raft Proposals / Leader Elections in a day + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: changes(etcd_server_leader_changes_seen_total{cluster="$cluster",job=~".*etcd.*"}[1d]) + seriesNameFormat: '{{instance}} total leader elections per day' + "4_0": + kind: Panel + spec: + display: + description: Shows the client traffic into etcd. + name: Client Traffic In + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(etcd_network_client_grpc_received_bytes_total{cluster="$cluster",job=~".*etcd.*"}[$__rate_interval]) + seriesNameFormat: '{{instance}} client traffic in' + "4_1": + kind: Panel + spec: + display: + description: Shows the client traffic out of etcd. + name: Client Traffic Out + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(etcd_network_client_grpc_sent_bytes_total{cluster="$cluster",job=~".*etcd.*"}[$__rate_interval]) + seriesNameFormat: '{{instance}} client traffic out' + "4_2": + kind: Panel + spec: + display: + description: Shows the peer traffic into etcd. + name: Peer Traffic In + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance) ( + rate(etcd_network_peer_received_bytes_total{cluster="$cluster",job=~".*etcd.*"}[$__rate_interval]) + ) + seriesNameFormat: '{{instance}} peer traffic in' + "4_3": + kind: Panel + spec: + display: + description: Shows the peer traffic out of etcd. + name: Peer Traffic Out + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance) ( + rate(etcd_network_peer_sent_bytes_total{cluster="$cluster",job=~".*etcd.*"}[$__rate_interval]) + ) + seriesNameFormat: '{{instance}} peer traffic out' + "5_0": + kind: Panel + spec: + display: + description: Shows the roundtrip time of the peer traffic. + name: Peer Roundtrip Time + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, le) ( + rate( + etcd_network_peer_round_trip_time_seconds_bucket{cluster="$cluster",job=~".*etcd.*"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} peer roundtrip time' + "6_0": + kind: Panel + spec: + display: + description: Shows various memory usage metrics of the component. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_alloc_bytes{cluster=~"$cluster",job=~".*etcd.*"} + seriesNameFormat: Alloc All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_alloc_bytes{cluster=~"$cluster",job=~".*etcd.*"} + seriesNameFormat: Alloc Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(go_memstats_alloc_bytes_total{cluster=~"$cluster",job=~".*etcd.*"}[$__rate_interval]) + seriesNameFormat: Alloc Rate All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(go_memstats_heap_alloc_bytes{cluster=~"$cluster",job=~".*etcd.*"}[$__rate_interval]) + seriesNameFormat: Alloc Rate Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_stack_inuse_bytes{cluster=~"$cluster",job=~".*etcd.*"} + seriesNameFormat: Inuse Stack {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_inuse_bytes{cluster=~"$cluster",job=~".*etcd.*"} + seriesNameFormat: Inuse Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_resident_memory_bytes{cluster=~"$cluster",job=~".*etcd.*"} + seriesNameFormat: Resident Memory {{instance}} + "6_1": + kind: Panel + spec: + display: + description: Shows the CPU usage of the component. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(process_cpu_seconds_total{cluster=~"$cluster",job=~".*etcd.*"}[$__rate_interval]) + seriesNameFormat: '{{instance}}' + "6_2": + kind: Panel + spec: + display: + description: Shows the number of goroutines being used by the component. + name: Goroutines + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_goroutines{cluster=~"$cluster",job=~".*etcd.*"} + seriesNameFormat: '{{instance}}' + "6_3": + kind: Panel + spec: + display: + description: Shows the Go garbage collection pause durations for the component. + name: GC Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_gc_duration_seconds{cluster=~"$cluster",job=~".*etcd.*"} + seriesNameFormat: '{{quantile}} - {{instance}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - etcd_server_has_leader{job=~".*etcd.*"} +status: {} diff --git a/manifests/persesOperator-kubelet-overview.yaml b/manifests/persesOperator-kubelet-overview.yaml new file mode 100644 index 0000000000..5846b5cf31 --- /dev/null +++ b/manifests/persesOperator-kubelet-overview.yaml @@ -0,0 +1,1297 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubelet-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubelet-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Kubelet + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Kubelet Stats + items: + - content: + $ref: '#/spec/panels/0_0' + height: 6 + width: 4 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 6 + width: 4 + x: 4 + "y": 0 + - content: + $ref: '#/spec/panels/0_2' + height: 6 + width: 4 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/0_3' + height: 6 + width: 4 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/0_4' + height: 6 + width: 4 + x: 16 + "y": 0 + - content: + $ref: '#/spec/panels/0_5' + height: 6 + width: 4 + x: 20 + "y": 0 + - kind: Grid + spec: + display: + title: Operation Rate and Errors + items: + - content: + $ref: '#/spec/panels/1_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Operation Duration 99th quantile + items: + - content: + $ref: '#/spec/panels/2_0' + height: 6 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Pod Start Rate and Duration + items: + - content: + $ref: '#/spec/panels/3_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage Operations Rate and Errors + items: + - content: + $ref: '#/spec/panels/4_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage Operation Duration 99th quantile + items: + - content: + $ref: '#/spec/panels/5_0' + height: 6 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Cgroup manager + items: + - content: + $ref: '#/spec/panels/6_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/6_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: PLEG relist + items: + - content: + $ref: '#/spec/panels/7_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/7_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: PLEG relist duration + items: + - content: + $ref: '#/spec/panels/8_0' + height: 6 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: RPC rate + items: + - content: + $ref: '#/spec/panels/9_0' + height: 6 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Request duration 99th quantile + items: + - content: + $ref: '#/spec/panels/10_0' + height: 6 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Resource Usage + items: + - content: + $ref: '#/spec/panels/11_0' + height: 10 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/11_1' + height: 10 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/11_2' + height: 10 + width: 12 + x: 0 + "y": 10 + - content: + $ref: '#/spec/panels/11_3' + height: 10 + width: 12 + x: 12 + "y": 10 + panels: + "0_0": + kind: Panel + spec: + display: + description: Number of Running Kubelets Instances + name: Running Kubelets + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum(kubelet_node_name{cluster=~"$cluster",job="kubelet"}) + "0_1": + kind: Panel + spec: + display: + description: Total Number of Running Pods + name: Running Pods + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum(kubelet_running_pods{cluster=~"$cluster",instance=~"$instance",job="kubelet"}) + "0_2": + kind: Panel + spec: + display: + description: Total Number of Running Containers + name: Running Containers + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum(kubelet_running_containers{cluster=~"$cluster",instance=~"$instance",job="kubelet"}) + "0_3": + kind: Panel + spec: + display: + description: Total Number of Volumes Currently Mounted + name: Actual Volume Count + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + volume_manager_total_volumes{cluster=~"$cluster",instance=~"$instance",job="kubelet",state="actual_state_of_world"} + ) + "0_4": + kind: Panel + spec: + display: + description: Total Number of Desired Volume Mounts + name: Desired Volume Count + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + volume_manager_total_volumes{cluster=~"$cluster",instance=~"$instance",job="kubelet",state="desired_state_of_world"} + ) + "0_5": + kind: Panel + spec: + display: + description: Node Config Error Count Per Second + name: Config Error Count + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate(kubelet_node_config_error{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval]) + ) + "1_0": + kind: Panel + spec: + display: + description: Rate of Container Runtime Operations, grouped by the type of Operation and kubelet instance + name: Operation Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (operation_type, instance) ( + rate( + kubelet_runtime_operations_total{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}} {{operation_type}}' + "1_1": + kind: Panel + spec: + display: + description: Rate of Container Runtime Operations Errors, grouped by the type of Operation and kubelet instance + name: Operation Error Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance, operation_type) ( + rate( + kubelet_runtime_operations_errors_total{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}} {{operation_type}}' + "2_0": + kind: Panel + spec: + display: + description: 99th percentile latency (in seconds) for each runtime operation + name: Operation Duration 99th quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, operation_type, le) ( + rate( + kubelet_runtime_operations_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} {{operation_type}}' + "3_0": + kind: Panel + spec: + display: + description: Rate of Starting Pods and Pod Worker Operations + name: Pod Start Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance) ( + rate( + kubelet_pod_start_duration_seconds_count{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}} pod' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance) ( + rate( + kubelet_pod_worker_duration_seconds_count{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}} worker' + "3_1": + kind: Panel + spec: + display: + description: 99th percentile Duration of Starting Pods and Pod Worker Operations + name: Pod Start Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, le) ( + rate( + kubelet_pod_start_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} pod' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, le) ( + rate( + kubelet_pod_worker_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} worker' + "4_0": + kind: Panel + spec: + display: + description: Rate of Storage Operations + name: Storage Operation Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance, operation_name, volume_plugin) ( + rate( + storage_operation_duration_seconds_count{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}} {{operation_name}} {{volume_plugin}}' + "4_1": + kind: Panel + spec: + display: + description: Rate of Storage Operators Errors + name: Storage Operation Error Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance, operation_name, volume_plugin) ( + rate( + storage_operation_errors_total{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}} {{operation_name}} {{volume_plugin}}' + "5_0": + kind: Panel + spec: + display: + description: 99th percentile Duration of Storage Operations + name: Storage Operation Duration 99th quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, operation_name, volume_plugin, le) ( + rate( + storage_operation_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} {{operation_name}} {{volume_plugin}}' + "6_0": + kind: Panel + spec: + display: + description: Rate of Operations from cgroup manager + name: Cgroup manager operation rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance, operation_type) ( + rate( + kubelet_cgroup_manager_duration_seconds_count{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{operation_type}}' + "6_1": + kind: Panel + spec: + display: + description: 99th percentile Duration of Cgroup manager + name: Cgroup manager 99th quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, operation_type, le) ( + rate( + kubelet_cgroup_manager_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} {{operation_type}}' + "7_0": + kind: Panel + spec: + display: + description: Rate of PLEG performed operation + name: PLEG relist rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance) ( + rate( + kubelet_pleg_relist_duration_seconds_count{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}}' + "7_1": + kind: Panel + spec: + display: + description: 99th percentile time interval between PLEG relist cycles + name: PLEG relist interval + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, le) ( + rate( + kubelet_pleg_relist_interval_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}}' + "8_0": + kind: Panel + spec: + display: + description: 99th percentile of PLEG duration of relist operations + name: PLEG relist duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, le) ( + rate( + kubelet_pleg_relist_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}}' + "9_0": + kind: Panel + spec: + display: + description: Total number of HTTP requests made by the Kubelet, by status code + name: RPC rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"2..",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: 2xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"3..",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: 3xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"4..",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: 4xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"5..",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + seriesNameFormat: 5xx + "10_0": + kind: Panel + spec: + display: + description: 99th percentile of Request duration + name: Request duration 99th quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, verb, le) ( + rate( + rest_client_request_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}} {{verb}}' + "11_0": + kind: Panel + spec: + display: + description: Shows various memory usage metrics of the component. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kubelet"} + seriesNameFormat: Alloc All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kubelet"} + seriesNameFormat: Alloc Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_alloc_bytes_total{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_stack_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kubelet"} + seriesNameFormat: Inuse Stack {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kubelet"} + seriesNameFormat: Inuse Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_resident_memory_bytes{cluster=~"$cluster",instance=~"$instance",job="kubelet"} + seriesNameFormat: Resident Memory {{instance}} + "11_1": + kind: Panel + spec: + display: + description: Shows the CPU usage of the component. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(process_cpu_seconds_total{cluster=~"$cluster",instance=~"$instance",job="kubelet"}[$__rate_interval]) + seriesNameFormat: '{{instance}}' + "11_2": + kind: Panel + spec: + display: + description: Shows the number of goroutines being used by the component. + name: Goroutines + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_goroutines{cluster=~"$cluster",instance=~"$instance",job="kubelet"} + seriesNameFormat: '{{instance}}' + "11_3": + kind: Panel + spec: + display: + description: Shows the Go garbage collection pause durations for the component. + name: GC Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_gc_duration_seconds{cluster=~"$cluster",instance=~"$instance",job="kubelet"} + seriesNameFormat: '{{quantile}} - {{instance}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - up{cluster="$cluster",job="kubelet"} +status: {} diff --git a/manifests/persesOperator-kubernetes-cluster-networking-overview.yaml b/manifests/persesOperator-kubernetes-cluster-networking-overview.yaml new file mode 100644 index 0000000000..02b58f7ace --- /dev/null +++ b/manifests/persesOperator-kubernetes-cluster-networking-overview.yaml @@ -0,0 +1,826 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-cluster-networking-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-cluster-networking-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Networking / Cluster + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Current Rate of Bytes + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Current Status + items: + - content: + $ref: '#/spec/panels/1_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Average Rate of Bytes + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/4_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/5_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/5_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: TCP Retransmit Rate + items: + - content: + $ref: '#/spec/panels/6_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/6_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the rate of bytes received by namespace in a cluster. + name: Current Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "0_1": + kind: Panel + spec: + display: + description: Shows the rate of bytes transmitted by namespace in a cluster. + name: Current Rate of Bytes Transmitted + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "1_0": + kind: Panel + spec: + display: + description: Shows the current network status of the cluster by namespace. + name: Current Status + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Namespace + name: namespace + - align: right + header: Rx Bytes + name: 'value #1' + - align: right + header: Tx Bytes + name: 'value #2' + - align: right + header: Rx Bytes (Avg) + name: 'value #3' + - align: right + header: Tx Bytes (Avg) + name: 'value #4' + - align: right + header: Rx Packets + name: 'value #5' + - align: right + header: Tx Packets + name: 'value #6' + - align: right + header: Rx Packets Dropped + name: 'value #7' + - align: right + header: Tx Packets Dropped + name: 'value #8' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + avg by (namespace) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + avg by (namespace) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_receive_packets_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_transmit_packets_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_receive_packets_dropped_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_transmit_packets_dropped_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + "2_0": + kind: Panel + spec: + display: + description: Shows the average rate of bytes received by namespace in a cluster. + name: Average Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + avg by (namespace) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "2_1": + kind: Panel + spec: + display: + description: Shows the average rate of bytes transmitted by namespace in a cluster. + name: Average Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + avg by (namespace) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "3_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the cluster highlighting top pods. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "3_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the cluster highlighting top pods. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "4_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by namespace in a cluster. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_receive_packets_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "4_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by namespace in a cluster. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_transmit_packets_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "5_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by namespace in a cluster. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_receive_packets_dropped_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "5_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by namespace in a cluster. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate(container_network_transmit_packets_dropped_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{namespace}}' + "6_0": + kind: Panel + spec: + display: + description: Shows the rate of TCP retransmits out of all sent segments in a cluster. + name: Rate of TCP Retransmits out of all sent segments + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: percent + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance) ( + rate(node_netstat_Tcp_RetransSegs{cluster="$cluster"}[$__rate_interval]) + / + rate(node_netstat_Tcp_OutSegs{cluster="$cluster"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{instance}}' + "6_1": + kind: Panel + spec: + display: + description: Shows the rate of TCP SYN retransmits out of all sent segments in a cluster. + name: Rate of TCP SYN Retransmits out of all sent segments + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: percent + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (instance) ( + rate(node_netstat_TcpExt_TCPSynRetrans{cluster="$cluster"}[$__rate_interval]) + / + rate(node_netstat_Tcp_RetransSegs{cluster="$cluster"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{instance}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} +status: {} diff --git a/manifests/persesOperator-kubernetes-cluster-resources-overview.yaml b/manifests/persesOperator-kubernetes-cluster-resources-overview.yaml new file mode 100644 index 0000000000..dd78fb3017 --- /dev/null +++ b/manifests/persesOperator-kubernetes-cluster-resources-overview.yaml @@ -0,0 +1,1331 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-cluster-resources-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-cluster-resources-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Compute Resources / Cluster + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Cluster Stats + items: + - content: + $ref: '#/spec/panels/0_0' + height: 4 + width: 4 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 4 + width: 4 + x: 4 + "y": 0 + - content: + $ref: '#/spec/panels/0_2' + height: 4 + width: 4 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/0_3' + height: 4 + width: 4 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/0_4' + height: 4 + width: 4 + x: 16 + "y": 0 + - content: + $ref: '#/spec/panels/0_5' + height: 4 + width: 4 + x: 20 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Usage + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Usage Quota + items: + - content: + $ref: '#/spec/panels/2_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage Quota + items: + - content: + $ref: '#/spec/panels/4_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Network Usage + items: + - content: + $ref: '#/spec/panels/5_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/6_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/6_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Average Container Bandwidth + items: + - content: + $ref: '#/spec/panels/7_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/7_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/8_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/8_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/9_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/9_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage IO + items: + - content: + $ref: '#/spec/panels/10_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/10_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage IO - Distribution + items: + - content: + $ref: '#/spec/panels/11_0' + height: 10 + width: 24 + x: 0 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the CPU utilization of the cluster. + name: CPU Utilization + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: cluster:node_cpu:ratio_rate5m{cluster="$cluster"} + "0_1": + kind: Panel + spec: + display: + description: Shows the CPU requests commitment of the cluster. + name: CPU Requests Commitment + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster="$cluster"}) + / + sum(kube_node_status_allocatable{cluster="$cluster",job="kube-state-metrics",resource="cpu"}) + "0_2": + kind: Panel + spec: + display: + description: Shows the CPU limits commitment of the cluster. + name: CPU Limits Commitment + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster="$cluster"}) + / + sum(kube_node_status_allocatable{cluster="$cluster",job="kube-state-metrics",resource="cpu"}) + "0_3": + kind: Panel + spec: + display: + description: Shows the Memory utilization of the cluster. + name: Memory Utilization + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + 1 + - + sum(:node_memory_MemAvailable_bytes:sum{cluster="$cluster"}) + / + sum(node_memory_MemTotal_bytes{cluster="$cluster",job="node-exporter"}) + "0_4": + kind: Panel + spec: + display: + description: Shows the Memory requests commitment of the cluster. + name: Memory Requests Commitment + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster="$cluster"}) + / + sum(kube_node_status_allocatable{cluster="$cluster",job="kube-state-metrics",resource="memory"}) + "0_5": + kind: Panel + spec: + display: + description: Shows the Memory limits commitment of the cluster. + name: Memory Limits Commitment + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster="$cluster"}) + / + sum(kube_node_status_allocatable{cluster="$cluster",job="kube-state-metrics",resource="memory"}) + "1_0": + kind: Panel + spec: + display: + description: Shows the CPU usage of the cluster by namespace. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster"} + ) + seriesNameFormat: '{{namespace}}' + "2_0": + kind: Panel + spec: + display: + description: Shows the CPU requests, limits, and usage of workloads by namespace in tabular format. + name: CPU Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Namespace + name: namespace + - align: right + header: Pods + name: 'value #1' + - align: right + header: Workloads + name: 'value #2' + - align: right + header: CPU Usage + name: 'value #3' + - align: right + header: CPU Requests + name: 'value #4' + - align: right + header: CPU Requests % + name: 'value #5' + - align: right + header: CPU Limits + name: 'value #6' + - align: right + header: CPU Limits % + name: 'value #7' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (namespace) (kube_pod_owner{cluster="$cluster",job="kube-state-metrics"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + count by (namespace) ( + avg by (workload, namespace) (namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster"}) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (namespace) (namespace_cpu:kube_pod_container_resource_requests:sum{cluster="$cluster"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (namespace) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster"} + ) + / + sum by (namespace) (namespace_cpu:kube_pod_container_resource_requests:sum{cluster="$cluster"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (namespace) (namespace_cpu:kube_pod_container_resource_limits:sum{cluster="$cluster"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (namespace) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster"} + ) + / + sum by (namespace) (namespace_cpu:kube_pod_container_resource_limits:sum{cluster="$cluster"}) + "3_0": + kind: Panel + spec: + display: + description: Shows the memory usage of the cluster by namespace. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (namespace) (container_memory_rss{cluster="$cluster",container!="",job="cadvisor"}) + seriesNameFormat: '{{namespace}}' + "4_0": + kind: Panel + spec: + display: + description: Shows the memory requests, limits, and usage of workloads by namespace in tabular format. + name: Memory Requests by Namespace + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Namespace + name: namespace + - align: right + header: Pods + name: 'value #1' + - align: right + header: Workloads + name: 'value #2' + - align: right + header: Memory Usage + name: 'value #3' + - align: right + header: Memory Requests + name: 'value #4' + - align: right + header: Memory Requests % + name: 'value #5' + - align: right + header: Memory Limits + name: 'value #6' + - align: right + header: Memory Limits % + name: 'value #7' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (namespace) (kube_pod_owner{cluster="$cluster",job="kube-state-metrics"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + count by (namespace) ( + avg by (workload, namespace) (namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster"}) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (namespace) (container_memory_rss{cluster="$cluster",container!="",job="cadvisor"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (namespace) (namespace_memory:kube_pod_container_resource_requests:sum{cluster="$cluster"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (namespace) (container_memory_rss{cluster="$cluster",container!="",job="cadvisor"}) + / + sum by (namespace) (namespace_memory:kube_pod_container_resource_requests:sum{cluster="$cluster"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (namespace) (namespace_memory:kube_pod_container_resource_limits:sum{cluster="$cluster"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (namespace) (container_memory_rss{cluster="$cluster",container!="",job="cadvisor"}) + / + sum by (namespace) (namespace_memory:kube_pod_container_resource_limits:sum{cluster="$cluster"}) + "5_0": + kind: Panel + spec: + display: + description: Shows the current network usage of the cluster by namespace. + name: Current Network Usage + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Namespace + name: namespace + - align: right + header: Current Receive Bandwidth + name: 'value #1' + - align: right + header: Current Transmit Bandwidth + name: 'value #2' + - align: right + header: Rate of Received Packets + name: 'value #3' + - align: right + header: Rate of Transmitted Packets + name: 'value #4' + - align: right + header: Rate of Received Packets Dropped + name: 'value #5' + - align: right + header: Rate of Transmitted Packets Dropped + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + "6_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the cluster by namespace. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "6_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the cluster by namespace. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "7_0": + kind: Panel + spec: + display: + description: Shows the average network bandwidth received in container by namespace. + name: 'Average Container Bandwidth by Namespace: Received' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + avg by (namespace) ( + irate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "7_1": + kind: Panel + spec: + display: + description: Shows the average network bandwidth transmitted in container by namespace. + name: 'Average Container Bandwidth by Namespace: Transmitted' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + avg by (namespace) ( + irate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "8_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by namespace. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + irate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "8_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by namespace. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + irate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "9_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by namespace. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + irate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "9_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by namespace. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + irate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace=~".+"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "10_0": + kind: Panel + spec: + display: + description: Shows IOPS(Reads+Writes) by namespace. + name: IOPS(Reads+Writes) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ceil( + sum by (namespace) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + + + rate( + container_fs_writes_total{cluster="$cluster",container!="",job="cadvisor",namespace!=""}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{namespace}}' + "10_1": + kind: Panel + spec: + display: + description: Shows Throughput(Read+Write) by namespace. + name: ThroughPut(Read+Write) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + + + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",job="cadvisor",namespace!=""}[$__rate_interval] + ) + ) + seriesNameFormat: '{{namespace}}' + "11_0": + kind: Panel + spec: + display: + description: Shows the current storage IO of the cluster in tabular form, by namespace. + name: Current Storage IO + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Namespace + name: namespace + - align: right + header: IOPS(Reads) + name: 'value #1' + - align: right + header: IOPS(Writes) + name: 'value #2' + - align: right + header: IOPS(Reads + Writes) + name: 'value #3' + - align: right + header: Throughput(Reads) + name: 'value #4' + - align: right + header: Throughput(Writes) + name: 'value #5' + - align: right + header: Throughput(Reads + Writes) + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_fs_writes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + + + rate( + container_fs_writes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (namespace) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + + + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace!=""}[$__rate_interval] + ) + ) + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} +status: {} diff --git a/manifests/persesOperator-kubernetes-multi-cluster-resources-overview.yaml b/manifests/persesOperator-kubernetes-multi-cluster-resources-overview.yaml new file mode 100644 index 0000000000..be8bab4480 --- /dev/null +++ b/manifests/persesOperator-kubernetes-multi-cluster-resources-overview.yaml @@ -0,0 +1,498 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-multi-cluster-resources-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-multi-cluster-resources-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Compute Resources / Multi-Cluster + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Multi-Cluster Stats + items: + - content: + $ref: '#/spec/panels/0_0' + height: 4 + width: 4 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 4 + width: 4 + x: 4 + "y": 0 + - content: + $ref: '#/spec/panels/0_2' + height: 4 + width: 4 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/0_3' + height: 4 + width: 4 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/0_4' + height: 4 + width: 4 + x: 16 + "y": 0 + - content: + $ref: '#/spec/panels/0_5' + height: 4 + width: 4 + x: 20 + "y": 0 + - kind: Grid + spec: + display: + title: Multi-Cluster CPU Usage + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Multi-Cluster CPU Usage Quota + items: + - content: + $ref: '#/spec/panels/2_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Multi-Cluster Memory Usage + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Multi-Cluster Memory Usage Quota + items: + - content: + $ref: '#/spec/panels/4_0' + height: 10 + width: 24 + x: 0 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the CPU utilization of all clusters. + name: CPU Utilization + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum(cluster:node_cpu:ratio_rate5m) / count(cluster:node_cpu:ratio_rate5m) + "0_1": + kind: Panel + spec: + display: + description: Shows the CPU requests commitment of all clusters. + name: CPU Requests Commitment + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum(kube_pod_container_resource_requests{job="kube-state-metrics",resource="cpu"}) + / + sum(kube_node_status_allocatable{job="kube-state-metrics",resource="cpu"}) + "0_2": + kind: Panel + spec: + display: + description: Shows the CPU limits commitment of all clusters. + name: CPU Limits Commitment + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum(kube_pod_container_resource_limits{job="kube-state-metrics",resource="cpu"}) + / + sum(kube_node_status_allocatable{job="kube-state-metrics",resource="cpu"}) + "0_3": + kind: Panel + spec: + display: + description: Shows the Memory utilization of all clusters. + name: Memory Utilization + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: 1 - sum(:node_memory_MemAvailable_bytes:sum) / sum(node_memory_MemTotal_bytes{job="node-exporter"}) + "0_4": + kind: Panel + spec: + display: + description: Shows the Memory requests commitment of all clusters. + name: Memory Requests Commitment + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum(kube_pod_container_resource_requests{job="kube-state-metrics",resource="memory"}) + / + sum(kube_node_status_allocatable{job="kube-state-metrics",resource="memory"}) + "0_5": + kind: Panel + spec: + display: + description: Shows the Memory limits commitment of all clusters. + name: Memory Limits Commitment + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum(kube_pod_container_resource_limits{job="kube-state-metrics",resource="memory"}) + / + sum(kube_node_status_allocatable{job="kube-state-metrics",resource="memory"}) + "1_0": + kind: Panel + spec: + display: + description: Shows the CPU usage of each cluster. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (cluster) (node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m) + seriesNameFormat: '{{cluster}}' + "2_0": + kind: Panel + spec: + display: + description: Shows the CPU requests, limits, and usage of clusters in tabular format. + name: CPU Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Cluster + name: cluster + - align: right + header: CPU Usage + name: 'value #1' + - align: right + header: CPU Requests + name: 'value #2' + - align: right + header: CPU Requests % + name: 'value #3' + - align: right + header: CPU Limits + name: 'value #4' + - align: right + header: CPU Limits % + name: 'value #5' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (cluster) (node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (cluster) (kube_pod_container_resource_requests{job="kube-state-metrics",resource="cpu"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (cluster) (node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m) + / + sum by (cluster) (kube_pod_container_resource_requests{job="kube-state-metrics",resource="cpu"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (cluster) (kube_pod_container_resource_limits{job="kube-state-metrics",resource="cpu"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (cluster) (node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m) + / + sum by (cluster) (kube_pod_container_resource_limits{job="kube-state-metrics",resource="cpu"}) + "3_0": + kind: Panel + spec: + display: + description: Shows memory usage w/o cache, for each cluster. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (cluster) (container_memory_rss{container!="",job="cadvisor"}) + seriesNameFormat: '{{cluster}}' + "4_0": + kind: Panel + spec: + display: + description: Shows the memory requests, limits, and usage of clusters in tabular format. + name: Memory Requests by Cluster + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Cluster + name: cluster + - align: right + header: Memory Usage + name: 'value #1' + - align: right + header: Memory Requests + name: 'value #2' + - align: right + header: Memory Requests % + name: 'value #3' + - align: right + header: Memory Limits + name: 'value #4' + - align: right + header: Memory Limits % + name: 'value #5' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (cluster) (container_memory_rss{container!="",job="cadvisor"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (cluster) (kube_pod_container_resource_requests{job="kube-state-metrics",resource="memory"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (cluster) (container_memory_rss{container!="",job="cadvisor"}) + / + sum by (cluster) (kube_pod_container_resource_requests{job="kube-state-metrics",resource="memory"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (cluster) (kube_pod_container_resource_limits{job="kube-state-metrics",resource="memory"}) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (cluster) (container_memory_rss{container!="",job="cadvisor"}) + / + sum by (cluster) (kube_pod_container_resource_limits{job="kube-state-metrics",resource="memory"}) + variables: [] +status: {} diff --git a/manifests/persesOperator-kubernetes-namespace-networking-overview.yaml b/manifests/persesOperator-kubernetes-namespace-networking-overview.yaml new file mode 100644 index 0000000000..596fd7296d --- /dev/null +++ b/manifests/persesOperator-kubernetes-namespace-networking-overview.yaml @@ -0,0 +1,587 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-namespace-networking-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-namespace-networking-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Networking / Namespace (Pods) + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Current Rate of Bytes + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Network Usage + items: + - content: + $ref: '#/spec/panels/1_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/4_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the rate of bytes received by top pods in a namespace in a cluster. + name: Current Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace=~"$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{pod}}' + "0_1": + kind: Panel + spec: + display: + description: Shows the rate of bytes transmitted by top pods in a namespace in a cluster. + name: Current Rate of Bytes Transmitted + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace=~"$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{pod}}' + "1_0": + kind: Panel + spec: + display: + description: Shows the current network usage of the namespace by pods. + name: Current Network Usage + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: Current Receive Bandwidth + name: 'value #1' + - align: right + header: Current Transmit Bandwidth + name: 'value #2' + - align: right + header: Rate of Received Packets + name: 'value #3' + - align: right + header: Rate of Transmitted Packets + name: 'value #4' + - align: right + header: Rate of Received Packets Dropped + name: 'value #5' + - align: right + header: Rate of Transmitted Packets Dropped + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + "2_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the namespace by pod highlighting top pods. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace=~"$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{pod}}' + "2_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the namespace by pod highlighting top pods. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace=~"$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{pod}}' + "3_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by pods in a namespace in a cluster. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate(container_network_receive_packets_total{cluster="$cluster",namespace=~"$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{pod}}' + "3_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by pods in a namespace in a cluster. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",namespace=~"$namespace"}[$__rate_interval] + ) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{pod}}' + "4_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by pods in a namespace in a cluster. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate(container_network_receive_packets_dropped_total{cluster="$cluster",namespace!=""}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{pod}}' + "4_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by pods in a namespace in a cluster. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",namespace=~"$namespace"}[$__rate_interval] + ) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + ) + seriesNameFormat: '{{pod}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - container_network_receive_packets_total{cluster="$cluster"} +status: {} diff --git a/manifests/persesOperator-kubernetes-namespace-resources-overview.yaml b/manifests/persesOperator-kubernetes-namespace-resources-overview.yaml new file mode 100644 index 0000000000..1ea9939d25 --- /dev/null +++ b/manifests/persesOperator-kubernetes-namespace-resources-overview.yaml @@ -0,0 +1,1279 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-namespace-resources-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-namespace-resources-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Compute Resources / Namespace (Pods) + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Namespace Stats + items: + - content: + $ref: '#/spec/panels/0_0' + height: 4 + width: 6 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 4 + width: 6 + x: 6 + "y": 0 + - content: + $ref: '#/spec/panels/0_2' + height: 4 + width: 6 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/0_3' + height: 4 + width: 6 + x: 18 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Usage + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Usage Quota + items: + - content: + $ref: '#/spec/panels/2_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage Quota + items: + - content: + $ref: '#/spec/panels/4_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Network Usage + items: + - content: + $ref: '#/spec/panels/5_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/6_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/6_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/7_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/7_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/8_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/8_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage IO + items: + - content: + $ref: '#/spec/panels/9_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/9_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage IO - Distribution + items: + - content: + $ref: '#/spec/panels/10_0' + height: 10 + width: 24 + x: 0 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the CPU utilization of the namespace from pod CPU requests. + name: CPU Utilization (from requests) + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + ) + / + sum( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + ) + "0_1": + kind: Panel + spec: + display: + description: Shows the CPU utilization of the namespace from pod CPU limits. + name: CPU Utilization (from limits) + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + ) + / + sum( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + ) + "0_2": + kind: Panel + spec: + display: + description: Shows the Memory utilization of the namespace from pod memory requests. + name: Memory Utilization (from requests) + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + ) + / + sum( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + ) + "0_3": + kind: Panel + spec: + display: + description: Shows the Memory utilization of the namespace from pod memory limits. + name: Memory Utilization (from limits) + plugin: + kind: StatChart + spec: + calculation: last + format: + decimalPlaces: 2 + unit: percent + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + ) + / + sum( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + ) + "1_0": + kind: Panel + spec: + display: + description: Shows the CPU usage of the namespace by pod, and the CPU resource quota of the namespace. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + ) + seriesNameFormat: '{{pod}}' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + scalar( + max( + kube_resourcequota{cluster="$cluster",namespace="$namespace",resource="requests.cpu",type="hard"} + ) + ) + seriesNameFormat: quota - requests + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + scalar( + max(kube_resourcequota{cluster="$cluster",namespace="$namespace",resource="limits.cpu",type="hard"}) + ) + seriesNameFormat: quota - limits + "2_0": + kind: Panel + spec: + display: + description: Shows the CPU requests, limits, and usage of pods in a namespace in tabular format. + name: CPU Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: CPU Usage + name: 'value #1' + - align: right + header: CPU Requests + name: 'value #2' + - align: right + header: CPU Requests % + name: 'value #3' + - align: right + header: CPU Limits + name: 'value #4' + - align: right + header: CPU Limits % + name: 'value #5' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster="$cluster",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + ) + / + sum by (pod) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster="$cluster",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster="$cluster",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + ) + / + sum by (pod) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster="$cluster",namespace="$namespace"} + ) + "3_0": + kind: Panel + spec: + display: + description: Shows the memory usage of the namespace by pod, and the memory resource quota of the namespace. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + ) + seriesNameFormat: '{{pod}}' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + scalar( + max( + kube_resourcequota{cluster="$cluster",namespace="$namespace",resource="requests.memory",type="hard"} + ) + ) + seriesNameFormat: quota - requests + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + scalar( + max( + kube_resourcequota{cluster="$cluster",namespace="$namespace",resource="limits.memory",type="hard"} + ) + ) + seriesNameFormat: quota - limits + "4_0": + kind: Panel + spec: + display: + description: Shows the memory requests, limits, and usage of pods in a namespace in tabular format. + name: Memory Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: Memory Usage + name: 'value #1' + - align: right + header: Memory Requests + name: 'value #2' + - align: right + header: Memory Requests % + name: 'value #3' + - align: right + header: Memory Limits + name: 'value #4' + - align: right + header: Memory Limits % + name: 'value #5' + - align: right + header: Memory Usage (RSS) + name: 'value #6' + - align: right + header: Memory Usage (Cache) + name: 'value #7' + - align: right + header: Memory Usage (Swap) + name: 'value #8' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster="$cluster",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + ) + / + sum by (pod) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster="$cluster",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster="$cluster",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + ) + / + sum by (pod) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster="$cluster",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + container_memory_rss{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + container_memory_cache{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + container_memory_swap{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace"} + ) + "5_0": + kind: Panel + spec: + display: + description: Shows the current network usage of the namespace by pods. + name: Current Network Usage + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: Current Receive Bandwidth + name: 'value #1' + - align: right + header: Current Transmit Bandwidth + name: 'value #2' + - align: right + header: Rate of Received Packets + name: 'value #3' + - align: right + header: Rate of Transmitted Packets + name: 'value #4' + - align: right + header: Rate of Received Packets Dropped + name: 'value #5' + - align: right + header: Rate of Transmitted Packets Dropped + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + "6_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the namespace by pod. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + ) + seriesNameFormat: '{{pod}}' + "6_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the namespace by pod. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + ) + seriesNameFormat: '{{pod}}' + "7_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by pods in a namespace. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + irate(container_network_receive_packets_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + ) + seriesNameFormat: '{{pod}}' + "7_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by pods in a namespace. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + irate( + container_network_transmit_packets_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "8_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by pods in a namespace. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + irate( + container_network_receive_packets_dropped_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "8_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by pods in a namespace. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + irate( + container_network_transmit_packets_dropped_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "9_0": + kind: Panel + spec: + display: + description: Shows IOPS(Reads+Writes) by pods in a namespace. + name: IOPS(Reads+Writes) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ceil( + sum by (pod) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",namespace="$namespace"}[$__rate_interval] + ) + + + rate( + container_fs_writes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",namespace="$namespace"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{pod}}' + "9_1": + kind: Panel + spec: + display: + description: Shows Throughput(Read+Write) by pods in a namespace. + name: ThroughPut(Read+Write) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",namespace="$namespace"}[$__rate_interval] + ) + + + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",namespace="$namespace"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "10_0": + kind: Panel + spec: + display: + description: Shows the current storage IO of the namespace in tabular form, by pod. + name: Current Storage IO + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: IOPS(Reads) + name: 'value #1' + - align: right + header: IOPS(Writes) + name: 'value #2' + - align: right + header: IOPS(Reads + Writes) + name: 'value #3' + - align: right + header: Throughput(Reads) + name: 'value #4' + - align: right + header: Throughput(Writes) + name: 'value #5' + - align: right + header: Throughput(Reads + Writes) + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_writes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + + + rate( + container_fs_writes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + + + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + ) + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - kube_namespace_status_phase{cluster="$cluster",job="kube-state-metrics"} +status: {} diff --git a/manifests/persesOperator-kubernetes-node-resources-overview.yaml b/manifests/persesOperator-kubernetes-node-resources-overview.yaml new file mode 100644 index 0000000000..6b951eba84 --- /dev/null +++ b/manifests/persesOperator-kubernetes-node-resources-overview.yaml @@ -0,0 +1,506 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-node-resources-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-node-resources-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Compute Resources / Node (Pods) + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: CPU Usage + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Quota + items: + - content: + $ref: '#/spec/panels/1_0' + height: 12 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage with Cache + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage without Cache + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Quota + items: + - content: + $ref: '#/spec/panels/4_0' + height: 12 + width: 24 + x: 0 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the CPU usage of the node by pod, and the CPU capacity of the node. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + kube_node_status_capacity{cluster="$cluster",job="kube-state-metrics",node=~"$node",resource="cpu"} + ) + seriesNameFormat: max capacity + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",node=~"$node"} + ) + seriesNameFormat: '{{pod}}' + "1_0": + kind: Panel + spec: + display: + description: Shows the CPU requests, limits, and usage of pods on the node in tabular format. + name: CPU Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: CPU Usage + name: 'value #1' + - align: right + header: CPU Requests + name: 'value #2' + - align: right + header: CPU Requests % + name: 'value #3' + - align: right + header: CPU Limits + name: 'value #4' + - align: right + header: CPU Limits % + name: 'value #5' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster="$cluster",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",node=~"$node"} + ) + / + sum by (pod) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster="$cluster",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster="$cluster",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",node=~"$node"} + ) + / + sum by (pod) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster="$cluster",node=~"$node"} + ) + "2_0": + kind: Panel + spec: + display: + description: Shows the memory usage of the node by pod, and the memory capacity of the node. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + kube_node_status_capacity{cluster="$cluster",job="kube-state-metrics",node=~"$node",resource="memory"} + ) + seriesNameFormat: max capacity + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_memory_working_set_bytes{cluster="$cluster",container!="",node=~"$node"} + ) + seriesNameFormat: '{{pod}}' + "3_0": + kind: Panel + spec: + display: + description: Shows the memory usage (RSS) of the node by pod, and the memory capacity of the node. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + kube_node_status_capacity{cluster="$cluster",job="kube-state-metrics",node=~"$node",resource="memory"} + ) + seriesNameFormat: max capacity + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_memory_rss{cluster="$cluster",container!="",node=~"$node"} + ) + seriesNameFormat: '{{pod}}' + "4_0": + kind: Panel + spec: + display: + description: Shows the Memory requests, limits, and usage of pods on the node in tabular format. + name: Memory Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: Memory Usage + name: 'value #1' + - align: right + header: Memory Requests + name: 'value #2' + - align: right + header: Memory Requests % + name: 'value #3' + - align: right + header: Memory Limits + name: 'value #4' + - align: right + header: Memory Limits % + name: 'value #5' + - align: right + header: Memory Usage (RSS) + name: 'value #6' + - align: right + header: Memory Usage (Cache) + name: 'value #7' + - align: right + header: Memory Usage (Swap) + name: 'value #8' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_memory_working_set_bytes{cluster="$cluster",container!="",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster="$cluster",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + node_namespace_pod_container:container_memory_working_set_bytes{cluster="$cluster",container!="",node=~"$node"} + ) + / + sum by (pod) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster="$cluster",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster="$cluster",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + node_namespace_pod_container:container_memory_working_set_bytes{cluster="$cluster",container!="",node=~"$node"} + ) + / + sum by (pod) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster="$cluster",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_memory_rss{cluster="$cluster",container!="",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_memory_cache{cluster="$cluster",container!="",node=~"$node"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_memory_swap{cluster="$cluster",container!="",node=~"$node"} + ) + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: node + name: node + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: node + matchers: + - kube_pod_info{cluster="$cluster"} +status: {} diff --git a/manifests/persesOperator-kubernetes-persistent-volume-overview.yaml b/manifests/persesOperator-kubernetes-persistent-volume-overview.yaml new file mode 100644 index 0000000000..f52a96d81e --- /dev/null +++ b/manifests/persesOperator-kubernetes-persistent-volume-overview.yaml @@ -0,0 +1,345 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-persistent-volume-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-persistent-volume-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Persistent Volume + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Volume Space Usage + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Volume Inodes Usage + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the space usage of persistent volume in a namespace by a PV claim. + name: Volume Space Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum without (instance, node) ( + topk( + 1, + ( + kubelet_volume_stats_capacity_bytes{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + ) + ) + - + sum without (instance, node) ( + topk( + 1, + ( + kubelet_volume_stats_available_bytes{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + ) + ) + ) + seriesNameFormat: Used Space + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum without (instance, node) ( + topk( + 1, + ( + kubelet_volume_stats_available_bytes{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + ) + ) + seriesNameFormat: Free Space + "0_1": + kind: Panel + spec: + display: + description: Shows the space usage of persistent volume in a namespace by a PV claim. + name: Volume Space Usage + plugin: + kind: GaugeChart + spec: + calculation: last + format: + unit: percent + thresholds: + defaultColor: green + mode: absolute + steps: + - color: green + value: 0 + - color: orange + value: 80 + - color: red + value: 90 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + max without (instance, node) ( + ( + topk( + 1, + kubelet_volume_stats_capacity_bytes{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + - + topk( + 1, + kubelet_volume_stats_available_bytes{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + ) + / + topk( + 1, + kubelet_volume_stats_capacity_bytes{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + * + 100 + ) + "1_0": + kind: Panel + spec: + display: + description: Shows the inodes usage of persistent volume in a namespace by a PV claim. + name: Volume inodes Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum without (instance, node) ( + topk( + 1, + ( + kubelet_volume_stats_inodes_used{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + ) + ) + seriesNameFormat: Used inodes + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum without (instance, node) ( + topk( + 1, + ( + kubelet_volume_stats_inodes{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + ) + ) + - + sum without (instance, node) ( + topk( + 1, + ( + kubelet_volume_stats_inodes_used{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + ) + ) + ) + seriesNameFormat: Free inodes + "1_1": + kind: Panel + spec: + display: + description: Shows the inodes usage of persistent volume in a namespace by a PV claim. + name: Volume inodes Usage + plugin: + kind: GaugeChart + spec: + calculation: last + format: + unit: percent + thresholds: + defaultColor: green + mode: absolute + steps: + - color: green + value: 0 + - color: orange + value: 80 + - color: red + value: 90 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + max without (instance, node) ( + topk( + 1, + kubelet_volume_stats_inodes_used{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + / + topk( + 1, + kubelet_volume_stats_inodes{cluster="$cluster",job="kubelet",namespace="$namespace",persistentvolumeclaim="$volume"} + ) + * + 100 + ) + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - kubelet_volume_stats_capacity_bytes{job="kubelet"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - kubelet_volume_stats_capacity_bytes{cluster="$cluster",job="kubelet"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: PersistentVolume + name: volume + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: persistentvolumeclaim + matchers: + - kubelet_volume_stats_capacity_bytes{cluster="$cluster",job="kubelet",namespace="$namespace"} +status: {} diff --git a/manifests/persesOperator-kubernetes-pod-networking-overview.yaml b/manifests/persesOperator-kubernetes-pod-networking-overview.yaml new file mode 100644 index 0000000000..596b9d101b --- /dev/null +++ b/manifests/persesOperator-kubernetes-pod-networking-overview.yaml @@ -0,0 +1,444 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-pod-networking-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-pod-networking-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Networking / Pod + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Current Rate of Bytes + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the rate of bytes received by a pod in a cluster. + name: Current Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + container_network_receive_bytes_total{cluster="$cluster",namespace=~"$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "0_1": + kind: Panel + spec: + display: + description: Shows the rate of bytes transmitted by a pod in a cluster. + name: Current Rate of Bytes Transmitted + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + container_network_transmit_bytes_total{cluster="$cluster",namespace=~"$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "1_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the pod. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",namespace=~"$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "1_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the pod. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",namespace=~"$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "2_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by a pod in a cluster. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_packets_total{cluster="$cluster",namespace=~"$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "2_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by a pod in a cluster. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",namespace=~"$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "3_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by a pod in a cluster. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",namespace=~"$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "3_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by a pod in a cluster. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",namespace=~"$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - container_network_receive_packets_total{cluster="$cluster"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: pod + name: pod + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: pod + matchers: + - container_network_receive_packets_total{cluster="$cluster",namespace="$namespace"} +status: {} diff --git a/manifests/persesOperator-kubernetes-pod-resources-overview.yaml b/manifests/persesOperator-kubernetes-pod-resources-overview.yaml new file mode 100644 index 0000000000..53d15dd25d --- /dev/null +++ b/manifests/persesOperator-kubernetes-pod-resources-overview.yaml @@ -0,0 +1,1193 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-pod-resources-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-pod-resources-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Compute Resources / Pod + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: CPU Usage + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Throttling + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Usage Quota + items: + - content: + $ref: '#/spec/panels/2_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage Quota + items: + - content: + $ref: '#/spec/panels/4_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/5_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/5_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/6_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/6_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/7_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/7_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage IO + items: + - content: + $ref: '#/spec/panels/8_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/8_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage IO - Container + items: + - content: + $ref: '#/spec/panels/9_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/9_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Storage IO - Distribution + items: + - content: + $ref: '#/spec/panels/10_0' + height: 10 + width: 24 + x: 0 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the CPU usage of the pod by container, alongwith the requests and limits. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",container!="",namespace="$namespace",pod="$pod"} + ) + seriesNameFormat: '{{container}}' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",pod="$pod",resource="cpu"} + ) + seriesNameFormat: requests + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",pod="$pod",resource="cpu"} + ) + seriesNameFormat: limits + "1_0": + kind: Panel + spec: + display: + description: Shows the CPU throttling of the pod, split by container. + name: CPU Throttling + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: percent + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (container) ( + increase( + container_cpu_cfs_throttled_periods_total{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + / + sum by (container) ( + increase( + container_cpu_cfs_periods_total{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{container}}' + "2_0": + kind: Panel + spec: + display: + description: Shows the CPU requests, limits, and usage of containers in a pod in tabular format. + name: CPU Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Container + name: container + - align: right + header: CPU Usage + name: 'value #1' + - align: right + header: CPU Requests + name: 'value #2' + - align: right + header: CPU Requests % + name: 'value #3' + - align: right + header: CPU Limits + name: 'value #4' + - align: right + header: CPU Limits % + name: 'value #5' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",container!="",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster="$cluster",container!="",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (container) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",container!="",namespace="$namespace",pod="$pod"} + ) + / + sum by (container) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster="$cluster",container!="",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster="$cluster",container!="",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (container) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",container!="",namespace="$namespace",pod="$pod"} + ) + / + sum by (container) ( + cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster="$cluster",container!="",namespace="$namespace",pod="$pod"} + ) + "3_0": + kind: Panel + spec: + display: + description: Shows the memory usage (WSS) of the pod by container, alongwith the requests and limits. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace",pod="$pod"} + ) + seriesNameFormat: '{{container}}' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",pod="$pod",resource="memory"} + ) + seriesNameFormat: requests + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",pod="$pod",resource="memory"} + ) + seriesNameFormat: limits + "4_0": + kind: Panel + spec: + display: + description: Shows the memory requests, limits, and usage of containers in a pod in tabular format. + name: Memory Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Container + name: container + - align: right + header: Memory Usage + name: 'value #1' + - align: right + header: Memory Requests + name: 'value #2' + - align: right + header: Memory Requests % + name: 'value #3' + - align: right + header: Memory Limits + name: 'value #4' + - align: right + header: Memory Limits % + name: 'value #5' + - align: right + header: Memory Usage (RSS) + name: 'value #6' + - align: right + header: Memory Usage (Cache) + name: 'value #7' + - align: right + header: Memory Usage (Swap) + name: 'value #8' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster="$cluster",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (container) ( + container_memory_working_set_bytes{cluster="$cluster",image!="",job="cadvisor",namespace="$namespace",pod="$pod"} + ) + / + sum by (container) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster="$cluster",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster="$cluster",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (container) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace",pod="$pod"} + ) + / + sum by (container) ( + cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster="$cluster",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + container_memory_rss{cluster="$cluster",container!="",container!="POD",job="cadvisor",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + container_memory_cache{cluster="$cluster",container!="",container!="POD",job="cadvisor",namespace="$namespace",pod="$pod"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + container_memory_swap{cluster="$cluster",container!="",container!="POD",job="cadvisor",namespace="$namespace",pod="$pod"} + ) + "5_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the pod. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + irate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "5_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the pod. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "6_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by a pod. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "6_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by a pod. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "7_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by a pod. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "7_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets droppedby a pod. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{pod}}' + "8_0": + kind: Panel + spec: + display: + description: Shows IOPS of a pod, split by read and write. + name: IOPS(Pod) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ceil( + sum by (pod) ( + rate( + container_fs_writes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: Writes + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ceil( + sum by (pod) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: Reads + "8_1": + kind: Panel + spec: + display: + description: Shows Throughput of a pod, split by read and write. + name: ThroughPut(Pod) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: Writes + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod=~"$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: Reads + "9_0": + kind: Panel + spec: + display: + description: Shows IOPS(Reads+Writes) by containers in a pod. + name: 'IOPS(Reads+Writes Containers) ' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ceil( + sum by (container) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + + + rate( + container_fs_writes_total{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{container}}' + "9_1": + kind: Panel + spec: + display: + description: Shows Throughput(Reads+Writes) by containers in a pod. + name: 'ThroughPut(Reads+Writes Containers) ' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + + + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{container}}' + "10_0": + kind: Panel + spec: + display: + description: Shows the current storage IO of the pod in tabular form, by containers. + name: Current Storage IO + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Container + name: container + - align: right + header: IOPS(Reads) + name: 'value #1' + - align: right + header: IOPS(Writes) + name: 'value #2' + - align: right + header: IOPS(Reads + Writes) + name: 'value #3' + - align: right + header: Throughput(Reads) + name: 'value #4' + - align: right + header: Throughput(Writes) + name: 'value #5' + - align: right + header: Throughput(Reads + Writes) + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + rate( + container_fs_writes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + rate( + container_fs_reads_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + + + rate( + container_fs_writes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (container) ( + rate( + container_fs_reads_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + + + rate( + container_fs_writes_bytes_total{cluster="$cluster",container!="",device=~"(/dev.+)|mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+",job="cadvisor",namespace="$namespace",pod="$pod"}[$__rate_interval] + ) + ) + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - kube_namespace_status_phase{cluster="$cluster",job="kube-state-metrics"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: pod + name: pod + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: pod + matchers: + - kube_pod_info{cluster="$cluster",job="kube-state-metrics",namespace="$namespace"} +status: {} diff --git a/manifests/persesOperator-kubernetes-workload-networking-overview.yaml b/manifests/persesOperator-kubernetes-workload-networking-overview.yaml new file mode 100644 index 0000000000..43d385335e --- /dev/null +++ b/manifests/persesOperator-kubernetes-workload-networking-overview.yaml @@ -0,0 +1,594 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-workload-networking-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-workload-networking-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Networking / Workload + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Current Rate of Bytes + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Average Rate of Bytes + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/4_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the rate of bytes received by top pods in a workload in a cluster. + name: Current Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "0_1": + kind: Panel + spec: + display: + description: Shows the rate of bytes transmitted by top pods in a workload in a cluster. + name: Current Rate of Bytes Transmitted + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "1_0": + kind: Panel + spec: + display: + description: Shows the average rate of bytes received by top pods in a workload in a cluster. + name: Average Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + avg by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "1_1": + kind: Panel + spec: + display: + description: Shows the average rate of bytes transmitted by top pods in a workload in a cluster. + name: Average Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + avg by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "2_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the workload highlighting top pods. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "2_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the workload highlighting top pods. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "3_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by top pods in a workload in a cluster. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (pod) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "3_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by top pods in a workload in a cluster. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (pod) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "4_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by top pods in a workload in a cluster. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (pod) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "4_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by top pods in a workload in a cluster. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (pod) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace=~"$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace=~"$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - container_network_receive_packets_total{cluster="$cluster"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: workload_type + name: type + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: workload_type + matchers: + - namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: workload + name: workload + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: workload + matchers: + - namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type="$type"} +status: {} diff --git a/manifests/persesOperator-kubernetes-workload-ns-networking-overview.yaml b/manifests/persesOperator-kubernetes-workload-ns-networking-overview.yaml new file mode 100644 index 0000000000..78dc94a399 --- /dev/null +++ b/manifests/persesOperator-kubernetes-workload-ns-networking-overview.yaml @@ -0,0 +1,816 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-workload-ns-networking-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-workload-ns-networking-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Networking / Namespace (Workloads) + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Current Rate of Bytes + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Current Status + items: + - content: + $ref: '#/spec/panels/1_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Average Container Bandwidth + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/4_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/5_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/5_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the rate of bytes received by top workload in a namespace in a cluster. + name: Current Rate of Bytes Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "0_1": + kind: Panel + spec: + display: + description: Shows the rate of bytes transmitted by top workload in a namespace in a cluster. + name: Current Rate of Bytes Transmitted + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "1_0": + kind: Panel + spec: + display: + description: Shows the current network status of the namespace by workloads. + name: Current Network Status + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Workload + name: workload + - align: left + header: Type + name: workload_type + - align: right + header: Rx Bytes + name: 'value #1' + - align: right + header: Tx Bytes + name: 'value #2' + - align: right + header: Rx Bytes (Avg) + name: 'value #3' + - align: right + header: Tx Bytes (Avg) + name: 'value #4' + - align: right + header: Rx Packets + name: 'value #5' + - align: right + header: Tx Packets + name: 'value #6' + - align: right + header: Rx Packets Dropped + name: 'value #7' + - align: right + header: Tx Packets Dropped + name: 'value #8' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload, workload_type) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (namespace, pod) + kube_pod_info{cluster="$cluster",host_network="false",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload, workload_type) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (namespace, pod) + kube_pod_info{cluster="$cluster",host_network="false",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + avg by (workload, workload_type) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (namespace, pod) + kube_pod_info{cluster="$cluster",host_network="false",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + avg by (workload, workload_type) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (namespace, pod) + kube_pod_info{cluster="$cluster",host_network="false",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload, workload_type) ( + rate(container_network_receive_packets_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (namespace, pod) + kube_pod_info{cluster="$cluster",host_network="false",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload, workload_type) ( + rate(container_network_transmit_packets_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (namespace, pod) + kube_pod_info{cluster="$cluster",host_network="false",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload, workload_type) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) + kube_pod_info{cluster="$cluster",host_network="false",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload, workload_type) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) + kube_pod_info{cluster="$cluster",host_network="false",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + "2_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the namespace by workload highlighting top pods. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "2_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the namespace by workload highlighting top pods. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "3_0": + kind: Panel + spec: + display: + description: Shows the average network bandwidth received in container by workload highlighting top pods. + name: 'Average Container Bandwidth by Workload: Received' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + avg by (workload) ( + rate(container_network_receive_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "3_1": + kind: Panel + spec: + display: + description: Shows the average network bandwidth transmitted in container by workload highlighting top pods. + name: 'Average Container Bandwidth by Workload: Transmitted' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + avg by (workload) ( + rate(container_network_transmit_bytes_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "4_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by top pods in a workload in a namespace in a cluster. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload) ( + rate(container_network_receive_packets_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "4_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by top pods in a workload in a namespace in a cluster. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload) ( + rate(container_network_transmit_packets_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval]) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "5_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by top pods in a workload in a namespace in a cluster. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval] + ) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "5_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by top pods in a workload in a namespace in a cluster. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sort_desc( + sum by (workload) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",namespace="$namespace"}[$__rate_interval] + ) + * on (cluster, namespace, pod) group_left () + topk by (cluster, namespace, pod) ( + 1, + max by (cluster, namespace, pod) (kube_pod_info{host_network="false"}) + ) + * on (cluster, namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - container_network_receive_packets_total{cluster="$cluster"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: workload_type + name: type + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: workload_type + matchers: + - namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+"} +status: {} diff --git a/manifests/persesOperator-kubernetes-workload-ns-resources-overview.yaml b/manifests/persesOperator-kubernetes-workload-ns-resources-overview.yaml new file mode 100644 index 0000000000..813bb44b05 --- /dev/null +++ b/manifests/persesOperator-kubernetes-workload-ns-resources-overview.yaml @@ -0,0 +1,1078 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-workload-ns-resources-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-workload-ns-resources-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Compute Resources / Namespace (Workloads) + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: CPU Usage + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Usage Quota + items: + - content: + $ref: '#/spec/panels/1_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage Quota + items: + - content: + $ref: '#/spec/panels/3_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Network Usage + items: + - content: + $ref: '#/spec/panels/4_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/5_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/5_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Average Container Bandwidth + items: + - content: + $ref: '#/spec/panels/6_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/6_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/7_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/7_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/8_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/8_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the CPU usage of the namespace by workload, and the CPU resource quota of the namespace. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (workload, workload_type) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + seriesNameFormat: '{{workload}} - {{workload_type}}' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + scalar( + max( + kube_resourcequota{cluster="$cluster",namespace="$namespace",resource="requests.cpu",type="hard"} + ) + ) + seriesNameFormat: quota - requests + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + scalar( + max(kube_resourcequota{cluster="$cluster",namespace="$namespace",resource="limits.cpu",type="hard"}) + ) + seriesNameFormat: quota - limits + "1_0": + kind: Panel + spec: + display: + description: Shows the CPU requests, limits, and usage of workloads in a namespace in tabular format. + name: CPU Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Workload + name: workload + - align: left + header: Type + name: workload_type + - align: right + header: Running Pods + name: 'value #1' + - align: right + header: CPU Usage + name: 'value #2' + - align: right + header: CPU Requests + name: 'value #3' + - align: right + header: CPU Requests % + name: 'value #4' + - align: right + header: CPU Limits + name: 'value #5' + - align: right + header: CPU Limits % + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + count by (workload, workload_type) ( + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (workload, workload_type) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (workload, workload_type) ( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (workload, workload_type) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + / + sum by (workload, workload_type) ( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (workload, workload_type) ( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (workload, workload_type) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + / + sum by (workload, workload_type) ( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + "2_0": + kind: Panel + spec: + display: + description: Shows the memory usage of the namespace by workload, and the memory resource quota of the namespace. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (workload, workload_type) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + seriesNameFormat: '{{workload}} - {{workload_type}}' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + scalar( + max( + kube_resourcequota{cluster="$cluster",namespace="$namespace",resource=~"requests.memory|memory",type="hard"} + ) + ) + seriesNameFormat: quota - requests + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + scalar( + max( + kube_resourcequota{cluster="$cluster",namespace="$namespace",resource=~"limits.memory",type="hard"} + ) + ) + seriesNameFormat: quota - limits + "3_0": + kind: Panel + spec: + display: + description: Shows the memory requests, limits, and usage of workloads in a namespace in tabular format. + name: Memory Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Workload + name: workload + - align: left + header: Type + name: workload_type + - align: right + header: Running Pods + name: 'value #1' + - align: right + header: Memory Usage + name: 'value #2' + - align: right + header: Memory Requests + name: 'value #3' + - align: right + header: Memory Requests % + name: 'value #4' + - align: right + header: Memory Limits + name: 'value #5' + - align: right + header: Memory Limits % + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + count by (workload, workload_type) ( + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (workload, workload_type) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (workload, workload_type) ( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (workload, workload_type) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + / + sum by (workload, workload_type) ( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (workload, workload_type) ( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (workload, workload_type) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",job="cadvisor",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + / + sum by (workload, workload_type) ( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + "4_0": + kind: Panel + spec: + display: + description: Shows the current network usage of the namespace by workloads. + name: Current Network Usage + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Workload + name: workload + - align: right + header: Current Receive Bandwidth + name: 'value #1' + - align: right + header: Current Transmit Bandwidth + name: 'value #2' + - align: right + header: Rate of Received Packets + name: 'value #3' + - align: right + header: Rate of Transmitted Packets + name: 'value #4' + - align: right + header: Rate of Received Packets Dropped + name: 'value #5' + - align: right + header: Rate of Transmitted Packets Dropped + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type=~"$type"} + ) + ) + "5_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the namespace by workload. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "5_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the namespace by workload. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "6_0": + kind: Panel + spec: + display: + description: Shows the average network bandwidth received in container by workload. + name: 'Average Container Bandwidth by Workload: Received' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + avg by (workload) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "6_1": + kind: Panel + spec: + display: + description: Shows the average network bandwidth transmitted in container by workload. + name: 'Average Container Bandwidth by Workload: Transmitted' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + avg by (workload) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "7_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by pods in a workload in a namespace. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "7_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by pods in a workload in a namespace. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "8_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets droppedby pods in a workload in a namespace. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + "8_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by pods in a workload in a namespace. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (workload) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{workload}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - kube_namespace_status_phase{cluster="$cluster",job="kube-state-metrics"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: workload_type + name: type + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: workload_type + matchers: + - namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~".+"} +status: {} diff --git a/manifests/persesOperator-kubernetes-workload-resources-overview.yaml b/manifests/persesOperator-kubernetes-workload-resources-overview.yaml new file mode 100644 index 0000000000..17d98b6e34 --- /dev/null +++ b/manifests/persesOperator-kubernetes-workload-resources-overview.yaml @@ -0,0 +1,1001 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: kubernetes-workload-resources-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: kubernetes-workload-resources-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Compute Resources / Workload + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: CPU Usage + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: CPU Usage Quota + items: + - content: + $ref: '#/spec/panels/1_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Memory Usage Quota + items: + - content: + $ref: '#/spec/panels/3_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Network Usage + items: + - content: + $ref: '#/spec/panels/4_0' + height: 10 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Bandwidth + items: + - content: + $ref: '#/spec/panels/5_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/5_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Average Container Bandwidth + items: + - content: + $ref: '#/spec/panels/6_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/6_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets + items: + - content: + $ref: '#/spec/panels/7_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/7_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Rate of Packets Dropped + items: + - content: + $ref: '#/spec/panels/8_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/8_1' + height: 8 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the CPU usage of the workload (deployment, statefulset, job, cronjob, daemonset, etc.) by pod. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + seriesNameFormat: '{{pod}}' + "1_0": + kind: Panel + spec: + display: + description: Shows the CPU requests, limits, and usage of pods in a workload in tabular format. + name: CPU Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: CPU Usage + name: 'value #1' + - align: right + header: CPU Requests + name: 'value #2' + - align: right + header: CPU Requests % + name: 'value #3' + - align: right + header: CPU Limits + name: 'value #4' + - align: right + header: CPU Limits % + name: 'value #5' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + / + sum by (pod) ( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate5m{cluster="$cluster",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + / + sum by (pod) ( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="cpu"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + "2_0": + kind: Panel + spec: + display: + description: Shows the memory usage of the workload (deployment, statefulset, job, cronjob, daemonset, etc.) by pod. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + seriesNameFormat: '{{pod}}' + "3_0": + kind: Panel + spec: + display: + description: Shows the memory requests, limits, and usage of pods in a workload in tabular format. + name: Memory Quota + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: Memory Usage + name: 'value #1' + - align: right + header: Memory Requests + name: 'value #2' + - align: right + header: Memory Requests % + name: 'value #3' + - align: right + header: Memory Limits + name: 'value #4' + - align: right + header: Memory Limits % + name: 'value #5' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + / + sum by (pod) ( + kube_pod_container_resource_requests{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (pod) ( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (pod) ( + container_memory_working_set_bytes{cluster="$cluster",container!="",image!="",namespace="$namespace"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + / + sum by (pod) ( + kube_pod_container_resource_limits{cluster="$cluster",job="kube-state-metrics",namespace="$namespace",resource="memory"} + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload="$workload",workload_type=~"$type"} + ) + "4_0": + kind: Panel + spec: + display: + description: Shows the current network usage of the workload by pods. + name: Current Network Usage + plugin: + kind: Table + spec: + columnSettings: + - align: left + header: Pod + name: pod + - align: right + header: Current Receive Bandwidth + name: 'value #1' + - align: right + header: Current Transmit Bandwidth + name: 'value #2' + - align: right + header: Rate of Received Packets + name: 'value #3' + - align: right + header: Rate of Transmitted Packets + name: 'value #4' + - align: right + header: Rate of Received Packets Dropped + name: 'value #5' + - align: right + header: Rate of Transmitted Packets Dropped + name: 'value #6' + - hide: true + name: timestamp + transforms: + - kind: MergeSeries + spec: {} + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + "5_0": + kind: Panel + spec: + display: + description: Shows the network receive bandwidth of the workload. + name: Receive Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "5_1": + kind: Panel + spec: + display: + description: Shows the network transmit bandwidth of the workload. + name: Transmit Bandwidth + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "6_0": + kind: Panel + spec: + display: + description: Shows the average network bandwidth received by containers of a pod in a workload. + name: 'Average Container Bandwidth by Pod: Received' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + avg by (pod) ( + rate( + container_network_receive_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "6_1": + kind: Panel + spec: + display: + description: Shows the average network bandwidth transmitted by containers of a pod in a workload. + name: 'Average Container Bandwidth by Pod: Transmitted' + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + avg by (pod) ( + rate( + container_network_transmit_bytes_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "7_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets by pods in a workload. + name: Rate of Received Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_receive_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "7_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets by pods in a workload. + name: Rate of Transmitted Packets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_transmit_packets_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "8_0": + kind: Panel + spec: + display: + description: Shows the rate of received packets dropped by pods in a workload. + name: Rate of Received Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_receive_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + "8_1": + kind: Panel + spec: + display: + description: Shows the rate of transmitted packets dropped by pods in a workload. + name: Rate of Transmitted Packets Dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.75 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: packets/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + sum by (pod) ( + rate( + container_network_transmit_packets_dropped_total{cluster="$cluster",job="cadvisor",namespace="$namespace"}[$__rate_interval] + ) + * on (namespace, pod) group_left (workload, workload_type) + namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload=~"$workload",workload_type=~"$type"} + ) + ) + seriesNameFormat: '{{pod}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kubelet", metrics_path="/metrics/cadvisor"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: namespace + name: namespace + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: namespace + matchers: + - kube_namespace_status_phase{cluster="$cluster",job="kube-state-metrics"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: workload_type + name: type + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: workload_type + matchers: + - namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: workload + name: workload + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: workload + matchers: + - namespace_workload_pod:kube_pod_owner:relabel{cluster="$cluster",namespace="$namespace",workload_type="$type"} +status: {} diff --git a/manifests/persesOperator-leaderElectionRole.yaml b/manifests/persesOperator-leaderElectionRole.yaml new file mode 100644 index 0000000000..f2c5fa79a1 --- /dev/null +++ b/manifests/persesOperator-leaderElectionRole.yaml @@ -0,0 +1,43 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/instance: leader-election-role + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-operator-leader-election-role + namespace: monitoring +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch diff --git a/manifests/persesOperator-leaderElectionRoleBinding.yaml b/manifests/persesOperator-leaderElectionRoleBinding.yaml new file mode 100644 index 0000000000..2ddfbc86d5 --- /dev/null +++ b/manifests/persesOperator-leaderElectionRoleBinding.yaml @@ -0,0 +1,19 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/instance: leader-election-rolebinding + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-operator-leader-election-rolebinding + namespace: monitoring +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: perses-operator-leader-election-role +subjects: +- kind: ServiceAccount + name: perses-operator + namespace: monitoring diff --git a/manifests/persesOperator-networkPolicy.yaml b/manifests/persesOperator-networkPolicy.yaml new file mode 100644 index 0000000000..9f17843b4f --- /dev/null +++ b/manifests/persesOperator-networkPolicy.yaml @@ -0,0 +1,30 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: perses-k8s + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-k8s + namespace: monitoring +spec: + egress: + - {} + ingress: + - from: + - podSelector: + matchLabels: + app.kubernetes.io/name: prometheus + ports: + - port: 8080 + protocol: TCP + podSelector: + matchLabels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + policyTypes: + - Egress + - Ingress diff --git a/manifests/persesOperator-node-exporter-cluster-use-method.yaml b/manifests/persesOperator-node-exporter-cluster-use-method.yaml new file mode 100644 index 0000000000..f55310905f --- /dev/null +++ b/manifests/persesOperator-node-exporter-cluster-use-method.yaml @@ -0,0 +1,436 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: node-exporter-cluster-use-method + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: node-exporter-cluster-use-method + namespace: monitoring +spec: + config: + display: + name: Node Exporter / USE Method / Cluster + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: CPU + items: + - content: + $ref: '#/spec/panels/0_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Memory + items: + - content: + $ref: '#/spec/panels/1_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Network + items: + - content: + $ref: '#/spec/panels/2_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Disk IO + items: + - content: + $ref: '#/spec/panels/3_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Disk Space + items: + - content: + $ref: '#/spec/panels/4_0' + height: 6 + width: 24 + x: 0 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: percent-decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + ( + ( + instance:node_cpu_utilisation:rate5m{instance=~"$instance",job="node"} + * + instance:node_num_cpu:sum{instance=~"$instance",job="node"} + ) + != + 0 + ) + / + scalar(sum(instance:node_num_cpu:sum{instance=~"$instance",job="node"})) + seriesNameFormat: '{{instance}}' + "0_1": + kind: Panel + spec: + display: + description: Shows CPU saturation metrics across cluster nodes + name: CPU Saturation (Load1 per CPU) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: percent-decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + ( + instance:node_load1_per_cpu:ratio{instance=~"$instance",job="node"} + / + scalar(count(instance:node_load1_per_cpu:ratio{instance=~"$instance",job="node"})) + ) + != + 0 + seriesNameFormat: '{{instance}}' + "1_0": + kind: Panel + spec: + display: + description: Shows memory utilization percentage across cluster nodes + name: Memory Utilisation + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: percent-decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + ( + instance:node_memory_utilisation:ratio{instance=~"$instance",job="node"} + / + scalar(count(instance:node_memory_utilisation:ratio{instance=~"$instance",job="node"})) + ) + != + 0 + seriesNameFormat: '{{instance}}' + "1_1": + kind: Panel + spec: + display: + description: Shows memory saturation through page fault metrics + name: Memory Saturation (Major Page Faults) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: reads/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: instance:node_vmstat_pgmajfault:rate5m{instance=~"$instance",job="node"} + seriesNameFormat: '{{instance}}' + "2_0": + kind: Panel + spec: + display: + description: Shows network utilization in bytes + name: Network Utilisation (Bytes Receive/Transmit) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: instance:node_network_receive_bytes_excluding_lo:rate5m{instance=~"$instance",job="node"} != 0 + seriesNameFormat: '{{instance}} - Network - Received' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: instance:node_network_transmit_bytes_excluding_lo:rate5m{instance=~"$instance",job="node"} != 0 + seriesNameFormat: '{{instance}} - Network - Transmitted' + "2_1": + kind: Panel + spec: + display: + description: Shows network saturation through drop metrics + name: Network Saturation (Drops Receive/Transmit) + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: instance:node_network_receive_drop_excluding_lo:rate5m{instance=~"$instance",job="node"} != 0 + seriesNameFormat: '{{instance}} - Network - Received' + "3_0": + kind: Panel + spec: + display: + description: Shows disk I/O utilization across cluster nodes + name: Disk IO Utilisation + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: percent-decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + ( + instance_device:node_disk_io_time_seconds:rate5m{instance=~"$instance",job="node"} + / + scalar(count(instance_device:node_disk_io_time_seconds:rate5m{instance=~"$instance",job="node"})) + ) + != + 0 + seriesNameFormat: '{{instance}}' + "3_1": + kind: Panel + spec: + display: + description: Shows disk I/O saturation metrics + name: Disk IO Saturation + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: percent-decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + ( + instance_device:node_disk_io_time_seconds:rate5m{instance=~"$instance",job="node"} + / + scalar(count(instance_device:node_disk_io_time_seconds:rate5m{instance=~"$instance",job="node"})) + ) + != + 0 + seriesNameFormat: '{{instance}}' + "4_0": + kind: Panel + spec: + display: + description: Shows disk space utilization metrics + name: Disk Space Utilisation + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: percent-decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum without (device) ( + max without (fstype, mountpoint) ( + ( + node_filesystem_size_bytes{fstype!="",instance=~"$instance",job="node",mountpoint!=""} + - + node_filesystem_avail_bytes{fstype!="",instance=~"$instance",job="node",mountpoint!=""} + ) + != + 0 + ) + ) + / + scalar( + sum( + max without (fstype, mountpoint) ( + node_filesystem_size_bytes{fstype!="",instance=~"$instance",job="node",mountpoint!=""} + ) + ) + ) + seriesNameFormat: '{{instance}}' + variables: + - kind: ListVariable + spec: + allowAllValue: true + allowMultiple: true + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - node_uname_info{job="node",sysname!="Darwin"} +status: {} diff --git a/manifests/persesOperator-node-exporter-nodes.yaml b/manifests/persesOperator-node-exporter-nodes.yaml new file mode 100644 index 0000000000..3ddcc53e4f --- /dev/null +++ b/manifests/persesOperator-node-exporter-nodes.yaml @@ -0,0 +1,411 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: node-exporter-nodes + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: node-exporter-nodes + namespace: monitoring +spec: + config: + display: + name: Node Exporter / Nodes + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: CPU + items: + - content: + $ref: '#/spec/panels/0_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Memory + items: + - content: + $ref: '#/spec/panels/1_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Disk + items: + - content: + $ref: '#/spec/panels/2_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Network + items: + - content: + $ref: '#/spec/panels/3_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 6 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows CPU utilization percentage across cluster nodes + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: percent-decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + ( + 1 + - + sum without (mode) ( + rate(node_cpu_seconds_total{instance="$instance",job="node",mode=~"idle|iowait|steal"}[$__rate_interval]) + ) + ) + / ignoring (cpu) group_left () + count without (cpu, mode) (node_cpu_seconds_total{instance="$instance",job="node",mode="idle"}) + ) + seriesNameFormat: '{{device}} - CPU - Usage' + "0_1": + kind: Panel + spec: + display: + description: Shows CPU utilization metrics + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: node_load1{instance="$instance",job="node"} + seriesNameFormat: CPU - 1m Average + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: node_load5{instance="$instance",job="node"} + seriesNameFormat: CPU - 5m Average + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: node_load15{instance="$instance",job="node"} + seriesNameFormat: CPU - 15m Average + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: count(node_cpu_seconds_total{instance="$instance",job="node",mode="idle"}) + seriesNameFormat: CPU - Logical Cores + "1_0": + kind: Panel + spec: + display: + description: Shows memory utilization metrics + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + shortValues: true + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: node_memory_Buffers_bytes{instance="$instance",job="node"} + seriesNameFormat: Memory - Buffers + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: node_memory_Cached_bytes{instance="$instance",job="node"} + seriesNameFormat: Memory - Cached + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: node_memory_MemFree_bytes{instance="$instance",job="node"} + seriesNameFormat: Memory - Free + "1_1": + kind: Panel + spec: + display: + description: Shows memory utilization across nodes + name: Memory Usage + plugin: + kind: GaugeChart + spec: + calculation: last + format: + unit: percent + thresholds: + defaultColor: green + mode: absolute + steps: + - color: orange + value: 80 + - color: red + value: 90 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + 100 + - + ( + avg(node_memory_MemAvailable_bytes{instance="$instance",job="node"}) + / + avg(node_memory_MemTotal_bytes{instance="$instance",job="node"}) + * + 100 + ) + seriesNameFormat: Memory - Usage + "2_0": + kind: Panel + spec: + display: + description: Shows disk I/O metrics in bytes + name: Disk I/O Bytes + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(node_disk_read_bytes_total{device!="",instance="$instance",job="node"}[$__rate_interval]) + seriesNameFormat: '{{device}} - Disk - Usage' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(node_disk_io_time_seconds_total{device!="",instance="$instance",job="node"}[$__rate_interval]) + seriesNameFormat: '{{device}} - Disk - Written' + "2_1": + kind: Panel + spec: + display: + description: Shows disk I/O duration metrics + name: Disk I/O Seconds + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(node_disk_io_time_seconds_total{device!="",instance="$instance",job="node"}[$__rate_interval]) + seriesNameFormat: '{{device}} - Disk - IO Time' + "3_0": + kind: Panel + spec: + display: + description: Shows network received bytes metrics + name: Network Received + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(node_network_receive_bytes_total{device!="lo",instance="$instance",job="node"}[$__rate_interval]) + seriesNameFormat: '{{device}} - Network - Received' + "3_1": + kind: Panel + spec: + display: + description: Shows network transmitted bytes metrics + name: Network Transmitted + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + yAxis: + format: + unit: bytes/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(node_network_transmit_bytes_total{device!="lo",instance="$instance",job="node"}[$__rate_interval]) + seriesNameFormat: '{{device}} - Network - Transmitted' + variables: + - kind: ListVariable + spec: + allowAllValue: true + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - node_uname_info{job="node",sysname!="Darwin"} +status: {} diff --git a/manifests/persesOperator-perses-overview.yaml b/manifests/persesOperator-perses-overview.yaml new file mode 100644 index 0000000000..f4a3c184a7 --- /dev/null +++ b/manifests/persesOperator-perses-overview.yaml @@ -0,0 +1,562 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: perses-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-overview + namespace: monitoring +spec: + config: + display: + name: Perses / Overview + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Perses Stats + items: + - content: + $ref: '#/spec/panels/0_0' + height: 6 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: API Requests + items: + - content: + $ref: '#/spec/panels/1_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/1_2' + height: 6 + width: 12 + x: 0 + "y": 6 + - kind: Grid + spec: + display: + title: Resource Usage + items: + - content: + $ref: '#/spec/panels/2_0' + height: 10 + width: 8 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 10 + width: 8 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/2_2' + height: 10 + width: 8 + x: 16 + "y": 0 + - content: + $ref: '#/spec/panels/2_3' + height: 10 + width: 8 + x: 0 + "y": 10 + - content: + $ref: '#/spec/panels/2_4' + height: 10 + width: 8 + x: 8 + "y": 10 + - kind: Grid + spec: + display: + title: Plugins Usage + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 24 + x: 0 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + name: Perses Stats + plugin: + kind: Table + spec: + columnSettings: + - header: Job + name: job + - header: Instance + name: instance + - header: Version + name: version + - header: Namespace + name: namespace + - header: Pod + name: pod + - hide: true + name: value + - hide: true + name: timestamp + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + count by (job, instance, version, namespace, pod) ( + perses_build_info{instance=~"$instance",job=~"$job"} + ) + "1_0": + kind: Panel + spec: + display: + description: Displays the rate of HTTP requests over a 5-minute window. + name: HTTP Requests Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: right + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (handler, code) ( + rate(perses_http_request_total{instance=~"$instance",job=~"$job"}[$__rate_interval]) + ) + seriesNameFormat: '{{handler}} {{method}} {{code}}' + "1_1": + kind: Panel + spec: + display: + description: Displays the percentage of HTTP errors over total requests. + name: HTTP Errors Percentage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: right + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: percent-decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + ( + sum by (handler, code) ( + rate(perses_http_request_total{code=~"4..|5..",instance=~"$instance",job=~"$job"}[$__rate_interval]) + ) + ) + / ignoring (code) group_left () + (sum by (handler) (rate(perses_http_request_total{instance=~"$instance",job=~"$job"}[$__rate_interval]))) + * + 100 + seriesNameFormat: '{{handler}} {{code}}' + "1_2": + kind: Panel + spec: + display: + description: Displays the latency of HTTP requests over a 5-minute window. + name: HTTP Requests Latency + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: right + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + sum by (handler, method) ( + rate(perses_http_request_duration_second_sum{instance=~"$instance",job=~"$job"}[$__rate_interval]) + ) + / + sum by (handler, method) ( + rate(perses_http_request_duration_second_count{instance=~"$instance",job=~"$job"}[$__rate_interval]) + ) + seriesNameFormat: '{{handler}} {{method}}' + "2_0": + kind: Panel + spec: + display: + description: Shows various memory usage metrics of the component. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_alloc_bytes{instance=~"$instance",job=~"$job"} + seriesNameFormat: Alloc All {{pod}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_alloc_bytes{instance=~"$instance",job=~"$job"} + seriesNameFormat: Alloc Heap {{pod}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(go_memstats_alloc_bytes_total{instance=~"$instance",job=~"$job"}[$__rate_interval]) + seriesNameFormat: Alloc Rate All {{pod}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(go_memstats_heap_alloc_bytes{instance=~"$instance",job=~"$job"}[$__rate_interval]) + seriesNameFormat: Alloc Rate Heap {{pod}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_stack_inuse_bytes{instance=~"$instance",job=~"$job"} + seriesNameFormat: Inuse Stack {{pod}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_inuse_bytes{instance=~"$instance",job=~"$job"} + seriesNameFormat: Inuse Heap {{pod}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_resident_memory_bytes{instance=~"$instance",job=~"$job"} + seriesNameFormat: Resident Memory {{pod}} + "2_1": + kind: Panel + spec: + display: + description: Shows the CPU usage of the component. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(process_cpu_seconds_total{instance=~"$instance",job=~"$job"}[$__rate_interval]) + seriesNameFormat: '{{pod}}' + "2_2": + kind: Panel + spec: + display: + description: Shows the number of goroutines being used by the component. + name: Goroutines + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_goroutines{instance=~"$instance",job=~"$job"} + seriesNameFormat: '{{pod}}' + "2_3": + kind: Panel + spec: + display: + description: Shows the Go garbage collection pause durations for the component. + name: GC Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_gc_duration_seconds{instance=~"$instance",job=~"$job"} + seriesNameFormat: '{{quantile}} - {{pod}}' + "2_4": + kind: Panel + spec: + display: + description: Displays the number of open and max file descriptors. + name: File Descriptors + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_open_fds{instance=~"$instance",job=~"$job"} + seriesNameFormat: '{{instance}} - {{pod}} Open FDs' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_max_fds{instance=~"$instance",job=~"$job"} + seriesNameFormat: '{{instance}} - {{pod}} - Max FDs' + "3_0": + kind: Panel + spec: + display: + description: Displays the success and failure attempts to load plugin schemas. + name: Plugin Schema Load Attempts + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: perses_plugin_schemas_load_attempts{instance=~"$instance",job=~"$job"} + seriesNameFormat: '{{pod}} - {{schema}} - {{status}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: job + name: job + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: job + matchers: + - perses_build_info{} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - perses_build_info{job="$job"} +status: {} diff --git a/manifests/persesOperator-perses.yaml b/manifests/persesOperator-perses.yaml new file mode 100644 index 0000000000..59af4e88f8 --- /dev/null +++ b/manifests/persesOperator-perses.yaml @@ -0,0 +1,57 @@ +apiVersion: perses.dev/v1alpha1 +kind: Perses +metadata: + finalizers: + - perses.dev/finalizer + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: perses-k8s + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-k8s + namespace: monitoring +spec: + config: + database: + file: + case_sensitive: false + extension: yaml + folder: /perses + ephemeral_dashboard: + cleanup_interval: 1s + enable: true + frontend: + disable: false + explorer: + enable: true + time_range: + disable_custom: false + security: + authentication: + disable_sign_up: false + providers: + enable_native: false + cookie: + secure: false + enable_auth: false + readonly: false + containerPort: 8080 + image: persesdev/perses:v0.51.0-rc.0 + livenessProbe: + failureThreshold: 5 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + metadata: + labels: + app.kubernetes.io/instance: perses-k8s + readinessProbe: + failureThreshold: 5 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + storage: + size: 1Gi diff --git a/manifests/persesOperator-persesDashboardEditorRole.yaml b/manifests/persesOperator-persesDashboardEditorRole.yaml new file mode 100644 index 0000000000..5a8ce702c3 --- /dev/null +++ b/manifests/persesOperator-persesDashboardEditorRole.yaml @@ -0,0 +1,29 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/instance: persesdashboard-editor-role + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: persesdashboard-editor-role +rules: +- apiGroups: + - perses.dev + resources: + - persesdashboards + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - perses.dev + resources: + - persesdashboards/status + verbs: + - get diff --git a/manifests/persesOperator-persesDashboardViewerRole.yaml b/manifests/persesOperator-persesDashboardViewerRole.yaml new file mode 100644 index 0000000000..d8027e1fbc --- /dev/null +++ b/manifests/persesOperator-persesDashboardViewerRole.yaml @@ -0,0 +1,25 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/instance: persesdashboard-viewer-role + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: persesdashboard-viewer-role +rules: +- apiGroups: + - perses.dev + resources: + - persesdashboards + verbs: + - get + - list + - watch +- apiGroups: + - perses.dev + resources: + - persesdashboards/status + verbs: + - get diff --git a/manifests/persesOperator-persesDatasourceEditorRole.yaml b/manifests/persesOperator-persesDatasourceEditorRole.yaml new file mode 100644 index 0000000000..c69ad02c99 --- /dev/null +++ b/manifests/persesOperator-persesDatasourceEditorRole.yaml @@ -0,0 +1,29 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/instance: persesdatasource-editor-role + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: persesdatasource-editor-role +rules: +- apiGroups: + - perses.dev + resources: + - persesdatasources + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - perses.dev + resources: + - persesdatasources/status + verbs: + - get diff --git a/manifests/persesOperator-persesDatasourceViewerRole.yaml b/manifests/persesOperator-persesDatasourceViewerRole.yaml new file mode 100644 index 0000000000..c370713bd9 --- /dev/null +++ b/manifests/persesOperator-persesDatasourceViewerRole.yaml @@ -0,0 +1,25 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/instance: persesdatasource-viewer-role + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: persesdatasource-viewer-role +rules: +- apiGroups: + - perses.dev + resources: + - persesdatasources + verbs: + - get + - list + - watch +- apiGroups: + - perses.dev + resources: + - persesdatasources/status + verbs: + - get diff --git a/manifests/persesOperator-persesEditorRole.yaml b/manifests/persesOperator-persesEditorRole.yaml new file mode 100644 index 0000000000..1a777c0454 --- /dev/null +++ b/manifests/persesOperator-persesEditorRole.yaml @@ -0,0 +1,29 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/instance: perses-editor-role + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-editor-role +rules: +- apiGroups: + - perses.dev + resources: + - perses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - perses.dev + resources: + - perses/status + verbs: + - get diff --git a/manifests/persesOperator-persesViewerRole.yaml b/manifests/persesOperator-persesViewerRole.yaml new file mode 100644 index 0000000000..f5ade6d631 --- /dev/null +++ b/manifests/persesOperator-persesViewerRole.yaml @@ -0,0 +1,25 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/instance: perses-viewer-role + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-viewer-role +rules: +- apiGroups: + - perses.dev + resources: + - perses + verbs: + - get + - list + - watch +- apiGroups: + - perses.dev + resources: + - perses/status + verbs: + - get diff --git a/manifests/persesOperator-prometheus-overview.yaml b/manifests/persesOperator-prometheus-overview.yaml new file mode 100644 index 0000000000..465e835534 --- /dev/null +++ b/manifests/persesOperator-prometheus-overview.yaml @@ -0,0 +1,462 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: prometheus-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: prometheus-overview + namespace: monitoring +spec: + config: + display: + name: Prometheus / Overview + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Prometheus Stats + items: + - content: + $ref: '#/spec/panels/0_0' + height: 6 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Discovery + items: + - content: + $ref: '#/spec/panels/1_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Retrieval + items: + - content: + $ref: '#/spec/panels/2_0' + height: 6 + width: 8 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 6 + width: 8 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/2_2' + height: 6 + width: 8 + x: 16 + "y": 0 + - kind: Grid + spec: + display: + title: Storage + items: + - content: + $ref: '#/spec/panels/3_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Query + items: + - content: + $ref: '#/spec/panels/4_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 6 + width: 12 + x: 12 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + name: Prometheus Stats + plugin: + kind: Table + spec: + columnSettings: + - header: Job + name: job + - header: Instance + name: instance + - header: Version + name: version + - hide: true + name: value + - hide: true + name: timestamp + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: count by (job, instance, version) (prometheus_build_info{instance=~"$instance",job=~"$job"}) + "1_0": + kind: Panel + spec: + display: + description: Monitors target synchronization time for Prometheus instances + name: Target Sync + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (job, scrape_job, instance) ( + rate(prometheus_target_sync_length_seconds_sum{instance=~"$instance",job=~"$job"}[$__rate_interval]) + ) + seriesNameFormat: '{{job}} - {{instance}} - Metrics' + "1_1": + kind: Panel + spec: + display: + description: Shows discovered targets across Prometheus instances + name: Targets + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum by (job, instance) (prometheus_sd_discovered_targets{instance=~"$instance",job=~"$job"}) + seriesNameFormat: '{{job}} - {{instance}} - Metrics' + "2_0": + kind: Panel + spec: + display: + description: Shows average interval between scrapes for Prometheus targets + name: Average Scrape Interval Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + rate(prometheus_target_interval_length_seconds_sum{instance=~"$instance",job=~"$job"}[$__rate_interval]) + / + rate(prometheus_target_interval_length_seconds_count{instance=~"$instance",job=~"$job"}[$__rate_interval]) + seriesNameFormat: '{{job}} - {{instance}} - {{interval}} Configured' + "2_1": + kind: Panel + spec: + display: + description: Shows scrape failure metrics for Prometheus targets + name: Scrape failures + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (job, instance) ( + rate( + prometheus_target_scrapes_exceeded_body_size_limit_total{instance=~"$instance",job=~"$job"}[$__rate_interval] + ) + ) + seriesNameFormat: 'exceeded body size limit: {{job}} - {{instance}} - Metrics' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (job, instance) ( + rate( + prometheus_target_scrapes_exceeded_sample_limit_total{instance=~"$instance",job=~"$job"}[$__rate_interval] + ) + ) + seriesNameFormat: 'exceeded sample limit: {{job}} - {{instance}} - Metrics' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (job, instance) ( + rate( + prometheus_target_scrapes_sample_duplicate_timestamp_total{instance=~"$instance",job=~"$job"}[$__rate_interval] + ) + ) + seriesNameFormat: 'duplicate timestamp: {{job}} - {{instance}} - Metrics' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (job, instance) ( + rate( + prometheus_target_scrapes_sample_out_of_bounds_total{instance=~"$instance",job=~"$job"}[$__rate_interval] + ) + ) + seriesNameFormat: 'out of bounds: {{job}} - {{instance}} - Metrics' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (job, instance) ( + rate( + prometheus_target_scrapes_sample_out_of_order_total{instance=~"$instance",job=~"$job"}[$__rate_interval] + ) + ) + seriesNameFormat: 'out of order: {{job}} - {{instance}} - Metrics' + "2_2": + kind: Panel + spec: + display: + description: Shows rate of samples appended to Prometheus TSDB + name: Appended Samples + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(prometheus_tsdb_head_samples_appended_total{instance=~"$instance",job=~"$job"}[$__rate_interval]) + seriesNameFormat: '{{job}} - {{instance}} - {{remote_name}} - {{url}}' + "3_0": + kind: Panel + spec: + display: + description: Shows number of series in Prometheus TSDB head + name: Head Series + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_tsdb_head_series{instance=~"$instance",job=~"$job"} + seriesNameFormat: '{{job}} - {{instance}} - Head Series' + "3_1": + kind: Panel + spec: + display: + description: Shows number of chunks in Prometheus TSDB head + name: Head Chunks + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_tsdb_head_chunks{instance=~"$instance",job=~"$job"} + seriesNameFormat: '{{job}} - {{instance}} - Head Chunks' + "4_0": + kind: Panel + spec: + display: + description: Shows Prometheus query rate metrics + name: Query Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + prometheus_engine_query_duration_seconds_count{instance=~"$instance",job=~"$job",slice="inner_eval"}[$__rate_interval] + ) + seriesNameFormat: '{{job}} - {{instance}} - Query Rate' + "4_1": + kind: Panel + spec: + display: + description: Shows duration of different Prometheus query stages + name: Stage Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + max by (slice) ( + prometheus_engine_query_duration_seconds{instance=~"$instance",job=~"$job",quantile="0.9"} + ) + seriesNameFormat: '{{slice}} - Duration' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: job + name: job + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: job + matchers: + - prometheus_build_info{} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - prometheus_build_info{job="$job"} +status: {} diff --git a/manifests/persesOperator-prometheus-remote-write.yaml b/manifests/persesOperator-prometheus-remote-write.yaml new file mode 100644 index 0000000000..e14a1567c1 --- /dev/null +++ b/manifests/persesOperator-prometheus-remote-write.yaml @@ -0,0 +1,562 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: prometheus-remote-write + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: prometheus-remote-write + namespace: monitoring +spec: + config: + display: + name: Prometheus / Remote Write + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Timestamps + items: + - content: + $ref: '#/spec/panels/0_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/0_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Samples + items: + - content: + $ref: '#/spec/panels/1_0' + height: 6 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Shards + items: + - content: + $ref: '#/spec/panels/2_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/2_2' + height: 6 + width: 12 + x: 0 + "y": 6 + - content: + $ref: '#/spec/panels/2_3' + height: 6 + width: 12 + x: 12 + "y": 6 + - kind: Grid + spec: + display: + title: Shard Details + items: + - content: + $ref: '#/spec/panels/3_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Segments + items: + - content: + $ref: '#/spec/panels/4_0' + height: 6 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 6 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Misc. Rates + items: + - content: + $ref: '#/spec/panels/5_0' + height: 6 + width: 6 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/5_1' + height: 6 + width: 6 + x: 6 + "y": 0 + - content: + $ref: '#/spec/panels/5_2' + height: 6 + width: 6 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/5_3' + height: 6 + width: 6 + x: 18 + "y": 0 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows timestamp lag in remote storage + name: Timestamp Lag + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + ( + prometheus_remote_storage_highest_timestamp_in_seconds{instance=~"$instance"} + - ignoring (remote_name, url) group_right (instance) + ( + prometheus_remote_storage_queue_highest_sent_timestamp_seconds{instance=~"$instance",url="$url"} + != + 0 + ) + ) + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Segment' + "0_1": + kind: Panel + spec: + display: + description: Shows rate metrics over 5 minute intervals + name: Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + clamp_min( + rate(prometheus_remote_storage_highest_timestamp_in_seconds{instance=~"$instance"}[$__rate_interval]) + - ignoring (remote_name, url) group_right (instance) + rate( + prometheus_remote_storage_queue_highest_sent_timestamp_seconds{instance=~"$instance",url="$url"}[$__rate_interval] + ), + 0 + ) + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "1_0": + kind: Panel + spec: + display: + description: Shows rate of samples in remote storage + name: Rate, in vs. succeeded or dropped + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + rate(prometheus_remote_storage_samples_in_total{instance=~"$instance"}[$__rate_interval]) + - ignoring (remote_name, url) group_right (instance) + ( + rate(prometheus_remote_storage_succeeded_samples_total{instance=~"$instance",url="$url"}[$__rate_interval]) + or + rate(prometheus_remote_storage_samples_total{instance=~"$instance",url="$url"}[$__rate_interval]) + ) + - + ( + rate(prometheus_remote_storage_dropped_samples_total{instance=~"$instance",url="$url"}[$__rate_interval]) + or + rate(prometheus_remote_storage_samples_dropped_total{instance=~"$instance",url="$url"}[$__rate_interval]) + ) + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "2_0": + kind: Panel + spec: + display: + description: Shows current number of shards in remote storage + name: Current Shards + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_remote_storage_shards{instance=~"$instance",url="$url"} + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "2_1": + kind: Panel + spec: + display: + description: Shows desired number of shards in remote storage + name: Desired Shards + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_remote_storage_shards_desired{instance=~"$instance",url="$url"} + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "2_2": + kind: Panel + spec: + display: + description: Shows maximum number of shards in remote storage + name: Max Shards + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_remote_storage_shards_max{instance=~"$instance",url="$url"} + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "2_3": + kind: Panel + spec: + display: + description: Shows minimum number of shards in remote storage + name: Min Shards + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_remote_storage_shards_min{instance=~"$instance",url="$url"} + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "3_0": + kind: Panel + spec: + display: + description: Shows shard capacity in remote storage + name: Shard Capacity + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_remote_storage_shard_capacity{instance=~"$instance",url="$url"} + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "3_1": + kind: Panel + spec: + display: + description: Shows number of pending samples in remote storage + name: Pending Samples + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + prometheus_remote_storage_pending_samples{instance=~"$instance",url="$url"} + or + prometheus_remote_storage_samples_pending{instance=~"$instance",url="$url"} + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "4_0": + kind: Panel + spec: + display: + description: Shows current TSDB WAL segment + name: TSDB Current Segment + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_tsdb_wal_segment_current{instance=~"$instance"} + seriesNameFormat: '{{instance}} - Segment - Metrics' + "4_1": + kind: Panel + spec: + display: + description: Shows current remote write WAL segment + name: Remote Write Current Segment + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: prometheus_wal_watcher_current_segment{instance=~"$instance"} + seriesNameFormat: '{{instance}} - Segment - Metrics' + "5_0": + kind: Panel + spec: + display: + description: Shows rate of dropped samples in remote storage + name: Dropped Samples Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + rate(prometheus_remote_storage_dropped_samples_total{instance=~"$instance",url="$url"}[$__rate_interval]) + or + rate(prometheus_remote_storage_samples_dropped_total{instance=~"$instance",url="$url"}[$__rate_interval]) + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "5_1": + kind: Panel + spec: + display: + description: Shows rate of failed samples in remote storage + name: Failed Samples + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + rate(prometheus_remote_storage_failed_samples_total{instance=~"$instance",url="$url"}[$__rate_interval]) + or + rate(prometheus_remote_storage_samples_failed_total{instance=~"$instance",url="$url"}[$__rate_interval]) + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "5_2": + kind: Panel + spec: + display: + description: Shows rate of retried samples in remote storage + name: Retried Samples + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |2- + rate(prometheus_remote_storage_retried_samples_total{instance=~"$instance",url=~"$url"}[$__rate_interval]) + or + rate(prometheus_remote_storage_samples_retried_total{instance=~"$instance",url=~"$url"}[$__rate_interval]) + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + "5_3": + kind: Panel + spec: + display: + description: Shows rate of enqueue retries in remote storage + name: Enqueue Retries + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: rate(prometheus_remote_storage_enqueue_retries_total{instance=~"$instance",url=~"$url"}[$__rate_interval]) + seriesNameFormat: '{{instance}} - {{remote_name}} - {{url}} - Metrics' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - prometheus_remote_storage_shards{} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: url + name: url + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: url + matchers: + - prometheus_remote_storage_shards{instance="$instance"} +status: {} diff --git a/manifests/persesOperator-proxy-overview.yaml b/manifests/persesOperator-proxy-overview.yaml new file mode 100644 index 0000000000..c9837ecc5d --- /dev/null +++ b/manifests/persesOperator-proxy-overview.yaml @@ -0,0 +1,702 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: proxy-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: proxy-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Proxy + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Proxy Status + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Proxy Rules Sync Rate + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Proxy Network Programming Rate + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Kube API Requests + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 8 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 8 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/3_2' + height: 8 + width: 8 + x: 16 + "y": 0 + - kind: Grid + spec: + display: + title: Resource Usage + items: + - content: + $ref: '#/spec/panels/4_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/4_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/4_2' + height: 8 + width: 12 + x: 0 + "y": 8 + - content: + $ref: '#/spec/panels/4_3' + height: 8 + width: 12 + x: 12 + "y": 8 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the status of the proxy. + name: Up + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum(up{cluster="$cluster",job="kube-proxy"}) + "1_0": + kind: Panel + spec: + display: + description: Shows the rate of rules sync events. + name: Rules Sync Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + kubeproxy_sync_proxy_rules_duration_seconds_count{cluster="$cluster",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}}' + "1_1": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of rules sync events. + name: Rules Sync Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + rate( + kubeproxy_sync_proxy_rules_duration_seconds_bucket{cluster="$cluster",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}}' + "2_0": + kind: Panel + spec: + display: + description: Shows the rate of network programming events. + name: Network Programming Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + kubeproxy_network_programming_duration_seconds_count{cluster="$cluster",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{instance}}' + "2_1": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of network programming events. + name: Network Programming Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (instance, le) ( + rate( + kubeproxy_network_programming_duration_seconds_bucket{cluster="$cluster",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{instance}}' + "3_0": + kind: Panel + spec: + display: + description: Shows the rate of requests to the Kube API. + name: Kube API Request Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: requests/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"2..",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + ) + seriesNameFormat: 2xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"3..",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + ) + seriesNameFormat: 3xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"4..",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + ) + seriesNameFormat: 4xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"5..",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + ) + seriesNameFormat: 5xx + "3_1": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of post requests to the Kube API. + name: Post Request Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (verb, le) ( + rate( + rest_client_request_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kube-proxy",verb="POST"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{verb}}' + "3_2": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of get requests to the Kube API. + name: Get Request Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (verb, le) ( + rate( + rest_client_request_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kube-proxy",verb="GET"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{verb}}' + "4_0": + kind: Panel + spec: + display: + description: Shows various memory usage metrics of the component. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"} + seriesNameFormat: Alloc All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"} + seriesNameFormat: Alloc Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_alloc_bytes_total{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_stack_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"} + seriesNameFormat: Inuse Stack {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"} + seriesNameFormat: Inuse Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_resident_memory_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"} + seriesNameFormat: Resident Memory {{instance}} + "4_1": + kind: Panel + spec: + display: + description: Shows the CPU usage of the component. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + process_cpu_seconds_total{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"}[$__rate_interval] + ) + seriesNameFormat: '{{instance}}' + "4_2": + kind: Panel + spec: + display: + description: Shows the number of goroutines being used by the component. + name: Goroutines + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_goroutines{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"} + seriesNameFormat: '{{instance}}' + "4_3": + kind: Panel + spec: + display: + description: Shows the Go garbage collection pause durations for the component. + name: GC Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_gc_duration_seconds{cluster=~"$cluster",instance=~"$instance",job="kube-proxy"} + seriesNameFormat: '{{quantile}} - {{instance}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kube-proxy"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - up{cluster="$cluster",job="kube-proxy"} +status: {} diff --git a/manifests/persesOperator-role.yaml b/manifests/persesOperator-role.yaml new file mode 100644 index 0000000000..b66af7b151 --- /dev/null +++ b/manifests/persesOperator-role.yaml @@ -0,0 +1,123 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-operator +rules: +- apiGroups: + - apps + resources: + - deployments + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +- apiGroups: + - "" + resources: + - services + - configmaps + - secrets + verbs: + - get + - patch + - update + - create + - delete + - list + - watch +- apiGroups: + - perses.dev + resources: + - perses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - perses.dev + resources: + - perses/finalizers + verbs: + - update +- apiGroups: + - perses.dev + resources: + - perses/status + verbs: + - get + - patch + - update +- apiGroups: + - perses.dev + resources: + - persesdashboards + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - perses.dev + resources: + - persesdashboards/finalizers + verbs: + - update +- apiGroups: + - perses.dev + resources: + - persesdashboards/status + verbs: + - get + - patch + - update +- apiGroups: + - perses.dev + resources: + - persesdatasources + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - perses.dev + resources: + - persesdatasources/finalizers + verbs: + - update +- apiGroups: + - perses.dev + resources: + - persesdatasources/status + verbs: + - get + - patch + - update diff --git a/manifests/persesOperator-roleBinding.yaml b/manifests/persesOperator-roleBinding.yaml new file mode 100644 index 0000000000..3c6536b3a1 --- /dev/null +++ b/manifests/persesOperator-roleBinding.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-operator + namespace: monitoring +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: perses-operator +subjects: +- kind: ServiceAccount + name: perses-operator + namespace: monitoring diff --git a/manifests/persesOperator-scheduler-overview.yaml b/manifests/persesOperator-scheduler-overview.yaml new file mode 100644 index 0000000000..44c2915c7d --- /dev/null +++ b/manifests/persesOperator-scheduler-overview.yaml @@ -0,0 +1,707 @@ +apiVersion: perses.dev/v1alpha1 +kind: PersesDashboard +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/instance: scheduler-overview + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: scheduler-overview + namespace: monitoring +spec: + config: + display: + name: Kubernetes / Scheduler + duration: 1h + layouts: + - kind: Grid + spec: + display: + title: Scheduler Status + items: + - content: + $ref: '#/spec/panels/0_0' + height: 8 + width: 24 + x: 0 + "y": 0 + - kind: Grid + spec: + display: + title: Scheduling Rate + items: + - content: + $ref: '#/spec/panels/1_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/1_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - kind: Grid + spec: + display: + title: Kube API Requests + items: + - content: + $ref: '#/spec/panels/2_0' + height: 8 + width: 8 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/2_1' + height: 8 + width: 8 + x: 8 + "y": 0 + - content: + $ref: '#/spec/panels/2_2' + height: 8 + width: 8 + x: 16 + "y": 0 + - kind: Grid + spec: + display: + title: Resource Usage + items: + - content: + $ref: '#/spec/panels/3_0' + height: 8 + width: 12 + x: 0 + "y": 0 + - content: + $ref: '#/spec/panels/3_1' + height: 8 + width: 12 + x: 12 + "y": 0 + - content: + $ref: '#/spec/panels/3_2' + height: 8 + width: 12 + x: 0 + "y": 8 + - content: + $ref: '#/spec/panels/3_3' + height: 8 + width: 12 + x: 12 + "y": 8 + panels: + "0_0": + kind: Panel + spec: + display: + description: Shows the status of the scheduler. + name: Up + plugin: + kind: StatChart + spec: + calculation: last + format: + unit: decimal + valueFontSize: 50 + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: sum(up{cluster="$cluster",job="kube-scheduler"}) + "1_0": + kind: Panel + spec: + display: + description: Shows the rate of scheduling events. + name: Scheduling Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: ops/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (cluster, instance) ( + rate( + scheduler_e2e_scheduling_duration_seconds_count{cluster="$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} e2e' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (cluster, instance) ( + rate( + scheduler_binding_duration_seconds_count{cluster="$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} binding' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (cluster, instance) ( + rate( + scheduler_scheduling_algorithm_duration_seconds_count{cluster="$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} scheduling algorithm' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum by (cluster, instance) ( + rate( + scheduler_volume_scheduling_duration_seconds_count{cluster="$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} volume' + "1_1": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of scheduling events. + name: Scheduling Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (cluster, instance, le) ( + rate( + scheduler_e2e_scheduling_duration_seconds_bucket{cluster="$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} e2e' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (cluster, instance, le) ( + rate( + scheduler_binding_duration_seconds_bucket{cluster="$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} binding' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (cluster, instance, le) ( + rate( + scheduler_scheduling_algorithm_duration_seconds_bucket{cluster="$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} scheduling algorithm' + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (cluster, instance, le) ( + rate( + scheduler_volume_scheduling_duration_seconds_bucket{cluster="$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{cluster}} {{instance}} volume' + "2_0": + kind: Panel + spec: + display: + description: Shows the rate of requests to the Kube API. + name: Kube API Request Rate + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 1 + display: line + lineWidth: 0.25 + palette: + mode: auto + stack: all + yAxis: + format: + unit: requests/sec + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"2..",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + seriesNameFormat: 2xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"3..",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + seriesNameFormat: 3xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"4..",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + seriesNameFormat: 4xx + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + sum( + rate( + rest_client_requests_total{cluster=~"$cluster",code=~"5..",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + ) + seriesNameFormat: 5xx + "2_1": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of post requests to the Kube API. + name: Post Request Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (verb, le) ( + rate( + rest_client_request_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler",verb="POST"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{verb}}' + "2_2": + kind: Panel + spec: + display: + description: Shows the 99th quantile latency of get requests to the Kube API. + name: Get Request Latency 99th Quantile + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: list + position: bottom + size: small + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + histogram_quantile( + 0.99, + sum by (verb, le) ( + rate( + rest_client_request_duration_seconds_bucket{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler",verb="GET"}[$__rate_interval] + ) + ) + ) + seriesNameFormat: '{{verb}}' + "3_0": + kind: Panel + spec: + display: + description: Shows various memory usage metrics of the component. + name: Memory Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: bytes + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"} + seriesNameFormat: Alloc All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"} + seriesNameFormat: Alloc Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_alloc_bytes_total{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate All {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + go_memstats_heap_alloc_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + seriesNameFormat: Alloc Rate Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_stack_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"} + seriesNameFormat: Inuse Stack {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_memstats_heap_inuse_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"} + seriesNameFormat: Inuse Heap {{instance}} + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: process_resident_memory_bytes{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"} + seriesNameFormat: Resident Memory {{instance}} + "3_1": + kind: Panel + spec: + display: + description: Shows the CPU usage of the component. + name: CPU Usage + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: |- + rate( + process_cpu_seconds_total{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"}[$__rate_interval] + ) + seriesNameFormat: '{{instance}}' + "3_2": + kind: Panel + spec: + display: + description: Shows the number of goroutines being used by the component. + name: Goroutines + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: decimal + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_goroutines{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"} + seriesNameFormat: '{{instance}}' + "3_3": + kind: Panel + spec: + display: + description: Shows the Go garbage collection pause durations for the component. + name: GC Duration + plugin: + kind: TimeSeriesChart + spec: + legend: + mode: table + position: bottom + values: + - last + visual: + areaOpacity: 0.5 + display: line + lineWidth: 0.25 + palette: + mode: auto + yAxis: + format: + unit: seconds + queries: + - kind: TimeSeriesQuery + spec: + plugin: + kind: PrometheusTimeSeriesQuery + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + query: go_gc_duration_seconds{cluster=~"$cluster",instance=~"$instance",job="kube-scheduler"} + seriesNameFormat: '{{quantile}} - {{instance}}' + variables: + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: cluster + name: cluster + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: cluster + matchers: + - up{job="kube-scheduler"} + - kind: ListVariable + spec: + allowAllValue: false + allowMultiple: false + display: + hidden: false + name: instance + name: instance + plugin: + kind: PrometheusLabelValuesVariable + spec: + datasource: + kind: PrometheusDatasource + name: prometheus-k8s-datasource + labelName: instance + matchers: + - up{cluster="$cluster",job="kube-scheduler"} +status: {} diff --git a/manifests/persesOperator-serviceAccount.yaml b/manifests/persesOperator-serviceAccount.yaml new file mode 100644 index 0000000000..1f5509e5e8 --- /dev/null +++ b/manifests/persesOperator-serviceAccount.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-operator + namespace: monitoring diff --git a/manifests/persesOperator-serviceMonitor.yaml b/manifests/persesOperator-serviceMonitor.yaml new file mode 100644 index 0000000000..cfa476dcab --- /dev/null +++ b/manifests/persesOperator-serviceMonitor.yaml @@ -0,0 +1,23 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus + app.kubernetes.io/version: 0.1.10 + name: perses-operator + namespace: monitoring +spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + path: /metrics + port: https + scheme: https + tlsConfig: + insecureSkipVerify: true + selector: + matchLabels: + app.kubernetes.io/component: perses-operator + app.kubernetes.io/name: perses-operator + app.kubernetes.io/part-of: kube-prometheus diff --git a/manifests/setup/0alertmanagerConfigCustomResourceDefinition.yaml b/manifests/setup/0alertmanagerConfigCustomResourceDefinition.yaml index 6127305387..8be2d33302 100644 --- a/manifests/setup/0alertmanagerConfigCustomResourceDefinition.yaml +++ b/manifests/setup/0alertmanagerConfigCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: alertmanagerconfigs.monitoring.coreos.com spec: group: monitoring.coreos.com diff --git a/manifests/setup/0alertmanagerCustomResourceDefinition.yaml b/manifests/setup/0alertmanagerCustomResourceDefinition.yaml index 1c89c6f462..cca22814ff 100644 --- a/manifests/setup/0alertmanagerCustomResourceDefinition.yaml +++ b/manifests/setup/0alertmanagerCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: alertmanagers.monitoring.coreos.com spec: group: monitoring.coreos.com @@ -369,7 +369,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -384,7 +383,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -545,7 +543,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -560,7 +557,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -714,7 +710,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -729,7 +724,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -890,7 +884,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -905,7 +898,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1882,6 +1874,156 @@ spec: - host - port type: object + tlsConfig: + description: The default TLS configuration for SMTP receivers + properties: + ca: + description: Certificate authority used when verifying server certificates. + properties: + configMap: + description: ConfigMap containing data to use for the targets. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + description: Secret containing data to use for the targets. + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + cert: + description: Client certificate to present when doing client-authentication. + properties: + configMap: + description: ConfigMap containing data to use for the targets. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + description: Secret containing data to use for the targets. + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keySecret: + description: Secret containing the client key file for the targets. + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + maxVersion: + description: |- + Maximum acceptable TLS version. + + It requires Prometheus >= v2.41.0 or Thanos >= v0.31.0. + enum: + - TLS10 + - TLS11 + - TLS12 + - TLS13 + type: string + minVersion: + description: |- + Minimum acceptable TLS version. + + It requires Prometheus >= v2.35.0 or Thanos >= v0.28.0. + enum: + - TLS10 + - TLS11 + - TLS12 + - TLS13 + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object type: object type: object name: @@ -2524,7 +2666,7 @@ spec: Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: - description: EnvFromSource represents the source of a set of ConfigMaps + description: EnvFromSource represents the source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -2544,7 +2686,7 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -2793,6 +2935,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -4038,7 +4186,7 @@ spec: Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: - description: EnvFromSource represents the source of a set of ConfigMaps + description: EnvFromSource represents the source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -4058,7 +4206,7 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -4307,6 +4455,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -6521,7 +6675,6 @@ spec: - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string nodeTaintsPolicy: description: |- @@ -6532,7 +6685,6 @@ spec: - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string topologyKey: description: |- @@ -7528,7 +7680,7 @@ spec: The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. properties: pullPolicy: diff --git a/manifests/setup/0persesCustomResourceDefinition.yaml b/manifests/setup/0persesCustomResourceDefinition.yaml new file mode 100644 index 0000000000..f1ead4485e --- /dev/null +++ b/manifests/setup/0persesCustomResourceDefinition.yaml @@ -0,0 +1,2420 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.0 + name: perses.perses.dev +spec: + group: perses.dev + names: + kind: Perses + listKind: PersesList + plural: perses + shortNames: + - per + singular: perses + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Perses is the Schema for the perses API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: PersesSpec defines the desired state of Perses + properties: + affinity: + description: Affinity is a group of affinity scheduling rules. + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node matches the corresponding matchExpressions; the + node(s) with the highest sum are the most preferred. + items: + description: |- + An empty preferred scheduling term matches all objects with implicit weight 0 + (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements by node's labels. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector requirements by node's fields. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. The terms are ORed. + items: + description: |- + A null or empty node selector term matches no objects. The requirements of + them are ANDed. + The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements by node's labels. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector requirements by node's fields. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key that the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated with the corresponding weight. + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the anti-affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated with the corresponding weight. + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the anti-affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the anti-affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both matchLabelKeys and labelSelector. + Also, matchLabelKeys cannot be set when labelSelector isn't set. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: |- + MismatchLabelKeys is a set of pod label keys to select which pods will + be taken into consideration. The keys are used to lookup values from the + incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` + to select the group of existing pods which pods will be taken into consideration + for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value is empty. + The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. + Also, mismatchLabelKeys cannot be set when labelSelector isn't set. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + args: + description: Args extra arguments to pass to perses + items: + type: string + type: array + client: + description: Perses client configuration + properties: + basicAuth: + description: BasicAuth basic auth config for datasource client + properties: + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + password_path: + description: Path to password + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + username: + description: Username for basic auth + type: string + required: + - password_path + - type + - username + type: object + oauth: + description: OAuth configuration for datasource client + properties: + authStyle: + description: |- + AuthStyle optionally specifies how the endpoint wants the + client ID & client secret sent. The zero value means to + auto-detect. + type: integer + clientIDPath: + description: Path to client id + type: string + clientSecretPath: + description: Path to client secret + type: string + endpointParams: + additionalProperties: + items: + type: string + type: array + description: EndpointParams specifies additional parameters for requests to the token endpoint. + type: object + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + scopes: + description: Scope specifies optional requested permissions. + items: + type: string + type: array + tokenURL: + description: |- + TokenURL is the resource server's token endpoint + URL. This is a constant specific to each server. + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + required: + - tokenURL + - type + type: object + tls: + description: TLS the equivalent to the tls_config for perses client + properties: + caCert: + description: CaCert to verify the perses certificate + properties: + certPath: + description: Path to Certificate + type: string + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + privateKeyPath: + description: Path to Private key certificate + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + required: + - certPath + - type + type: object + enable: + description: Enable TLS connection to perses + type: boolean + insecureSkipVerify: + description: InsecureSkipVerify skip verify of perses certificate + type: boolean + userCert: + description: UserCert client cert/key for mTLS + properties: + certPath: + description: Path to Certificate + type: string + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + privateKeyPath: + description: Path to Private key certificate + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + required: + - certPath + - type + type: object + required: + - enable + type: object + type: object + config: + properties: + api_prefix: + description: Use it in case you want to prefix the API path. + type: string + database: + description: Database contains the different configuration depending on the database you want to use + properties: + file: + properties: + case_sensitive: + type: boolean + extension: + type: string + folder: + type: string + required: + - folder + type: object + sql: + properties: + addr: + description: Network address (requires Net) + type: string + allow_all_files: + description: Allow all files to be used with LOAD DATA LOCAL INFILE + type: boolean + allow_cleartext_passwords: + description: Allows the cleartext client side plugin + type: boolean + allow_fallback_to_plaintext: + description: Allows fallback to unencrypted connection if server does not support TLS + type: boolean + allow_native_passwords: + description: Allows the native password authentication method + type: boolean + allow_old_passwords: + description: Allows the old insecure password method + type: boolean + case_sensitive: + type: boolean + check_conn_liveness: + description: Check connections for liveness before using them + type: boolean + client_found_rows: + description: Return number of matching rows instead of rows changed + type: boolean + collation: + description: Connection collation + type: string + columns_with_alias: + description: Prepend table alias to column names + type: boolean + db_name: + description: Database name + type: string + interpolate_params: + description: Interpolate placeholders into query string + type: boolean + loc: + description: Location for time.Time values + type: object + max_allowed_packet: + description: Max packet size allowed + type: integer + multi_statements: + description: Allow multiple statements in one query + type: boolean + net: + description: Network type + type: string + parse_time: + description: Parse time values to time.Time + type: boolean + password: + description: Password (requires User) + type: string + password_file: + description: PasswordFile is a path to a file that contains a password + type: string + read_timeout: + description: I/O read timeout + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + reject_read_only: + description: Reject read-only connections + type: boolean + server_pub_key: + description: Server public key name + type: string + timeout: + description: Dial timeout + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + tls_config: + description: TLS configuration + properties: + ca: + description: Text of the CA cert to use for the targets. + type: string + ca_file: + description: The CA cert to use for the targets. + type: string + ca_ref: + description: |- + CARef is the name of the secret within the secret manager to use as the CA cert for the + targets. + type: string + cert: + description: Text of the client cert file for the targets. + type: string + cert_file: + description: The client cert file for the targets. + type: string + cert_ref: + description: |- + CertRef is the name of the secret within the secret manager to use as the client cert for + the targets. + type: string + insecure_skip_verify: + description: Disable target certificate validation. + type: boolean + key: + description: Text of the client key file for the targets. + type: string + key_file: + description: The client key file for the targets. + type: string + key_ref: + description: |- + KeyRef is the name of the secret within the secret manager to use as the client key for + the targets. + type: string + max_version: + description: Maximum TLS version. + type: integer + min_version: + description: Minimum TLS version. + type: integer + server_name: + description: Used to verify the hostname for the targets. + type: string + required: + - insecure_skip_verify + type: object + user: + description: Username + type: string + write_timeout: + description: I/O write timeout + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + required: + - allow_all_files + - allow_cleartext_passwords + - allow_fallback_to_plaintext + - allow_native_passwords + - allow_old_passwords + - case_sensitive + - check_conn_liveness + - client_found_rows + - columns_with_alias + - db_name + - interpolate_params + - max_allowed_packet + - multi_statements + - parse_time + - read_timeout + - reject_read_only + - server_pub_key + - timeout + - write_timeout + type: object + type: object + ephemeral_dashboard: + description: EphemeralDashboard contains the config about the ephemeral dashboard feature + properties: + cleanup_interval: + description: The interval at which to trigger the cleanup of ephemeral dashboards, based on their TTLs. + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + enable: + description: When true user will be able to use the ephemeral dashboard at project level. + type: boolean + required: + - cleanup_interval + - enable + type: object + ephemeral_dashboards_cleanup_interval: + description: |- + EphemeralDashboardsCleanupInterval is the interval at which the ephemeral dashboards are cleaned up + DEPRECATED. + Please use the config EphemeralDashboard instead. + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + frontend: + description: Frontend contains any config that will be used by the frontend itself. + properties: + disable: + description: When it is true, Perses won't serve the frontend anymore, and any other config set here will be ignored + type: boolean + explorer: + description: |- + Explorer is activating the different kind of explorer supported. + Be sure you have installed an associated plugin for each explorer type. + properties: + enable: + type: boolean + required: + - enable + type: object + important_dashboards: + description: ImportantDashboards contains important dashboard selectors + items: + properties: + dashboard: + description: Dashboard is the name of the dashboard (dashboard.metadata.name) + type: string + project: + description: Project is the name of the project (dashboard.metadata.project) + type: string + required: + - dashboard + - project + type: object + type: array + information: + description: Information contains markdown content to be display on the home page + type: string + time_range: + description: TimeRange contains the time range configuration for the dropdown + properties: + disable_custom: + type: boolean + options: + items: + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + type: array + required: + - disable_custom + type: object + required: + - disable + - explorer + type: object + global_datasource_discovery: + description: |- + GlobalDatasourceDiscovery is the configuration that helps to generate a list of global datasource based on the discovery chosen. + Be careful: the data coming from the discovery will totally override what exists in the database. + Note that this is an experimental feature. Behavior and config may change in the future. + items: + properties: + discovery_name: + description: The name of the discovery config. It is used for logging purposes only + type: string + http_sd: + description: |- + HTTP-based service discovery provides a more generic way to generate a set of global datasource and serves as an interface to plug in custom service discovery mechanisms. + It fetches an HTTP endpoint containing a list of zero or more global datasources. + The target must reply with an HTTP 200 response. + The HTTP header Content-Type must be application/json, and the body must be valid array of JSON. + properties: + authorization: + description: The HTTP authorization credentials for the targets. + properties: + credentials: + type: string + credentialsFile: + type: string + type: + type: string + type: object + basic_auth: + properties: + password: + type: string + passwordFile: + description: PasswordFile is a path to a file that contains a password + type: string + username: + type: string + required: + - username + type: object + headers: + additionalProperties: + type: string + type: object + native_auth: + properties: + login: + type: string + password: + type: string + required: + - login + - password + type: object + oauth: + properties: + authStyle: + description: |- + AuthStyle optionally specifies how the endpoint wants the + client ID & client secret sent. The zero value means to + auto-detect. + type: integer + clientID: + description: ClientID is the application's ID. + type: string + clientSecret: + description: ClientSecret is the application's secret. + type: string + clientSecretfile: + type: string + endpointParams: + additionalProperties: + items: + type: string + type: array + description: EndpointParams specifies additional parameters for requests to the token endpoint. + type: object + scopes: + description: Scope specifies optional requested permissions. + items: + type: string + type: array + tokenURL: + description: |- + TokenURL is the resource server's token endpoint + URL. This is a constant specific to each server. + type: string + required: + - authStyle + - clientID + - clientSecret + - clientSecretfile + - endpointParams + - scopes + - tokenURL + type: object + tls_config: + description: TLSConfig to use to connect to the targets. + properties: + ca: + description: Text of the CA cert to use for the targets. + type: string + caFile: + description: The CA cert to use for the targets. + type: string + cert: + description: Text of the client cert file for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + key: + description: Text of the client key file for the targets. + type: string + keyFile: + description: The client key file for the targets. + type: string + maxVersion: + description: |- + Maximum acceptable TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). + If unset, Perses will use Go default maximum version, which is TLS 1.3. + See MaxVersion in https://pkg.go.dev/crypto/tls#Config. + type: string + minVersion: + description: |- + Minimum acceptable TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). + If unset, Perses will use Go default minimum version, which is TLS 1.2. + See MinVersion in https://pkg.go.dev/crypto/tls#Config. + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object + url: + type: object + required: + - url + type: object + kubernetes_sd: + description: |- + Kubernetes SD configurations allow retrieving global datasource from Kubernetes' REST API + and always staying synchronized with the cluster state. + properties: + datasource_plugin_kind: + description: DatasourcePluginKind is the name of the datasource plugin that should be filled when creating datasources found. + type: string + labels: + additionalProperties: + type: string + description: The labels used to filter the list of resource when contacting the Kubernetes API. + type: object + namespace: + description: |- + Kubernetes namespace to constraint the query to only one namespace. + Leave empty if you are looking for datasource cross-namespace. + type: string + pod_configuration: + description: Configuration when you want to discover the pods in Kubernetes + properties: + container_name: + description: Name of the container the target address points to. + type: string + container_port_name: + description: Name of the container port. + type: string + container_port_number: + description: Number of the container port. + format: int32 + type: integer + enable: + description: If set to true, Perses server will discovery the pod + type: boolean + type: object + service_configuration: + description: Configuration when you want to discover the services in Kubernetes + properties: + enable: + description: If set to true, Perses server will discovery the service + type: boolean + port_name: + description: Name of the service port for the target. + type: string + port_number: + description: Number of the service port for the target. + format: int32 + type: integer + service_type: + description: The type of the service. + type: string + type: object + required: + - datasource_plugin_kind + - namespace + type: object + refresh_interval: + description: Refresh interval to re-query the endpoint. + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + required: + - discovery_name + type: object + type: array + provisioning: + description: Provisioning contains the provisioning config that can be used if you want to provide default resources. + properties: + folders: + items: + type: string + type: array + interval: + description: Interval is the refresh frequency + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + type: object + schemas: + description: Schemas contain the configuration to get access to the CUE schemas + properties: + datasources_path: + type: string + interval: + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + panels_path: + type: string + queries_path: + type: string + variables_path: + type: string + type: object + security: + description: Security contains any configuration that changes the API behavior like the endpoints exposed or if the permissions are activated. + properties: + authentication: + description: Authentication contains configuration regarding management of access/refresh token + properties: + access_token_ttl: + description: AccessTokenTTL is the time to live of the access token. By default, it is 15 minutes. + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + disable_sign_up: + description: |- + DisableSignUp deactivates the Sign-up page in the UI. + It also disables the endpoint that gives the possibility to create a user. + type: boolean + providers: + description: Providers configure the different authentication providers + properties: + enable_native: + type: boolean + oauth: + items: + properties: + auth_url: + type: object + client_credentials: + properties: + client_id: + description: Hidden special type for storing secrets. + type: string + client_secret: + description: Hidden special type for storing secrets. + type: string + scopes: + items: + type: string + type: array + required: + - client_id + - client_secret + - scopes + type: object + client_id: + description: Hidden special type for storing secrets. + type: string + client_secret: + description: Hidden special type for storing secrets. + type: string + custom_login_property: + type: string + device_auth_url: + type: object + device_code: + properties: + client_id: + description: Hidden special type for storing secrets. + type: string + client_secret: + description: Hidden special type for storing secrets. + type: string + scopes: + items: + type: string + type: array + required: + - client_id + - client_secret + - scopes + type: object + http: + properties: + timeout: + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + tls_config: + properties: + ca: + description: Text of the CA cert to use for the targets. + type: string + caFile: + description: The CA cert to use for the targets. + type: string + cert: + description: Text of the client cert file for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + key: + description: Text of the client key file for the targets. + type: string + keyFile: + description: The client key file for the targets. + type: string + maxVersion: + description: |- + Maximum acceptable TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). + If unset, Perses will use Go default maximum version, which is TLS 1.3. + See MaxVersion in https://pkg.go.dev/crypto/tls#Config. + type: string + minVersion: + description: |- + Minimum acceptable TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). + If unset, Perses will use Go default minimum version, which is TLS 1.2. + See MinVersion in https://pkg.go.dev/crypto/tls#Config. + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object + required: + - timeout + - tls_config + type: object + name: + type: string + redirect_uri: + type: object + scopes: + items: + type: string + type: array + slug_id: + type: string + token_url: + type: object + user_infos_url: + type: object + required: + - auth_url + - client_id + - device_auth_url + - http + - name + - slug_id + - token_url + - user_infos_url + type: object + type: array + oidc: + items: + properties: + client_credentials: + properties: + client_id: + description: Hidden special type for storing secrets. + type: string + client_secret: + description: Hidden special type for storing secrets. + type: string + scopes: + items: + type: string + type: array + required: + - client_id + - client_secret + - scopes + type: object + client_id: + description: Hidden special type for storing secrets. + type: string + client_secret: + description: Hidden special type for storing secrets. + type: string + device_code: + properties: + client_id: + description: Hidden special type for storing secrets. + type: string + client_secret: + description: Hidden special type for storing secrets. + type: string + scopes: + items: + type: string + type: array + required: + - client_id + - client_secret + - scopes + type: object + disable_pkce: + type: boolean + discovery_url: + type: object + http: + properties: + timeout: + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + tls_config: + properties: + ca: + description: Text of the CA cert to use for the targets. + type: string + caFile: + description: The CA cert to use for the targets. + type: string + cert: + description: Text of the client cert file for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + key: + description: Text of the client key file for the targets. + type: string + keyFile: + description: The client key file for the targets. + type: string + maxVersion: + description: |- + Maximum acceptable TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). + If unset, Perses will use Go default maximum version, which is TLS 1.3. + See MaxVersion in https://pkg.go.dev/crypto/tls#Config. + type: string + minVersion: + description: |- + Minimum acceptable TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). + If unset, Perses will use Go default minimum version, which is TLS 1.2. + See MinVersion in https://pkg.go.dev/crypto/tls#Config. + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object + required: + - timeout + - tls_config + type: object + issuer: + type: object + name: + type: string + redirect_uri: + type: object + scopes: + items: + type: string + type: array + slug_id: + type: string + url_params: + additionalProperties: + type: string + type: object + required: + - client_id + - disable_pkce + - http + - issuer + - name + - slug_id + type: object + type: array + required: + - enable_native + type: object + refresh_token_ttl: + description: |- + RefreshTokenTTL is the time to live of the refresh token. + The refresh token is used to get a new access token when it is expired. + By default, it is 24 hours. + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + required: + - disable_sign_up + - providers + type: object + authorization: + description: Authorization contains all configs around rbac (permissions and roles) + properties: + check_latest_update_interval: + description: CheckLatestUpdateInterval that checks if the RBAC cache needs to be refreshed with db content. Only for SQL database setup. + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + guest_permissions: + description: Default permissions for guest users (logged-in users) + items: + properties: + actions: + description: Actions of the permission (read, create, update, delete, ...) + items: + type: string + type: array + scopes: + description: |- + The list of kind targeted by the permission. For example: `Datasource`, `Dashboard`, ... + With Role, you can't target global kinds + items: + type: string + type: array + required: + - actions + - scopes + type: object + type: array + type: object + cookie: + description: Cookie configuration + properties: + same_site: + description: |- + Set the SameSite cookie attribute and prevents the browser from sending the cookie along with cross-site requests. + The main goal is to mitigate the risk of cross-origin information leakage. + This setting also provides some protection against cross-site request forgery attacks (CSRF) + type: integer + secure: + description: Set to true if you host Perses behind HTTPS. Default is false + type: boolean + required: + - secure + type: object + enable_auth: + description: |- + When it is true, the authentication and authorization config are considered. + And you will need a valid JWT token to contact most of the endpoints exposed by the API + type: boolean + encryption_key: + description: |- + EncryptionKey is the secret key used to encrypt and decrypt sensitive data + stored in the database such as the password of the basic auth for a datasource. + Note that if it is not provided, it will use a default value. + On a production instance, you should set this key. + Also note the key size must be exactly 32 bytes long as we are using AES-256 to encrypt the data. + type: string + encryption_key_file: + description: EncryptionKeyFile is the path to file containing the secret key + type: string + readonly: + description: Readonly will deactivate any HTTP POST, PUT, DELETE endpoint + type: boolean + required: + - cookie + - enable_auth + - readonly + type: object + type: object + containerPort: + format: int32 + type: integer + image: + description: Image specifies the container image that should be used for the Perses deployment. + type: string + livenessProbe: + description: |- + Probe describes a health check to be performed against a container to determine whether it is + alive or ready to receive traffic. + properties: + exec: + description: Exec specifies a command to execute in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection to a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + metadata: + description: Metadata to add to deployed pods + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + nodeSelector: + additionalProperties: + type: string + type: object + readinessProbe: + description: |- + Probe describes a health check to be performed against a container to determine whether it is + alive or ready to receive traffic. + properties: + exec: + description: Exec specifies a command to execute in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection to a TCP port. + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + replicas: + format: int32 + type: integer + service: + description: service specifies the service configuration for the perses instance + properties: + annotations: + additionalProperties: + type: string + type: object + name: + type: string + type: object + storage: + default: + size: 1Gi + description: Storage configuration used by the StatefulSet + properties: + size: + anyOf: + - type: integer + - type: string + description: |- + Size of the storage. + cannot be decreased. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + storageClass: + description: |- + StorageClass to use for PVCs. + If not specified, will use the default storage class + type: string + type: object + tls: + description: tls specifies the tls configuration for the perses instance + properties: + caCert: + description: CaCert to verify the perses certificate + properties: + certPath: + description: Path to Certificate + type: string + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + privateKeyPath: + description: Path to Private key certificate + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + required: + - certPath + - type + type: object + enable: + description: Enable TLS connection to perses + type: boolean + insecureSkipVerify: + description: InsecureSkipVerify skip verify of perses certificate + type: boolean + userCert: + description: UserCert client cert/key for mTLS + properties: + certPath: + description: Path to Certificate + type: string + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + privateKeyPath: + description: Path to Private key certificate + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + required: + - certPath + - type + type: object + required: + - enable + type: object + tolerations: + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array + type: object + status: + description: PersesStatus defines the observed state of Perses + properties: + conditions: + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/manifests/setup/0persesdashboardsCustomResourceDefinition.yaml b/manifests/setup/0persesdashboardsCustomResourceDefinition.yaml new file mode 100644 index 0000000000..3b0b1f22ed --- /dev/null +++ b/manifests/setup/0persesdashboardsCustomResourceDefinition.yaml @@ -0,0 +1,312 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.0 + name: persesdashboards.perses.dev +spec: + group: perses.dev + names: + kind: PersesDashboard + listKind: PersesDashboardList + plural: persesdashboards + shortNames: + - perdb + singular: persesdashboard + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: PersesDashboard is the Schema for the persesdashboards API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + config: + properties: + datasources: + additionalProperties: + properties: + default: + type: boolean + display: + properties: + description: + type: string + name: + type: string + type: object + plugin: + description: |- + Plugin will contain the datasource configuration. + The data typed is available in Cue. + properties: + kind: + type: string + spec: + x-kubernetes-preserve-unknown-fields: true + required: + - kind + - spec + type: object + required: + - default + - plugin + type: object + description: Datasources is an optional list of datasource definition. + type: object + display: + properties: + description: + type: string + name: + type: string + type: object + duration: + description: Duration is the default time range to use when getting data to fill the dashboard + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + layouts: + items: + properties: + kind: + type: string + spec: + x-kubernetes-preserve-unknown-fields: true + required: + - kind + - spec + type: object + type: array + panels: + additionalProperties: + properties: + kind: + type: string + spec: + properties: + display: + properties: + description: + type: string + name: + type: string + required: + - name + type: object + links: + items: + properties: + name: + type: string + renderVariables: + type: boolean + targetBlank: + type: boolean + tooltip: + type: string + url: + type: string + required: + - url + type: object + type: array + plugin: + properties: + kind: + type: string + spec: + x-kubernetes-preserve-unknown-fields: true + required: + - kind + - spec + type: object + queries: + items: + properties: + kind: + type: string + spec: + properties: + plugin: + properties: + kind: + type: string + spec: + x-kubernetes-preserve-unknown-fields: true + required: + - kind + - spec + type: object + required: + - plugin + type: object + required: + - kind + - spec + type: object + type: array + required: + - display + - plugin + type: object + required: + - kind + - spec + type: object + type: object + refreshInterval: + description: RefreshInterval is the default refresh interval to use when landing on the dashboard + format: duration + pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ + type: string + variables: + items: + properties: + kind: + description: Kind is the type of the variable. Depending on the value of Kind, it will change the content of Spec. + type: string + spec: + x-kubernetes-preserve-unknown-fields: true + required: + - kind + - spec + type: object + type: array + required: + - duration + - layouts + - panels + type: object + instanceSelector: + description: |- + A label selector is a label query over a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector matches all objects. A null + label selector matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - config + type: object + status: + description: PersesDashboardStatus defines the observed state of PersesDashboard + properties: + conditions: + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/manifests/setup/0persesdatasourcesCustomResourceDefinition.yaml b/manifests/setup/0persesdatasourcesCustomResourceDefinition.yaml new file mode 100644 index 0000000000..e86e908b3f --- /dev/null +++ b/manifests/setup/0persesdatasourcesCustomResourceDefinition.yaml @@ -0,0 +1,326 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.0 + name: persesdatasources.perses.dev +spec: + group: perses.dev + names: + kind: PersesDatasource + listKind: PersesDatasourceList + plural: persesdatasources + shortNames: + - perds + singular: persesdatasource + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: PersesDatasource is the Schema for the PersesDatasources API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + client: + properties: + basicAuth: + description: BasicAuth basic auth config for datasource client + properties: + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + password_path: + description: Path to password + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + username: + description: Username for basic auth + type: string + required: + - password_path + - type + - username + type: object + oauth: + description: OAuth configuration for datasource client + properties: + authStyle: + description: |- + AuthStyle optionally specifies how the endpoint wants the + client ID & client secret sent. The zero value means to + auto-detect. + type: integer + clientIDPath: + description: Path to client id + type: string + clientSecretPath: + description: Path to client secret + type: string + endpointParams: + additionalProperties: + items: + type: string + type: array + description: EndpointParams specifies additional parameters for requests to the token endpoint. + type: object + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + scopes: + description: Scope specifies optional requested permissions. + items: + type: string + type: array + tokenURL: + description: |- + TokenURL is the resource server's token endpoint + URL. This is a constant specific to each server. + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + required: + - tokenURL + - type + type: object + tls: + description: TLS the equivalent to the tls_config for perses client + properties: + caCert: + description: CaCert to verify the perses certificate + properties: + certPath: + description: Path to Certificate + type: string + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + privateKeyPath: + description: Path to Private key certificate + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + required: + - certPath + - type + type: object + enable: + description: Enable TLS connection to perses + type: boolean + insecureSkipVerify: + description: InsecureSkipVerify skip verify of perses certificate + type: boolean + userCert: + description: UserCert client cert/key for mTLS + properties: + certPath: + description: Path to Certificate + type: string + name: + description: Name of basic auth k8s resource (when type is secret or configmap) + type: string + namespace: + description: Namsespace of certificate k8s resource (when type is secret or configmap) + type: string + privateKeyPath: + description: Path to Private key certificate + type: string + type: + description: Type source type of secret + enum: + - secret + - configmap + - file + type: string + required: + - certPath + - type + type: object + required: + - enable + type: object + type: object + config: + properties: + default: + type: boolean + display: + properties: + description: + type: string + name: + type: string + type: object + plugin: + description: |- + Plugin will contain the datasource configuration. + The data typed is available in Cue. + properties: + kind: + type: string + spec: + x-kubernetes-preserve-unknown-fields: true + required: + - kind + - spec + type: object + required: + - default + - plugin + type: object + instanceSelector: + description: |- + A label selector is a label query over a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector matches all objects. A null + label selector matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - config + type: object + status: + description: PersesDatasourceStatus defines the observed state of PersesDatasource + properties: + conditions: + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/manifests/setup/0podmonitorCustomResourceDefinition.yaml b/manifests/setup/0podmonitorCustomResourceDefinition.yaml index a8b1e13dee..2b07cc9f47 100644 --- a/manifests/setup/0podmonitorCustomResourceDefinition.yaml +++ b/manifests/setup/0podmonitorCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: podmonitors.monitoring.coreos.com spec: group: monitoring.coreos.com diff --git a/manifests/setup/0probeCustomResourceDefinition.yaml b/manifests/setup/0probeCustomResourceDefinition.yaml index f9ed9d59db..63862811f9 100644 --- a/manifests/setup/0probeCustomResourceDefinition.yaml +++ b/manifests/setup/0probeCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: probes.monitoring.coreos.com spec: group: monitoring.coreos.com diff --git a/manifests/setup/0prometheusCustomResourceDefinition.yaml b/manifests/setup/0prometheusCustomResourceDefinition.yaml index 0cef939ff3..bf9d48a9e7 100644 --- a/manifests/setup/0prometheusCustomResourceDefinition.yaml +++ b/manifests/setup/0prometheusCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: prometheuses.monitoring.coreos.com spec: group: monitoring.coreos.com @@ -476,7 +476,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -491,7 +490,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -652,7 +650,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -667,7 +664,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -821,7 +817,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -836,7 +831,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -997,7 +991,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1012,7 +1005,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -2208,7 +2200,7 @@ spec: Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: - description: EnvFromSource represents the source of a set of ConfigMaps + description: EnvFromSource represents the source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -2228,7 +2220,7 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -2477,6 +2469,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -3417,6 +3415,12 @@ spec: - name type: object type: array + convertClassicHistogramsToNHCB: + description: |- + Whether to convert all scraped classic histograms into a native histogram with custom buckets. + + It requires Prometheus >= v3.4.0. + type: boolean disableCompaction: description: |- When true, the Prometheus compaction is disabled. @@ -3992,7 +3996,7 @@ spec: Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: - description: EnvFromSource represents the source of a set of ConfigMaps + description: EnvFromSource represents the source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -4012,7 +4016,7 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -4261,6 +4265,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -5277,6 +5287,19 @@ spec: enabling the StatefulSetMinReadySeconds feature gate. format: int32 type: integer + nameEscapingScheme: + description: |- + Specifies the character escaping scheme that will be requested when scraping + for metric and label names that do not conform to the legacy Prometheus + character set. + + It requires Prometheus >= v3.4.0. + enum: + - AllowUTF8 + - Underscores + - Dots + - Values + type: string nameValidationScheme: description: Specifies the validation scheme for metric and label names. enum: @@ -5293,6 +5316,11 @@ spec: Settings related to the OTLP receiver feature. It requires Prometheus >= v2.55.0. properties: + convertHistogramsToNHCB: + description: |- + Configures optional translation of OTLP explicit bucket histograms into native histograms with custom buckets. + It requires Prometheus >= v3.4.0. + type: boolean keepIdentifyingResourceAttributes: description: |- Enables adding `service.name`, `service.namespace` and `service.instance.id` @@ -5316,6 +5344,7 @@ spec: enum: - NoUTF8EscapingWithSuffixes - UnderscoreEscapingWithSuffixes + - NoTranslation type: string type: object overrideHonorLabels: @@ -8686,6 +8715,10 @@ spec: Users can define their own sharding implementation by setting the `__tmp_hash` label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class). + + You can also disable sharding on a specific target by setting the + `__tmp_disable_sharding` label with relabeling configuration. When + the label value isn't empty, all Prometheus shards will scrape the target. format: int32 type: integer storage: @@ -9988,7 +10021,6 @@ spec: - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string nodeTaintsPolicy: description: |- @@ -9999,7 +10031,6 @@ spec: - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string topologyKey: description: |- @@ -11225,7 +11256,7 @@ spec: The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. properties: pullPolicy: diff --git a/manifests/setup/0prometheusagentCustomResourceDefinition.yaml b/manifests/setup/0prometheusagentCustomResourceDefinition.yaml index 92f721b18d..c6add1371e 100644 --- a/manifests/setup/0prometheusagentCustomResourceDefinition.yaml +++ b/manifests/setup/0prometheusagentCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: prometheusagents.monitoring.coreos.com spec: group: monitoring.coreos.com @@ -400,7 +400,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -415,7 +414,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -576,7 +574,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -591,7 +588,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -745,7 +741,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -760,7 +755,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -921,7 +915,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -936,7 +929,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1515,7 +1507,7 @@ spec: Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: - description: EnvFromSource represents the source of a set of ConfigMaps + description: EnvFromSource represents the source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -1535,7 +1527,7 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -1784,6 +1776,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -2724,6 +2722,12 @@ spec: - name type: object type: array + convertClassicHistogramsToNHCB: + description: |- + Whether to convert all scraped classic histograms into a native histogram with custom buckets. + + It requires Prometheus >= v3.4.0. + type: boolean dnsConfig: description: Defines the DNS configuration for the pods. properties: @@ -3257,7 +3261,7 @@ spec: Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: - description: EnvFromSource represents the source of a set of ConfigMaps + description: EnvFromSource represents the source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -3277,7 +3281,7 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -3526,6 +3530,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -4551,6 +4561,19 @@ spec: - StatefulSet - DaemonSet type: string + nameEscapingScheme: + description: |- + Specifies the character escaping scheme that will be requested when scraping + for metric and label names that do not conform to the legacy Prometheus + character set. + + It requires Prometheus >= v3.4.0. + enum: + - AllowUTF8 + - Underscores + - Dots + - Values + type: string nameValidationScheme: description: Specifies the validation scheme for metric and label names. enum: @@ -4567,6 +4590,11 @@ spec: Settings related to the OTLP receiver feature. It requires Prometheus >= v2.55.0. properties: + convertHistogramsToNHCB: + description: |- + Configures optional translation of OTLP explicit bucket histograms into native histograms with custom buckets. + It requires Prometheus >= v3.4.0. + type: boolean keepIdentifyingResourceAttributes: description: |- Enables adding `service.name`, `service.namespace` and `service.instance.id` @@ -4590,6 +4618,7 @@ spec: enum: - NoUTF8EscapingWithSuffixes - UnderscoreEscapingWithSuffixes + - NoTranslation type: string type: object overrideHonorLabels: @@ -7040,6 +7069,10 @@ spec: Users can define their own sharding implementation by setting the `__tmp_hash` label during the target discovery with relabeling configuration (either in the monitoring resources or via scrape class). + + You can also disable sharding on a specific target by setting the + `__tmp_disable_sharding` label with relabeling configuration. When + the label value isn't empty, all Prometheus shards will scrape the target. format: int32 type: integer storage: @@ -7852,7 +7885,6 @@ spec: - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string nodeTaintsPolicy: description: |- @@ -7863,7 +7895,6 @@ spec: - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string topologyKey: description: |- @@ -9089,7 +9120,7 @@ spec: The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. properties: pullPolicy: diff --git a/manifests/setup/0prometheusruleCustomResourceDefinition.yaml b/manifests/setup/0prometheusruleCustomResourceDefinition.yaml index 138f067bb8..1b422a8118 100644 --- a/manifests/setup/0prometheusruleCustomResourceDefinition.yaml +++ b/manifests/setup/0prometheusruleCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: prometheusrules.monitoring.coreos.com spec: group: monitoring.coreos.com diff --git a/manifests/setup/0scrapeconfigCustomResourceDefinition.yaml b/manifests/setup/0scrapeconfigCustomResourceDefinition.yaml index 470c0ec8ab..90b8884b4b 100644 --- a/manifests/setup/0scrapeconfigCustomResourceDefinition.yaml +++ b/manifests/setup/0scrapeconfigCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: scrapeconfigs.monitoring.coreos.com spec: group: monitoring.coreos.com diff --git a/manifests/setup/0servicemonitorCustomResourceDefinition.yaml b/manifests/setup/0servicemonitorCustomResourceDefinition.yaml index f4e2bab5f1..77724f6b97 100644 --- a/manifests/setup/0servicemonitorCustomResourceDefinition.yaml +++ b/manifests/setup/0servicemonitorCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: servicemonitors.monitoring.coreos.com spec: group: monitoring.coreos.com diff --git a/manifests/setup/0thanosrulerCustomResourceDefinition.yaml b/manifests/setup/0thanosrulerCustomResourceDefinition.yaml index a304520ee4..7924357ff6 100644 --- a/manifests/setup/0thanosrulerCustomResourceDefinition.yaml +++ b/manifests/setup/0thanosrulerCustomResourceDefinition.yaml @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.17.3 - operator.prometheus.io/version: 0.82.0 + controller-gen.kubebuilder.io/version: v0.18.0 + operator.prometheus.io/version: 0.82.2 name: thanosrulers.monitoring.coreos.com spec: group: monitoring.coreos.com @@ -367,7 +367,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -382,7 +381,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -543,7 +541,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -558,7 +555,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -712,7 +708,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -727,7 +722,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -888,7 +882,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -903,7 +896,6 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1244,7 +1236,7 @@ spec: Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: - description: EnvFromSource represents the source of a set of ConfigMaps + description: EnvFromSource represents the source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -1264,7 +1256,7 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -1513,6 +1505,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -2947,7 +2945,7 @@ spec: Values defined by an Env with a duplicate key will take precedence. Cannot be updated. items: - description: EnvFromSource represents the source of a set of ConfigMaps + description: EnvFromSource represents the source of a set of ConfigMaps or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -2967,7 +2965,7 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + description: Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. type: string secretRef: description: The Secret to select from @@ -3216,6 +3214,12 @@ spec: - port type: object type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string type: object livenessProbe: description: |- @@ -6586,7 +6590,6 @@ spec: - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string nodeTaintsPolicy: description: |- @@ -6597,7 +6600,6 @@ spec: - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. - This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. type: string topologyKey: description: |- @@ -7637,7 +7639,7 @@ spec: The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. properties: pullPolicy: