Skip to content

Instantly share code, notes, and snippets.

@mustafaguven
Created December 9, 2020 07:34
Show Gist options
  • Save mustafaguven/0216231f6cce947cc931003d40505302 to your computer and use it in GitHub Desktop.
Save mustafaguven/0216231f6cce947cc931003d40505302 to your computer and use it in GitHub Desktop.
to publish in a loop
mvn clean spring-boot:run
# if the app is setup correctly the following should pull metrics compatible with prometheus
curl http://localhost:9080/actuator/prometheus
# to publish a message call
curl -XPOST -H "Content-Type: application/json" -d '{"text": "hello"}' http://localhost:9080/publish
# to publish in a loop
while true; do curl -XPOST -H "Content-Type: application/json" -d '{"text": "hello"}' http://localhost:9080/publish; sleep 1; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment