Hello team, need some help,
I have in Grafana at metrics from my windows pods ( using windows_exporter):
if i try get metrics for example: rate(windows_container_cpu_usage_seconds_total[5m])
I will see only container_id ( pod id) for example: docker://0040308261f7aa694ac13ca1d7fc92ee9c781892de774b4b87ea4f6a167344be not a pod name/container name because windows_exporter can provide only at container ID
as I understand I need to do relabeling in Prometheus-operator ( I’m using helpfile for this in kube-prometheus-stack)
how I understand I need to add metric_relabel_configs in values but I do not understand how I can do this.
additionalScrapeConfigs: []
# - job_name: kube-etcd
# kubernetes_sd_configs:
# - role: node
# scheme: https
# tls_config:
# ca_file: /etc/prometheus/secrets/etcd-client-cert/etcd-ca
# cert_file: /etc/prometheus/secrets/etcd-client-cert/etcd-client
# key_file: /etc/prometheus/secrets/etcd-client-cert/etcd-client-key
# relabel_configs:
# - action: labelmap
# regex: _meta_kubernetes_node_label(.+)
# - source_labels: [address]
# action: replace
# targetLabel: address
# regex: ([^:;]+):(\d+)
# replacement: ${1}:2379
# - source_labels: [__meta_kubernetes_node_name]
# action: keep
# regex: .mst.
# - source_labels: [__meta_kubernetes_node_name]
# action: replace
# targetLabel: node
# regex: (.*)
# replacement: ${1}
# metric_relabel_configs:
# - regex: (kubernetes_io_hostname|failure_domain_beta_kubernetes_io_region|beta_kubernetes_io_os|beta_kubernetes_io_arch|beta_kubernetes_io_instance_type|failure_domain_beta_kubernetes_io_zone)
# action: labeldrop