cruise-control
cruise-control copied to clipboard
VictoriaMetrics as prometheus.server.endpoint
Hello.
I use victoriametrics instead of prometheus. The endpoint URL of victoriametrics is vmselect-vmcluster-persistent.monitoring:8481/select/0/prometheus.
But if I set this endpoint in prometheus.server.endpoint option - I get error:
Invalid HTTP host: vmselect-vmcluster-persistent.monitoring:8481/select/0/prometheus for configuration Prometheus endpoint URI is malformed, expected schema://host:port, provided vmselect-vmcluster-persistent.monitoring:8481/select/0/prometheus
The only solution I found is to use nginx as a proxy server:
server {
...
location / {
proxy_pass http://vmselect-vmcluster-persistent.monitoring:8481/select/0/prometheus;
}
}
Thanks!
I am having a similar issue but using nginx is a less than ideal workaround.
In my cruisecontrol.properties
I have this configuration set:
# Prometheus Metric Sampler specific configuration
prometheus.server.endpoint=${env:PROMETHEUS_SERVER}
I am attempting to run cruise control in a docker container, so at docker run
time I provide the PROMETHEUS_SERVER
env variable. I have tried the following values:
PROMETHEUS_SERVER |
---|
http://127.17.0.2 |
http://127.17.0.2:9090 |
127.17.0.2:9090 |
myserver1:1234 |
http://myserver1:1234 |
All of these fail with this same error:
ERROR Uncaught exception on thread Thread[main,5,main] (com.linkedin.kafka.cruisecontrol.KafkaCruiseControlMain)
com.linkedin.cruisecontrol.common.config.ConfigException: Prometheus endpoint URI is malformed, expected schema://host:port, provided http://myserver1:9090
The cruise control version I am using is 2.5.70
.
Is this a known bug or do I have something misconfigured elsewhere?
I am also getting the same error as @GideonStowell when setting prometheus.server.endpoint=${env:PROMETHEUS_SERVER} as http://localhost:9090
in a local setup
I am using cruise-control-2.5.111
@clkelly-r7
I'm not sure if this will help you but it turned out that I have a trailing space in my cruisecontrol.properties
file, on the line where I was setting the Prometheus server endpoint. And for some reason that causes the endpoint validation to fail. Seems like this validation step should strip leading and trailing spaces, but it is what it is.
Hope this helps!
@GideonStowell that solved my issue as well, thank you!
Did create a PR that fixes that specific issue for me Please test it