diff --git a/README.md b/README.md index a88352faf2..6d3416c17c 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,21 @@ _... automated via [Flux](https://fluxcd.io), [Renovate](https://github.com/reno
-[![Discord](https://img.shields.io/discord/673534664354430999?style=for-the-badge&label&logo=discord&logoColor=white&color=blue)](https://discord.gg/home-operations) -[![Kubernetes](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fburoa%2Fk8s-gitops%2Fmaster%2Fkubernetes%2Fapps%2Fkube-system%2Fsystem-upgrade-controller%2Fplans%2Fkubernetes.yaml&query=%24.spec.version&style=for-the-badge&logo=kubernetes&logoColor=white&label=%20)](https://k8s.io) +[![Discord](https://img.shields.io/discord/673534664354430999?style=for-the-badge&label&logo=discord&logoColor=white&color=blue)](https://discord.gg/home-operations)    +[![Kubernetes](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fburoa%2Fk8s-gitops%2Fmaster%2Fkubernetes%2Fapps%2Fkube-system%2Fsystem-upgrade-controller%2Fplans%2Fkubernetes.yaml&query=%24.spec.version&style=for-the-badge&logo=kubernetes&logoColor=white&label=%20)](https://k8s.io)    [![Renovate](https://img.shields.io/github/actions/workflow/status/buroa/k8s-gitops/renovate.yaml?branch=master&label=&logo=renovatebot&style=for-the-badge&color=blue)](https://github.com/buroa/k8s-gitops/actions/workflows/renovate.yaml) -[![Home-Internet](https://img.shields.io/uptimerobot/status/m794001384-01d2febd339773320ef5aae1?label=Home%20Internet&style=for-the-badge&logo=google-home&logoColor=white)](https://status.ktwo.io) -[![Plex](https://img.shields.io/uptimerobot/status/m793802743-0b6044ca7f1ec92851b9a495?label=Plex&style=for-the-badge&logo=plex&logoColor=white)](https://status.ktwo.io/endpoints/_plex) +[![Home-Internet](https://img.shields.io/uptimerobot/status/m794001384-01d2febd339773320ef5aae1?label=Home%20Internet&style=for-the-badge&logo=ubiquiti&logoColor=white)](https://status.ktwo.io)    +[![Plex](https://img.shields.io/uptimerobot/status/m793802743-0b6044ca7f1ec92851b9a495?label=Plex&style=for-the-badge&logo=plex&logoColor=white)](https://status.ktwo.io/endpoints/_plex)    [![Overseerr](https://img.shields.io/uptimerobot/status/m793802757-ca314435a1d7b7dc1ca5dac9?label=Overseerr&style=for-the-badge&logo=insomnia&logoColor=white)](https://status.ktwo.io/endpoints/_overseerr) +![Age](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ktwo.io%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_age_days&style=for-the-badge&label=Age)    +![Uptime](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ktwo.io%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_uptime_days&style=for-the-badge&label=Uptime)    +![Nodes](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ktwo.io%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_node_count&style=for-the-badge&label=Nodes)    +![Pods](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ktwo.io%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_pod_count&style=for-the-badge&label=Pods)    +![CPU](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ktwo.io%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_node_cpu&style=for-the-badge&label=CPU)    +![Power](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ktwo.io%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_power_usage&style=for-the-badge&label=Power) +
--- diff --git a/kubernetes/apps/default/kromgo/app/configs/config.yaml b/kubernetes/apps/default/kromgo/app/configs/config.yaml index ad1a81c37f..d0e1e9b650 100644 --- a/kubernetes/apps/default/kromgo/app/configs/config.yaml +++ b/kubernetes/apps/default/kromgo/app/configs/config.yaml @@ -1,23 +1,31 @@ --- metrics: + - name: cluster_age_days + query: round((time() - max(kube_node_created)) / 86400) + suffix: d + + - name: cluster_uptime_days + query: round(avg(node_time_seconds{kubernetes_node=~"[m|w][0-2]"} - node_boot_time_seconds) / 86400) + suffix: d + - name: cluster_node_count query: count(count by (node) (kube_node_status_condition{condition="Ready"})) + - name: cluster_pod_count + query: sum(kube_pod_status_phase{phase="Running"}) + - name: cluster_node_cpu query: round(cluster:node_cpu:ratio_rate5m * 100, 0.1) suffix: "%" colors: - { color: "green", min: 0, max: 35 } - { color: "orange", min: 36, max: 75 } - - { color: "red", min: 76, max: 1000 } - - - name: cluster_pods_count - query: sum(kube_pod_status_phase{phase="Running"}) + - { color: "red", min: 76, max: 9999 } - name: cluster_power_usage - query: round(avg_over_time(upsAdvanceOutputPower[5m]), 0.1) - suffix: "w" + query: round(upsAdvanceOutputPower, 0.1) + suffix: w colors: - { color: "green", min: 0, max: 400 } - - { color: "orange", min: 401, max: 750 } - - { color: "red", min: 751, max: 2000 } + - { color: "orange", min: 401, max: 500 } + - { color: "red", min: 501, max: 2000 } diff --git a/kubernetes/apps/monitoring/kube-prometheus-stack/app/helmrelease.yaml b/kubernetes/apps/monitoring/kube-prometheus-stack/app/helmrelease.yaml index 4c12d30cfa..b35b85bef3 100644 --- a/kubernetes/apps/monitoring/kube-prometheus-stack/app/helmrelease.yaml +++ b/kubernetes/apps/monitoring/kube-prometheus-stack/app/helmrelease.yaml @@ -57,30 +57,6 @@ spec: resources: requests: storage: 1Gi - grafana: - enabled: false - forceDeployDashboards: true - sidecar: - dashboards: - multicluster: - etcd: - enabled: true - kubeStateMetrics: - enabled: true - kube-state-metrics: - metricLabelsAllowlist: - - pods=[*] - - deployments=[*] - - persistentvolumeclaims=[*] - prometheus: - monitor: - enabled: true - relabelings: - - action: replace - regex: (.*) - replacement: $1 - sourceLabels: ["__meta_kubernetes_pod_node_name"] - targetLabel: kubernetes_node kubelet: enabled: true serviceMonitor: @@ -99,13 +75,8 @@ spec: kubeEtcd: enabled: true endpoints: *endpoints - service: - enabled: true - port: 2381 - targetPort: 2381 kubeProxy: enabled: false - endpoints: *endpoints kubeScheduler: enabled: true endpoints: *endpoints @@ -162,3 +133,41 @@ spec: memory: 2048M limits: memory: 8192M + nodeExporter: + enabled: true + prometheus-node-exporter: + prometheus: + monitor: + enabled: true + relabelings: + - action: replace + regex: (.*) + replacement: $1 + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: kubernetes_node + kubeStateMetrics: + enabled: true + kube-state-metrics: + metricLabelsAllowlist: + - pods=[*] + - deployments=[*] + - persistentvolumeclaims=[*] + prometheus: + monitor: + enabled: true + relabelings: + - action: replace + regex: (.*) + replacement: $1 + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: kubernetes_node + grafana: + enabled: false + forceDeployDashboards: true + sidecar: + dashboards: + multicluster: + etcd: + enabled: true