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

Expose promExporter to service or Prometheus could not scrape #877

Open
duylddev opened this issue Mar 18, 2024 · 5 comments
Open

Expose promExporter to service or Prometheus could not scrape #877

duylddev opened this issue Mar 18, 2024 · 5 comments
Labels
proposal Enhancement idea or proposal

Comments

@duylddev
Copy link

What motivated this proposal?

promExporter port 777 should expose to nats service so Prometheus can scrape

What is the proposed change?

  service:
    ports:
      monitor:
        enabled: true

should add promExporter: enabled: true here

Who benefits from this change?

Who doesn't want to install prometheus-nats-exporter from https://prometheus-community.github.io/helm-charts
and can use embedded pod by set enable = true

What alternatives have you evaluated?

I must write a new service to expose prompExporter 777 and update Prometheuse scrape config

@duylddev duylddev added the proposal Enhancement idea or proposal label Mar 18, 2024
@caleblloyd
Copy link
Collaborator

It's already enabled via the headless service, example: nats-headless:7777 Also you want to scrape each pod, not just 1 pod via a ClusterIP Service.

@duylddev
Copy link
Author

Thank you for the really fast reply
I run wget in Prometheus and it works

What makes me confused is port 7777 isn't listed in the headless service port table. But looks like it doesn't matter, we still can connect to all ports anyway
image

@caleblloyd
Copy link
Collaborator

Ah, maybe we should go ahead and add it to the Headless Service port list if its enabled then. If you're not doing any network policy it should still work though.

@duylddev
Copy link
Author

duylddev commented Mar 19, 2024

I have 1 more question about promExporter.
Is it compatible with Grafana Nats template?
https://grafana.com/grafana/dashboards/2279-nats-servers/

The thing is when I install a new chart from
https://artifacthub.io/packages/helm/prometheus-community/prometheus-nats-exporter
Grafana works fine.

But if I use embedded promExporter, Grafana always shows no data

@duylddev
Copy link
Author

more information:
Prometheus scape works fine:
image

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

No branches or pull requests

2 participants