2024-06-15 20:01:21 +00:00
|
|
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
2023-04-15 05:19:04 +00:00
|
|
|
kind: HelmRelease
|
|
|
|
metadata:
|
|
|
|
name: kube-prometheus-stack
|
|
|
|
namespace: monitoring
|
|
|
|
spec:
|
|
|
|
interval: 5m
|
|
|
|
chart:
|
|
|
|
spec:
|
|
|
|
chart: kube-prometheus-stack
|
2024-10-12 10:17:17 +00:00
|
|
|
version: "65.2.0"
|
2023-04-15 05:19:04 +00:00
|
|
|
sourceRef:
|
|
|
|
kind: HelmRepository
|
|
|
|
name: prometheus-community-charts
|
|
|
|
namespace: flux-system
|
|
|
|
|
|
|
|
values:
|
2023-04-15 05:24:13 +00:00
|
|
|
namespaceOverride: "monitoring"
|
2023-04-15 05:19:04 +00:00
|
|
|
|
|
|
|
alertmanager:
|
|
|
|
ingress:
|
|
|
|
enabled: true
|
|
|
|
annotations:
|
|
|
|
cert-manager.io/cluster-issuer: letsencrypt-production
|
|
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
|
|
traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd
|
|
|
|
hosts:
|
2023-04-15 05:27:27 +00:00
|
|
|
- &alertmanager-host alertmanager.${SECRET_NEW_DOMAIN}
|
|
|
|
paths:
|
|
|
|
- "/"
|
2023-04-15 05:19:04 +00:00
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- *alertmanager-host
|
2023-04-30 01:07:15 +00:00
|
|
|
|
|
|
|
alertmanagerSpec:
|
|
|
|
alertmanagerConfiguration:
|
|
|
|
name: alertmanager-config
|
2023-04-30 00:35:53 +00:00
|
|
|
|
2023-04-15 05:19:04 +00:00
|
|
|
grafana:
|
2023-10-02 03:40:14 +00:00
|
|
|
enabled: false
|
2023-10-21 00:42:21 +00:00
|
|
|
# enabled dashboards even with grafana being disabled
|
2024-01-23 23:26:14 +00:00
|
|
|
#forceDeployDashboards: true
|
|
|
|
#defaultDashboardsTimezone: America/New_York
|
2023-05-03 04:52:24 +00:00
|
|
|
|
2023-04-15 05:19:04 +00:00
|
|
|
prometheus:
|
|
|
|
ingress:
|
|
|
|
enabled: true
|
|
|
|
annotations:
|
|
|
|
cert-manager.io/cluster-issuer: letsencrypt-production
|
|
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
|
|
traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd
|
|
|
|
hosts:
|
2023-04-15 05:27:27 +00:00
|
|
|
- &prometheus-host metrics.${SECRET_NEW_DOMAIN}
|
|
|
|
paths:
|
|
|
|
- "/"
|
2023-04-15 05:19:04 +00:00
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- *prometheus-host
|
2023-04-30 05:27:12 +00:00
|
|
|
|
|
|
|
prometheusSpec:
|
|
|
|
enableAdminAPI: false
|
|
|
|
|
2023-05-03 04:52:24 +00:00
|
|
|
retention: 1d
|
|
|
|
|
|
|
|
remoteWrite:
|
|
|
|
- url: http://victoria-metrics-server.monitoring.svc:8428/api/v1/write
|
|
|
|
|
|
|
|
storageSpec:
|
|
|
|
volumeClaimTemplate:
|
|
|
|
spec:
|
2024-06-17 20:24:50 +00:00
|
|
|
storageClassName: mainpool-hostpath
|
2023-05-03 04:52:24 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
2024-06-15 20:01:21 +00:00
|
|
|
storage: 40Gi
|
2023-05-03 04:52:24 +00:00
|
|
|
|
2024-06-15 20:32:52 +00:00
|
|
|
defaultRule:
|
2024-06-15 21:18:30 +00:00
|
|
|
create: false
|
2024-06-15 20:32:52 +00:00
|
|
|
rules:
|
|
|
|
general: false
|
|
|
|
|
2024-06-15 20:28:06 +00:00
|
|
|
kubelet:
|
|
|
|
enabled: true
|
|
|
|
serviceMonitor:
|
|
|
|
metricRelabelings:
|
|
|
|
# Remove duplicate metrics
|
|
|
|
- sourceLabels: ["__name__"]
|
|
|
|
regex: "(apiserver_audit|apiserver_client|apiserver_delegated|apiserver_envelope|apiserver_storage|apiserver_webhooks|authentication_token|cadvisor_version|container_blkio|container_cpu|container_fs|container_last|container_memory|container_network|container_oom|container_processes|container|csi_operations|disabled_metric|get_token|go|hidden_metric|kubelet_certificate|kubelet_cgroup|kubelet_container|kubelet_containers|kubelet_cpu|kubelet_device|kubelet_graceful|kubelet_http|kubelet_lifecycle|kubelet_managed|kubelet_node|kubelet_pleg|kubelet_pod|kubelet_run|kubelet_running|kubelet_runtime|kubelet_server|kubelet_started|kubelet_volume|kubernetes_build|kubernetes_feature|machine_cpu|machine_memory|machine_nvm|machine_scrape|node_namespace|plugin_manager|prober_probe|process_cpu|process_max|process_open|process_resident|process_start|process_virtual|registered_metric|rest_client|scrape_duration|scrape_samples|scrape_series|storage_operation|volume_manager|volume_operation|workqueue)_(.+)"
|
|
|
|
action: keep
|
|
|
|
- sourceLabels: ["node"]
|
|
|
|
targetLabel: instance
|
|
|
|
action: replace
|
|
|
|
|
|
|
|
kubeApiServer:
|
|
|
|
enabled: true
|
|
|
|
serviceMonitor:
|
|
|
|
metricRelabelings:
|
|
|
|
# Remove duplicate metrics
|
|
|
|
- sourceLabels: ["__name__"]
|
|
|
|
regex: "(aggregator_openapi|aggregator_unavailable|apiextensions_openapi|apiserver_admission|apiserver_audit|apiserver_cache|apiserver_cel|apiserver_client|apiserver_crd|apiserver_current|apiserver_envelope|apiserver_flowcontrol|apiserver_init|apiserver_kube|apiserver_longrunning|apiserver_request|apiserver_requested|apiserver_response|apiserver_selfrequest|apiserver_storage|apiserver_terminated|apiserver_tls|apiserver_watch|apiserver_webhooks|authenticated_user|authentication|disabled_metric|etcd_bookmark|etcd_lease|etcd_request|field_validation|get_token|go|grpc_client|hidden_metric|kube_apiserver|kubernetes_build|kubernetes_feature|node_authorizer|pod_security|process_cpu|process_max|process_open|process_resident|process_start|process_virtual|registered_metric|rest_client|scrape_duration|scrape_samples|scrape_series|serviceaccount_legacy|serviceaccount_stale|serviceaccount_valid|watch_cache|workqueue)_(.+)"
|
|
|
|
action: keep
|
|
|
|
# Remove high cardinality metrics
|
|
|
|
- sourceLabels: ["__name__"]
|
|
|
|
regex: (apiserver|etcd|rest_client)_request(|_sli|_slo)_duration_seconds_bucket
|
|
|
|
action: drop
|
|
|
|
- sourceLabels: ["__name__"]
|
|
|
|
regex: (apiserver_response_sizes_bucket|apiserver_watch_events_sizes_bucket)
|
|
|
|
action: drop
|
|
|
|
|
2023-04-30 05:27:12 +00:00
|
|
|
kubeControllerManager:
|
|
|
|
enabled: true
|
|
|
|
endpoints:
|
2024-06-15 20:01:21 +00:00
|
|
|
- 192.168.10.40
|
2023-04-30 05:27:12 +00:00
|
|
|
service:
|
|
|
|
enabled: true
|
|
|
|
port: 10257
|
|
|
|
targetPort: 10257
|
|
|
|
serviceMonitor:
|
|
|
|
enabled: true
|
|
|
|
https: true
|
|
|
|
insecureSkipVerify: true
|
2024-06-15 20:28:06 +00:00
|
|
|
metricRelabelings:
|
|
|
|
# Remove duplicate metrics
|
|
|
|
- sourceLabels: ["__name__"]
|
|
|
|
regex: "(apiserver_audit|apiserver_client|apiserver_delegated|apiserver_envelope|apiserver_storage|apiserver_webhooks|attachdetach_controller|authenticated_user|authentication|cronjob_controller|disabled_metric|endpoint_slice|ephemeral_volume|garbagecollector_controller|get_token|go|hidden_metric|job_controller|kubernetes_build|kubernetes_feature|leader_election|node_collector|node_ipam|process_cpu|process_max|process_open|process_resident|process_start|process_virtual|pv_collector|registered_metric|replicaset_controller|rest_client|retroactive_storageclass|root_ca|running_managed|scrape_duration|scrape_samples|scrape_series|service_controller|storage_count|storage_operation|ttl_after|volume_operation|workqueue)_(.+)"
|
|
|
|
action: keep
|
2023-04-30 05:27:12 +00:00
|
|
|
|
|
|
|
kubeScheduler:
|
|
|
|
enabled: true
|
|
|
|
endpoints:
|
2024-06-15 20:01:21 +00:00
|
|
|
- 192.168.10.40
|
2023-04-30 05:27:12 +00:00
|
|
|
service:
|
|
|
|
enabled: true
|
|
|
|
port: 10259
|
|
|
|
targetPort: 10259
|
|
|
|
serviceMonitor:
|
|
|
|
enabled: true
|
|
|
|
https: true
|
|
|
|
insecureSkipVerify: true
|
2024-06-15 20:28:06 +00:00
|
|
|
metricRelabelings:
|
|
|
|
# Remove duplicate metrics
|
|
|
|
- sourceLabels: ["__name__"]
|
|
|
|
regex: "(apiserver_audit|apiserver_client|apiserver_delegated|apiserver_envelope|apiserver_storage|apiserver_webhooks|authenticated_user|authentication|disabled_metric|go|hidden_metric|kubernetes_build|kubernetes_feature|leader_election|process_cpu|process_max|process_open|process_resident|process_start|process_virtual|registered_metric|rest_client|scheduler|scrape_duration|scrape_samples|scrape_series|workqueue)_(.+)"
|
|
|
|
action: keep
|
2023-04-30 05:27:12 +00:00
|
|
|
|
|
|
|
kubeProxy:
|
|
|
|
enabled: true
|
|
|
|
endpoints:
|
2024-06-15 20:01:21 +00:00
|
|
|
- 192.168.10.40
|
2023-04-30 05:27:12 +00:00
|
|
|
service:
|
|
|
|
enabled: true
|
|
|
|
port: 10249
|
|
|
|
targetPort: 10249
|
|
|
|
serviceMonitor:
|
|
|
|
enabled: true
|
|
|
|
https: false
|
|
|
|
|
|
|
|
kubeEtcd:
|
|
|
|
enabled: false
|