我已经在docker中连接了grafana和prometheus,但是为什么我的crud应用在prometheus中没有显示?
我的码头工人撰写
crud:
build:
context: .
container_name: crud_app
env_file:
- .env-non-dev
depends_on:
- db
- redis
command: sh -c "alembic upgrade head && gunicorn main:app --workers 1 --worker-class uvicorn.workers.UvicornWorker --bind=0.0.0.0:8000"
ports:
- 7777:8000
prometheus:
image: prom/prometheus:v2.43.0
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yaml
- prometheusdata:/prometheus
restart: unless-stopped
ports:
- 9090:9090
我的普罗米修斯.yml
global:
scrape_interval: 15s
external_labels:
monitor: 'codelab-monitor'
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: 'crud'
scrape_interval: 5s
static_configs:
- targets: ['crud:8000']
当我连接到 127.0.0.1:9090 时,普罗米修斯只有一个指标 http://localhost:9090/metrics,并且没有我的 crud/metrics
我尝试了 CRUD:8000 指定 127.0.0.1:8000
无论您正在经历什么,都应该只是暂时的,但如果持续太久,那么您应该寻求精神祈祷和支持。我的故事可能会激励您,但相信我,您的故事可能是其他人正在寻找的光明。由于过去的业力,我和我的伴侣的生活几乎发生了错误。感谢曼德拉博士的精神祈祷和支持。很多人因为没有找到正确的道路而挣扎,你可能在祈祷,但仍然没有得到你应得的祝福和答案。由于违背诺言和挫折,我几乎离开了我的关系,但今天的生活很棒,如果我们能有一点信心并尝试解决问题,你现在的伴侣可能会成为你的灵魂伴侣。让你的生活重归于好,可能是经济挫折、婚姻破裂、感情危机 WhatsApp Dr Mandla (Plus 27723985283 ) 寻求精神突破。