Skip to main content
added 127 characters in body
Source Link

How can I change the value of the label __param_target to resemble how I would interact with a Kubernetes service in-cluster, following the format: http://serviceName.namespace.svc:servicePort/path ?

I am aware of the necessary meta labels for this task, but I am unsure how to relabel it using serviceMonitor. The meta labels I intend to use are:

__scheme__
__meta_kubernetes_service_name
__meta_kubernetes_namespace
__meta_kubernetes_pod_container_port_number

the path can be hardcoded since it is not something that can be on the meta labels :) but how can it be concatenated

How can I change the value of the label __param_target to resemble how I would interact with a Kubernetes service in-cluster, following the format: http://serviceName.namespace.svc:servicePort ?

I am aware of the necessary meta labels for this task, but I am unsure how to relabel it using serviceMonitor. The meta labels I intend to use are:

__scheme__
__meta_kubernetes_service_name
__meta_kubernetes_namespace
__meta_kubernetes_pod_container_port_number

How can I change the value of the label __param_target to resemble how I would interact with a Kubernetes service in-cluster, following the format: http://serviceName.namespace.svc:servicePort/path ?

I am aware of the necessary meta labels for this task, but I am unsure how to relabel it using serviceMonitor. The meta labels I intend to use are:

__scheme__
__meta_kubernetes_service_name
__meta_kubernetes_namespace
__meta_kubernetes_pod_container_port_number

the path can be hardcoded since it is not something that can be on the meta labels :) but how can it be concatenated

edited title
Link

concat Concat multiple meta labels on prometheus for relabling

Source Link

concat multiple meta labels on prometheus

How can I change the value of the label __param_target to resemble how I would interact with a Kubernetes service in-cluster, following the format: http://serviceName.namespace.svc:servicePort ?

I am aware of the necessary meta labels for this task, but I am unsure how to relabel it using serviceMonitor. The meta labels I intend to use are:

__scheme__
__meta_kubernetes_service_name
__meta_kubernetes_namespace
__meta_kubernetes_pod_container_port_number