Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

221
Vistas
Prometheus : Distinguish Application metrics

I am running my services on EKS clusters. In order to collect the application metrics [API response times, status and number of calls], I came across Prometheus. There are following steps that I think needs to be done:

  1. Cluster role, Service account and role binding: this will allow my prometheus service to talk to the cluster nods, pods and services [defined in the resources section].
  2. Configmap: this allows the scraping process and defines different roles.
  3. Service and ingress: to establish the endpoints [e.g.: 9090] and routes the traffic from internet.

I came across prometheus using helm which describes how we can make use of helm predefined prometheus charts in order to get the raw metrics from kubernetes.

I followed the steps:

kubectl create namespace prometheus

helm install prometheus stable/prometheus \
    --namespace prometheus \
    --set alertmanager.persistentVolume.storageClass="gp2",server.persistentVolume.storageClass="gp2"

kubectl get pods -n prometheus

I can see the pods running with that namespace. Now, I have two questions,

  1. I am having multiple services (For example, service A and service B) running on the cluster. So, how can I distinguish the metrics on Prometheus.
  2. Do I need to run kubectl --namespace=prometheus port-forward deploy/prometheus-server 9090 everytime to see the results? I see targetPort is defined as 9090 then why do I need to run the command? Can I just values.yaml instead?
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Well to answer your questions

  1. Yes, you can distinguish the service metrics by using label just use like this in your configMap of prometheus

     static_configs:
       - targets:
           - "<yourfirstservicename>.<namespace>.svc.cluster.local:<yourservice1portnumber>"
         labels:
           instance: 'service1'
       - targets:
           - "<yourservice2name>.<namespace>.svc.cluster.local:<yourservice2port>"
         labels:
           instance: 'service2'
    
  2. Yes you have to do that port-forward but if you are planning to use grafana for visualization then new grafana version provide built in query run functionality.

I hope this will help !!

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda