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

Prometheus Exporter should support port range #172

Closed
cgrinds opened this issue Jun 15, 2021 · 3 comments · Fixed by #175, #218 or #229
Closed

Prometheus Exporter should support port range #172

cgrinds opened this issue Jun 15, 2021 · 3 comments · Fixed by #175, #218 or #229
Labels
feature New feature or request status/done

Comments

@cgrinds
Copy link
Collaborator

cgrinds commented Jun 15, 2021

Port Range Prometheus

This solution works well for systemd, native, and containers and

  • reduces duplication
  • is copy/paste friendly
  • much easier to manage

It looks like this:

Exporters:
  prometheus1:
    exporter: Prometheus
    addr: 0.0.0.0
    port_range: 2000-2030
Pollers:
  cluster-01:
    exporters:
    - prometheus1
  cluster-02:
    exporters:
    - prometheus1
  cluster-03:
    exporters:
    - prometheus1

A port range is [inclusive, inclusive] and deterministic. In the example above, cluster-01 will always be assigned port 2000, while cluster-03 will be assigned 2003.

Validate ranges as part of doctor, overflow, overlap, etc.

It probably still make sense to generate the Prometheus target.yml per file SD discussion, but the port range makes that more deterministic.

@rahulguptajss
Copy link
Contributor

rahulguptajss commented Jun 15, 2021

  • Feature Development
  • Unit test cases
  • Documentation Update
  • Add harvest doctor validation

@rahulguptajss
Copy link
Contributor

@cgrinds could pls take a look at required doc changes for port_range. All other stories are done.

@cgrinds
Copy link
Collaborator Author

cgrinds commented Jun 24, 2021

Verified on sridevimm RHEL8 system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request status/done
Projects
None yet
3 participants