Hello everyone,

I've written an TCP server in Python and I want to send some custom metrics 
to Prometheus hosted in Kubernetes.

As in the documentation on Github I've initialized several custom metrics 
and after that I call start_http_server(8000) to host these metrics. I 
created a docker image and when I run this docker image, it doesn't show 
metrics when I go to port 8000 (It fails to load). However when I send a 
request to the TCP server and process it, it will show the metrics on port 
8000 but if I then refresh the page it fails to load.

I guess that the TCP server is somehow interfering with the 
start_http_server(8000), but I'm not sure what is going wrong. Does anyone 
know how I could solve this or a different way to get the metrics to 
Prometheus? My code looks like the code below:
 
*start_http_server(8000)*



*try:   while True:    #** if there is a connection, process it and update 
metrics*
*except:*
  # handle exceptions

Thanks,
André

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/1e9d40b3-d342-40e6-846f-64dedcebb8d3n%40googlegroups.com.

Reply via email to