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?
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.