Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kube-prometheus-stack] update relabelings to keep some metrics #33

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 52.1.1
version: 52.1.2
appVersion: v0.68.0
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tests:
# 1572
- it: should have tolerations if affinity is not set
set:
alertmanager.enabled: true
alertmanager.alertmanagerSpec.tolerations:
- key: "key1"
operator: "Equal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tests:
- isKind:
of: Ingress
- isAPIVersion:
of: networking.k8s.io/v1beta1
of: networking.k8s.io/v1
- it: should have apiVersion networking.k8s.io/v1 for k8s >= 1.22
set:
alertmanager.enabled: true
Expand Down
11 changes: 5 additions & 6 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ kubelet:
##
metricRelabelings:
- action: keep
regex: kubelet_node_name|kubelet_running_container_count|kubelet_running_pod_count|kubelet_volume_stats.*|kubelet_pleg_relist_duration_seconds_.+
regex: kubelet_node_name|kubelet_running_container_count|kubelet_running_pod_count|kubelet_volume_stats.*|kubelet_pleg_relist_duration_seconds_.+|kubelet_certificate_manager_.+|kubelet_server_expiration_.+|kubelet_pod_worker_.+
sourceLabels:
- __name__
# - sourceLabels: [__name__, image]
Expand Down Expand Up @@ -2026,7 +2026,6 @@ kube-state-metrics:
- kube_replicaset_(status_.+|spec_.+)
- kube_poddisruptionbudget_status_.+
- kube_replicationcontroller_.+
- kube_node_info
- kube_(hpa|replicaset|replicationcontroller)_.+_generation
- kube_clusterrole_info
- kube_clusterrolebinding_info
Expand Down Expand Up @@ -2242,7 +2241,7 @@ prometheus-node-exporter:
##
metricRelabelings:
- action: keep
regex: node_(uname|network)_info|node_cpu_.+|node_memory_Mem.+_bytes|node_memory_SReclaimable_bytes|node_memory_Cached_bytes|node_memory_Buffers_bytes|node_network_(.+_bytes_total|up)|node_network_.+_errs_total|node_nf_conntrack_entries.*|node_disk_.+_completed_total|node_disk_.+_bytes_total|node_filesystem_files|node_filesystem_files_free|node_filesystem_avail_bytes|node_filesystem_size_bytes|node_filesystem_free_bytes|node_filesystem_readonly|node_load.+|node_timex_offset_seconds
regex: node_(uname|network)_info|node_cpu_.+|node_memory_Mem.+_bytes|node_memory_SReclaimable_bytes|node_memory_Cached_bytes|node_memory_Buffers_bytes|node_network_(.+_bytes_total|up)|node_network_.+_errs_total|node_network_.+_packets_total|node_nf_conntrack_entries.*|node_disk_.+_completed_total|node_disk_.+_bytes_total|node_filesystem_files|node_filesystem_files_free|node_filesystem_avail_bytes|node_filesystem_size_bytes|node_filesystem_free_bytes|node_filesystem_readonly|node_load.+|node_timex_offset_seconds|node_timex_maxerror_seconds|node_timex_sync_status|node_filefd_allocated|node_filefd_maximum|node_md_disks|node_md_disks_required|node_textfile_scrape_error
sourceLabels:
- __name__
# - sourceLabels: [__name__]
Expand Down Expand Up @@ -2274,7 +2273,7 @@ prometheus-node-exporter:
- __meta_kubernetes_pod_host_ip
targetLabel: host_ip
- action: labeldrop
regex: (service|endpoint)
regex: (service|endpoint|container)
# - sourceLabels: [__meta_kubernetes_pod_node_name]
# separator: ;
# regex: ^(.*)$
Expand Down Expand Up @@ -4474,7 +4473,7 @@ extraManifests:
app.kubernetes.io/part-of: kube-prometheus
app.kubernetes.io/vendor: kubesphere
name: ks-apiserver
namespace: kubesphere-monitoring-system
namespace: '{{ include "kube-prometheus-stack.namespace" .}}'
spec:
endpoints:
- interval: 1m
Expand All @@ -4497,7 +4496,7 @@ extraManifests:
app.kubernetes.io/part-of: kube-prometheus
app.kubernetes.io/vendor: kubesphere
name: ks-controller-manager
namespace: kubesphere-monitoring-system
namespace: '{{ include "kube-prometheus-stack.namespace" . }}'
spec:
endpoints:
- interval: 1m
Expand Down