Referencing another service by its shortname
shxkm
PROOP

7 months ago

I have this prometheus.yml configuration:

global:
  scrape_interval: 15s
  evaluation_interval: 15s

rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

scrape_configs:
  # Prometheus self-monitoring (commented out for simplicity)
  # - job_name: 'prometheus'
  #   static_configs:
  #     - targets: ['prometheus:9090']

  # Scrape Django application metrics
  - job_name: 'django-app'
    static_configs:
      - targets: ['web']
    scheme: https
    metrics_path: '/metrics'
    basic_auth:
      username_file: /etc/prometheus/auth/username
      password_file: /etc/prometheus/auth/password
    scrape_interval: 15s
    scrape_timeout: 10s

web comes from another service where Railway says "you can call me web". However, I see "connection refused" errors in prometheus UI.

Solved

6 Replies

shxkm
PROOP

7 months ago

715a154f-c769-440d-9dad-373a1d7efafe


shxkm
PROOP

7 months ago

OK, so I read I shouldn't use https. But I doubt this will help.


7 months ago

Is the web service listening on IPv6? I also notice you did not specify a port?


shxkm
PROOP

7 months ago

yep, it's working now. Thanks.


7 months ago

Awesome!


7 months ago

!s


Status changed to Solved brody 7 months ago


Loading...