Hi,--I'm using prometheus with kubernetes in our production environment, it's greate and helpful. But I met some problem about monitoring the k8s Service status using prometheus.Here is the basic information and my problem in detail.I run prometheus inside k8s as a Pod, and using kubernetes_sd to find all pods and services, it's all good.Generally our application is running in Pod, and we create one Kubernetes Service for each application with two Pods replica. We have an health check endpoint like `/health` and it returns 200 OK.The thing I want to achieve is: create a dashboard showing the Service is running correctly, which mean up or down.The way I use now is configure prometheus with kubernetes_sd, role='service', and for each service, the endpoint to pull is like `http://<service-name>:<service-port>/health`, and the prometheusquery I can use is like `up{job='kubernetes-service', kubernetes_service_name=<service-name>}`.The problem of this way is, it only works if the `health` endpoint returns EMPTY content or prometheus METRICS format data. But to let a /health endpoint to return metrics is not proper way, so nowwe have to make it return empty content. Actually we want the '/health' endpoint to return some text like 'ok', but it will not work in prometheus.So I want to ask is my solution a proper way to monitoring kubernetes service status? If yes, does prometheus have a better way to support general health check endpoint like 'ok' response?Thanks!
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/5ef7a7cb-edda-4b89-93de-553430066149%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Please take this question to the prometheus-users list.
On Thu, Feb 23, 2017 at 5:10 AM, Xiao Han <justl...@gmail.com> wrote:
Hi,I'm using prometheus with kubernetes in our production environment, it's greate and helpful. But I met some problem about monitoring the k8s Service status using prometheus.Here is the basic information and my problem in detail.I run prometheus inside k8s as a Pod, and using kubernetes_sd to find all pods and services, it's all good.Generally our application is running in Pod, and we create one Kubernetes Service for each application with two Pods replica. We have an health check endpoint like `/health` and it returns 200 OK.The thing I want to achieve is: create a dashboard showing the Service is running correctly, which mean up or down.The way I use now is configure prometheus with kubernetes_sd, role='service', and for each service, the endpoint to pull is like `http://<service-name>:<service-port>/health`, and the prometheusquery I can use is like `up{job='kubernetes-service', kubernetes_service_name=<service-name>}`.The problem of this way is, it only works if the `health` endpoint returns EMPTY content or prometheus METRICS format data. But to let a /health endpoint to return metrics is not proper way, so nowwe have to make it return empty content. Actually we want the '/health' endpoint to return some text like 'ok', but it will not work in prometheus.So I want to ask is my solution a proper way to monitoring kubernetes service status? If yes, does prometheus have a better way to support general health check endpoint like 'ok' response?Thanks!
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
Please take this question to the prometheus-users list.
On Thu, Feb 23, 2017 at 5:10 AM, Xiao Han <justl...@gmail.com> wrote:
Hi,I'm using prometheus with kubernetes in our production environment, it's greate and helpful. But I met some problem about monitoring the k8s Service status using prometheus.Here is the basic information and my problem in detail.I run prometheus inside k8s as a Pod, and using kubernetes_sd to find all pods and services, it's all good.Generally our application is running in Pod, and we create one Kubernetes Service for each application with two Pods replica. We have an health check endpoint like `/health` and it returns 200 OK.The thing I want to achieve is: create a dashboard showing the Service is running correctly, which mean up or down.The way I use now is configure prometheus with kubernetes_sd, role='service', and for each service, the endpoint to pull is like `http://<service-name>:<service-port>/health`, and the prometheusquery I can use is like `up{job='kubernetes-service', kubernetes_service_name=<service-name>}`.The problem of this way is, it only works if the `health` endpoint returns EMPTY content or prometheus METRICS format data. But to let a /health endpoint to return metrics is not proper way, so nowwe have to make it return empty content. Actually we want the '/health' endpoint to return some text like 'ok', but it will not work in prometheus.So I want to ask is my solution a proper way to monitoring kubernetes service status? If yes, does prometheus have a better way to support general health check endpoint like 'ok' response?Thanks!
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
Any update on this? I also have the same question.
On Thursday, February 23, 2017 at 1:18:39 AM UTC-8, Ben Kochie wrote:
Please take this question to the prometheus-users list.
On Thu, Feb 23, 2017 at 5:10 AM, Xiao Han <justl...@gmail.com> wrote:
Hi,I'm using prometheus with kubernetes in our production environment, it's greate and helpful. But I met some problem about monitoring the k8s Service status using prometheus.Here is the basic information and my problem in detail.I run prometheus inside k8s as a Pod, and using kubernetes_sd to find all pods and services, it's all good.Generally our application is running in Pod, and we create one Kubernetes Service for each application with two Pods replica. We have an health check endpoint like `/health` and it returns 200 OK.The thing I want to achieve is: create a dashboard showing the Service is running correctly, which mean up or down.The way I use now is configure prometheus with kubernetes_sd, role='service', and for each service, the endpoint to pull is like `http://<service-name>:<service-port>/health`, and the prometheusquery I can use is like `up{job='kubernetes-service', kubernetes_service_name=<service-name>}`.The problem of this way is, it only works if the `health` endpoint returns EMPTY content or prometheus METRICS format data. But to let a /health endpoint to return metrics is not proper way, so nowwe have to make it return empty content. Actually we want the '/health' endpoint to return some text like 'ok', but it will not work in prometheus.So I want to ask is my solution a proper way to monitoring kubernetes service status? If yes, does prometheus have a better way to support general health check endpoint like 'ok' response?Thanks!
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/5ef7a7cb-edda-4b89-93de-553430066149%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d9fbcd31-9ba4-4c32-b602-c31d3a9493a9%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/5ef7a7cb-edda-4b89-93de-553430066149%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks Simon. I have integrated with black box exporter. But I always see target probe status as 'UP'. also the UP metric shows 'UP' even if the corresponding pods are down. Am I missing something?
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscri...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/5ef7a7cb-edda-4b89-93de-553430066149%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d9fbcd31-9ba4-4c32-b602-c31d3a9493a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3d9a4d97-cb11-42b6-91a3-e571b453ed31%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To post to this group, send email to prometheus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/5ef7a7cb-edda-4b89-93de-553430066149%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d9fbcd31-9ba4-4c32-b602-c31d3a9493a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3d9a4d97-cb11-42b6-91a3-e571b453ed31%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/DM5PR2201MB170679907297948814C370ABF8570%40DM5PR2201MB1706.namprd22.prod.outlook.com.