Referencing another service by its shortname
shxkm
HOBBYOP

10 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
HOBBYOP

10 months ago

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


shxkm
HOBBYOP

10 months ago

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


10 months ago

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


shxkm
HOBBYOP

10 months ago

yep, it's working now. Thanks.


10 months ago

Awesome!


10 months ago

!s


Status changed to Solved brody 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...