Prometheus auto-discovery can't get NodeJS active services on K8s

14 views
Skip to first unread message

Nathaniel Cohen

unread,
May 13, 2020, 11:55:10 AM5/13/20
to Prometheus Users
I have set up Prometheus in my Kubernetes Google Cluster and it collects many services but not the NodeJS micro-service I have created.

The NodeJS service is detected by Prometheus because I can see it in the status -> Service Discovery but it is not an active target.

Screenshot 2020-05-13 at 17.00.38.png



I also used an nginx-ingress to expose my NodeJS service to the internet and I can even navigate to the /metrics endpoint:


Screenshot 2020-05-13 at 17.09.26.png




My NodeJS service uses express and appmetrics is set up for the `/metrics` endpoint.

How can I debug this? What can I do to check why Prometheus is failing to make this service an active target?



  

Nathaniel Cohen

unread,
May 13, 2020, 11:59:30 AM5/13/20
to Prometheus Users
I Forgot to mention that I have installed Prometheus with the helm chart and the following command:

helm install prometheus \
--namespace=monitoring \
--set server.ingress.hosts={my.address.com} \
--set server.ingress.tls[0].hosts[0]=my.address.com \
--set server.ingress.tls[0].secretName=my-address-com-tls \
--set server.ingress.enabled=true \
--set server.ingress.annotations.'kubernetes\.io/ingress\.class'=nginx \
--set server.ingress.annotations.'cert-manager\.io/issuer'=monitoring-issuer \
stable/prometheus


And didn't change anything else...
Reply all
Reply to author
Forward
0 new messages