Skip to content

Commit

Permalink
Relabel pod and service dimensions for non-pod metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Rosiek committed Sep 2, 2020
1 parent 83e407c commit 740cb66
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ prometheus-operator:
walCompression: true

remoteWrite:
## kube state metrics
## kube non pod state metrics
## kube_daemonset_status_current_number_scheduled
## kube_daemonset_status_desired_number_scheduled
## kube_daemonset_status_number_misscheduled
Expand All @@ -970,6 +970,21 @@ prometheus-operator:
## kube_node_status_allocatable
## kube_node_status_capacity
## kube_node_status_condition
## kube_statefulset_metadata_generation
## kube_statefulset_replicas
## kube_statefulset_status_observed_generation
## kube_statefulset_status_replicas
- url: http://$(CHART).$(NAMESPACE).svc.cluster.local:9888/prometheus.metrics.state
writeRelabelConfigs:
- action: keep
regex: kube-state-metrics;(?:kube_statefulset_status_observed_generation|kube_statefulset_status_replicas|kube_statefulset_replicas|kube_statefulset_metadata_generation|kube_daemonset_status_current_number_scheduled|kube_daemonset_status_desired_number_scheduled|kube_daemonset_status_number_misscheduled|kube_daemonset_status_number_unavailable|kube_deployment_spec_replicas|kube_deployment_status_replicas_available|kube_deployment_status_replicas_unavailable|kube_node_info|kube_node_status_allocatable|kube_node_status_capacity|kube_node_status_condition)
sourceLabels: [job, __name__]
- action: labelmap
regex: (pod|service)
replacement: sd_${1}
- action: labeldrop
regex: (pod|service)
## kube pod state metrics
## kube_pod_container_info
## kube_pod_container_resource_limits
## kube_pod_container_resource_requests
Expand All @@ -978,14 +993,10 @@ prometheus-operator:
## kube_pod_container_status_terminated_reason
## kube_pod_container_status_waiting_reason
## kube_pod_status_phase
## kube_statefulset_metadata_generation
## kube_statefulset_replicas
## kube_statefulset_status_observed_generation
## kube_statefulset_status_replicas
- url: http://$(CHART).$(NAMESPACE).svc.cluster.local:9888/prometheus.metrics.state
writeRelabelConfigs:
- action: keep
regex: kube-state-metrics;(?:kube_statefulset_status_observed_generation|kube_statefulset_status_replicas|kube_statefulset_replicas|kube_statefulset_metadata_generation|kube_daemonset_status_current_number_scheduled|kube_daemonset_status_desired_number_scheduled|kube_daemonset_status_number_misscheduled|kube_daemonset_status_number_unavailable|kube_deployment_spec_replicas|kube_deployment_status_replicas_available|kube_deployment_status_replicas_unavailable|kube_node_info|kube_node_status_allocatable|kube_node_status_capacity|kube_node_status_condition|kube_pod_container_info|kube_pod_container_resource_requests|kube_pod_container_resource_limits|kube_pod_container_status_ready|kube_pod_container_status_terminated_reason|kube_pod_container_status_waiting_reason|kube_pod_container_status_restarts_total|kube_pod_status_phase)
regex: kube-state-metrics;(?:kube_pod_container_info|kube_pod_container_resource_requests|kube_pod_container_resource_limits|kube_pod_container_status_ready|kube_pod_container_status_terminated_reason|kube_pod_container_status_waiting_reason|kube_pod_container_status_restarts_total|kube_pod_status_phase)
sourceLabels: [job, __name__]
## controller manager metrics
## https://kubernetes.io/docs/concepts/cluster-administration/monitoring/#kube-controller-manager-metrics
Expand Down

0 comments on commit 740cb66

Please sign in to comment.