Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use different port #41

Open
stefangweichinger opened this issue Oct 16, 2023 · 2 comments
Open

use different port #41

stefangweichinger opened this issue Oct 16, 2023 · 2 comments

Comments

@stefangweichinger
Copy link

Could you provide an example how to run the container within docker-compose and a different port?

I try:

##  docker-compose.yml
  ssllabs-exporter:
    image: anasaso/ssllabs_exporter:latest
    ports:
      - 9193:19115
    restart: always
    networks:
      - back-tier
      - front-tier 

and I get metrics on http://localhost:9193/metrics

Im prometheus.yml:

  - job_name: 'ssllabs-exporter'
    scrape_interval: 10m
    scrape_timeout: 10m
    metrics_path: /probe
    static_configs:
      - targets:
        - github.com
        - ssllabs.com
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - target_label: __address__
        replacement: 'ssllabs-exporter:9193'  # change this to the FQDN of ssllabs-exporter
      - source_labels: [__param_target]
        target_label: instance

I wonder if the tabs are correct in the example ... and if my quoting of the FQDN:PORT should work.

@stefangweichinger
Copy link
Author

I removed the quotes.

I get from alertmanager:

Labels
alertname = service_down
instance = my.tld
job = ssllabs-exporter
monitor = my-project
severity = page
Annotations
description = my.tld of job ssllabs-exporter has been down for more than 2 minutes.
summary = Instance my.tld down

@anas-aso
Copy link
Owner

I get metrics on http://localhost:9193/metrics

@stefangweichinger I suppose you are also running Prometheus in a docker container. If it's the case, can you run curl http://ssllabs-exporter:9193/metrics from WITHIN the Prometheus container ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants