# Can I send metrics to existing web server, instead of starting separate server (start\_http\_server)

**URL:** <https://discuss.prometheus.io/t/can-i-send-metrics-to-existing-web-server-instead-of-starting-separate-server-start-http-server/1391>\
**Category:** Prometheus server\
**Created:** [January 12, 2023, 5:02am UTC](https://discuss.prometheus.io/t/can-i-send-metrics-to-existing-web-server-instead-of-starting-separate-server-start-http-server/1391 "2023-01-12T05:02:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![29swastik](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/29swastik/32/586_2.png) [@29swastik](https://discuss.prometheus.io/u/29swastik)\
**Post date:** [January 12, 2023, 5:02am UTC](https://discuss.prometheus.io/t/can-i-send-metrics-to-existing-web-server-instead-of-starting-separate-server-start-http-server/1391/1 "2023-01-12T05:02:35Z")

</div>

I’ve a python file running KafkaConsumer in infinite loop, there I want to increment prometheus counter whenever there is a failure while processing the consumed kafka message.

Here I don’t want run `start_http_server` because I already have one fastapi server running and I want to send my counter metric to that fastapi server instead of running separate `start_http_server`, how can I do that?

---

<div class="post-metadata">

**Author:** ![MosGeo](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@MosGeo](https://discuss.prometheus.io/u/MosGeo)\
**Post date:** [October 6, 2024, 6:47am UTC](https://discuss.prometheus.io/t/can-i-send-metrics-to-existing-web-server-instead-of-starting-separate-server-start-http-server/1391/2 "2024-10-06T06:47:36Z")

</div>

New to Prometheus here and just getting my head around the concepts and workflow. I am in the same boat (I think).

Edit:  
I believe myself and OP are thinking of things the wrong way now. In the Prometheus model, the Prometheus server scraps the data from the server running locally (it is a pull model), so we need a local server and the remote Prometheus server. In the Prometheus server, you have to define the ip and ports so it scraps the data.
