No, i am not able to access the Prometheus URL with
ip Address (curl -q -6 -g http://[240b:c0e0:101:54e2::5b]:9270/metrics) but when when i am trying with local host in (curl -q -6 -g localhost:9270/metrics) it is working as expected
Add the prometheus.ip=0.0.0.0 in user.properties file of JMeter at apache-jmeter/bin
If you want to run Prometheus on a different machine, use the attached Prometheus_jmeter.yml in the VM(assume VM ip address is XX.XX.XX.XXX) to run the Prometheus.
Run below docker command to get the Prometheus image from docker hub and volume the Prometheus_jmeter.yml file in VM to Prometheus container.
docker run --net=host -d /Prometheus_jmeter.yml:/etc/prometheus/prometheus.yml prom/Prometheus
-On local machine, run the JMeter file which has Prometheus listener in it.
Do the Port Forwarding from your local machine JMeter port to remote machine using below command
ssh -R 9270:localhost:9270 usernameofVM@XX.XX.XX.XXX
In your remote machine (VM) run the below command to verify that the port forwarding is working. You can to see all the Prometheus metrics show up in remote machine.
curl -v localhost:9270
If you setup the Prometheus server at one place. You can run the Jmeter test from any where if you use the Remote port forward and with adding the "--net=host" while getting the prometheus docker image.
Let me know if you have any questions. you can reach out to me for more details at santoshi.nitya@gmail.com
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
No, i am not able to access the Prometheus URL with
ip Address (curl -q -6 -g http://[240b:c0e0:101:54e2::5b]:9270/metrics) but when when i am trying with local host in (curl -q -6 -g localhost:9270/metrics) it is working as expected
dev-to-uploads.s3.amazonaws.com/i/...
Please find the error screen shot
Why there is a square bracket in your URL?
Where are those properties stored? It should be in the user.properties.
with out square brace's i am facing this error
curl -q -6 -g 240b:c0e0:101:54e2::5b:9270/metrics
curl: (3) IPv6 numerical address used in URL without brackets error
[2]+ Exit 1
Not sure about the property remote hosts. Probably you can remove and try only with the Prometheus IP.
as per your comment i removed the remote hosts and tried even though facing the connection refused error
dev-to-uploads.s3.amazonaws.com/i/...
Where are those properties stored? It should be in the user.properties. ---- it means????
can you please let me know if any other way to sort out this issue
Thanks
I am having the same issue, when I try to use external IP? Do you have any pointers for me?
Sorry, I do not have a Docker environment to reproduce the issue. Can you please raise the issue in GitHub?
I solved this issue. I can provide you details if you want
Great, please do share, let me add it to my blog and quote you :)
Sure I will share the solution over the weekend
Many thanks :)
Add the prometheus.ip=0.0.0.0 in user.properties file of JMeter at apache-jmeter/bin
If you want to run Prometheus on a different machine, use the attached Prometheus_jmeter.yml in the VM(assume VM ip address is XX.XX.XX.XXX) to run the Prometheus.
Run below docker command to get the Prometheus image from docker hub and volume the Prometheus_jmeter.yml file in VM to Prometheus container.
-On local machine, run the JMeter file which has Prometheus listener in it.
Do the Port Forwarding from your local machine JMeter port to remote machine using below command
ssh -R 9270:localhost:9270 usernameofVM@XX.XX.XX.XXX
In your remote machine (VM) run the below command to verify that the port forwarding is working. You can to see all the Prometheus metrics show up in remote machine.
curl -v localhost:9270
You can checks all the targets by using this XX.XX.XX.XXX:9090/targets
Yml file:
scrape_configs:
If you setup the Prometheus server at one place. You can run the Jmeter test from any where if you use the Remote port forward and with adding the "--net=host" while getting the prometheus docker image.
Let me know if you have any questions. you can reach out to me for more details at santoshi.nitya@gmail.com