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

Prometheus fix for k8s 1.16 #370

Merged
merged 4 commits into from
Jan 17, 2020
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
8 changes: 4 additions & 4 deletions deploy/helm/prometheus-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ prometheus:
# cadvisor container metrics
- url: http://collection-sumologic.sumologic.svc.cluster.local:9888/prometheus.metrics.container
writeRelabelConfigs:
- action: labelmap
regex: container_name
replacement: container
- action: drop
regex: POD
sourceLabels: [container]
- action: drop
regex: POD
sourceLabels: [container_name]
- action: keep
regex: kubelet;.+;(?:container_cpu_load_average_10s|container_cpu_system_seconds_total|container_cpu_usage_seconds_total|container_cpu_cfs_throttled_seconds_total|container_memory_usage_bytes|container_memory_swap|container_memory_working_set_bytes|container_spec_memory_limit_bytes|container_spec_memory_swap_limit_bytes|container_spec_memory_reservation_limit_bytes|container_spec_cpu_quota|container_spec_cpu_period|container_fs_usage_bytes|container_fs_limit_bytes|container_fs_reads_bytes_total|container_fs_writes_bytes_total|)
sourceLabels: [job,container_name,__name__]
sourceLabels: [job,container,__name__]
# cadvisor aggregate container metrics
- url: http://collection-sumologic.sumologic.svc.cluster.local:9888/prometheus.metrics.container
writeRelabelConfigs:
Expand Down
8 changes: 4 additions & 4 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,15 +397,15 @@ prometheus-operator:
# cadvisor container metrics
- url: http://collection-sumologic.sumologic.svc.cluster.local:9888/prometheus.metrics.container
writeRelabelConfigs:
- action: labelmap
regex: container_name
replacement: container
- action: drop
regex: POD
sourceLabels: [container]
- action: drop
regex: POD
sourceLabels: [container_name]
- action: keep
regex: kubelet;.+;(?:container_cpu_load_average_10s|container_cpu_system_seconds_total|container_cpu_usage_seconds_total|container_cpu_cfs_throttled_seconds_total|container_memory_usage_bytes|container_memory_swap|container_memory_working_set_bytes|container_spec_memory_limit_bytes|container_spec_memory_swap_limit_bytes|container_spec_memory_reservation_limit_bytes|container_spec_cpu_quota|container_spec_cpu_period|container_fs_usage_bytes|container_fs_limit_bytes|container_fs_reads_bytes_total|container_fs_writes_bytes_total|)
sourceLabels: [job,container_name,__name__]
sourceLabels: [job,container,__name__]
# cadvisor aggregate container metrics
- url: http://collection-sumologic.sumologic.svc.cluster.local:9888/prometheus.metrics.container
writeRelabelConfigs:
Expand Down
12 changes: 5 additions & 7 deletions deploy/kubernetes/kube-prometheus-sumo-logic-mixin.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,23 @@
url: $._config.sumologicCollectorSvc + "prometheus.metrics.container",
writeRelabelConfigs: [
{
action: "drop",
regex: "POD",
sourceLabels: [
"container"
]
action: "labelmap",
regex: "container_name",
replacement: "container"
},
{
action: "drop",
regex: "POD",
sourceLabels: [
"container_name"
"container"
]
},
{
action: "keep",
regex: "kubelet;.+;(?:container_cpu_load_average_10s|container_cpu_system_seconds_total|container_cpu_usage_seconds_total|container_cpu_cfs_throttled_seconds_total|container_memory_usage_bytes|container_memory_swap|container_memory_working_set_bytes|container_spec_memory_limit_bytes|container_spec_memory_swap_limit_bytes|container_spec_memory_reservation_limit_bytes|container_spec_cpu_quota|container_spec_cpu_period|container_fs_usage_bytes|container_fs_limit_bytes|container_fs_reads_bytes_total|container_fs_writes_bytes_total|)",
sourceLabels: [
"job",
"container_name",
"container",
"__name__"
]
}
Expand Down