Raf*_*afa 6 python monitoring prometheus
我正在运行一个地址为 127.0.0.1:5000 的 Web 应用程序,并使用 Prometheus 的 python 客户端库。我使用他们文档start_http_server(8000)
中的示例来公开该端口上的指标。应用程序运行,但当我尝试点击 localhost:8000 时,我发现它没有连接到任何东西。[Errno 48] Address already in use
如果我无法从一个 Web 应用程序启动两台服务器,那么我应该传递到哪个端口start_http_server()
才能公开指标?
在启动应用程序之前,两个端口上都没有运行任何内容。