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

Imposible to use the proxy: Proxy error for module 'module_name': dial tcp 127.0.0.1:9531: connect: connection refused #104

Open
Tr3yWay996 opened this issue Dec 8, 2024 · 3 comments

Comments

@Tr3yWay996
Copy link

All is in the title, whenever I go over the exporter module I made, any of the two, it returns this error with its corresponding port.
I can see it tries to access 127.0.0.1 but idk how to change it to 10.0.0.235.
Anyone can help ? I really need two diff exports on one Prometheus install for two dashboards on Grafana

@britcey
Copy link
Contributor

britcey commented Dec 13, 2024

It'd help if you shared your config.

I think you're asking for something like:

---
module_name:
  method: http
  http:
    address: 10.0.0.235
    port: 9531

@Tr3yWay996
Copy link
Author

It'd help if you shared your config.

I think you're asking for something like:

---
module_name:
  method: http
  http:
    address: 10.0.0.235
    port: 9531

Honestly I'm sorry for forgetting to give anything else for you guys to help me, I've been quite busy, but this is my config for the expexp.yaml file

defaultModule: pterodactyl # called if "module" param is not supplied
modules:
  pterodactyl:
    method: http
    http:
       port: 9531

  MCstats:
    method: http
    http:
       port: 19565

And my Prometheus config is the following:

# my global config
global:
  scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
    - static_configs:
        - targets:
          # - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  - job_name: 'expexp_metrics'
    scrape_interval: 1s
    static_configs:
      - targets: ['localhost:9999']
  - job_name: 'pterodactyl'
    scrape_interval: 1s
    metrics_path: /proxy
    params:
      module:
        - cadvisor
    static_configs:
      - targets: ['localhost:9531']
  - job_name: 'MCstats'
    scrape_interval: 1s
    metrics_path: /proxy
    params:
      module:
        - mtail
    static_configs:
      - targets: ['localhost:19565']

@Tr3yWay996
Copy link
Author

Tr3yWay996 commented Dec 18, 2024

I see that you added address: 10.0.0.235 and i don't have that, I will try it with and come back
Yeahh it works now if i go on the proxy and pterodactyl output it retrieves the correct one, now i need Prometheus for Grafana tho hmm

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