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

ServiceMonitor doens't work out of the box #258

Open
maxpain opened this issue Nov 3, 2024 · 4 comments
Open

ServiceMonitor doens't work out of the box #258

maxpain opened this issue Nov 3, 2024 · 4 comments
Assignees

Comments

@maxpain
Copy link

maxpain commented Nov 3, 2024

Hello. I've deployed the dragonfly-operator Helm chart with the following values:

serviceMonitor:
  enabled: true

But my VMAgent can't scrape metrics:

unexpected status code returned when scraping "http://10.244.2.242:8443/metrics": 400; expecting 200; response body: "Client sent an HTTP request to an HTTPS server.\n"
@Pothulapati
Copy link
Collaborator

Thanks for reporting!

I can try testing it out, but in the meanwhile we have something tested around metric collection of Dragonfly at https://www.dragonflydb.io/docs/managing-dragonfly/operator/prometheus-guide

@joggeli34
Copy link

We are facing the same problem.

As far as I see, the ServiceMonitor is targeting the port 8443 where as in the pod configuration the parameter --metrics-bind-address=127.0.0.1:8080 is set with a other port.

@jonathon2nd
Copy link

Also see: #242

@Pothulapati Pothulapati self-assigned this Dec 11, 2024
@nikatar
Copy link

nikatar commented Dec 17, 2024

I have this problem too

To fix it, you need to change the logic:

  1. start operator pod with -metrics-bind-address=0.0.0.0:8080
  2. this port(8080) must set in ports of deployment
  3. serviceMonitor is targeted to this port

And why don't you use podMonitor instead serviceMonitor? This operator deployment doesn't seem to require the service, as it doesn't accept traffic.

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

5 participants