bijukunjummen / micrometer-prom-graf-sample

Sample demonstrating micrometer with prometheus and grafana

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A sample demonstrating Micrometer with Prometheus and Grafana

Using Docker

First create the image for the app using. This uses the Jib gradle plugin:

./gradlew jibDockerBuild

and then

docker-compose up

A helper UI to send sample requests to the app will be available at http://<dockerip>:8080/index.html

Graphana at http://<dockerip>:3000 and login with admin/admin credentials and Prometheus at http://<dockerip>:9090

Without Docker

Sample Service App

./gradlew -p applications/sample-service-app clean bootRun

Testing

Assuming that httpie is installed

http POST 'http://localhost:8080/messages' id="1" payload="one"   delay="1000"

OR with CURL

curl -X "POST" "http://localhost:8080/messages" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -d $'{
  "id": "1",
  "payload": "one",
  "delay": "1000"
}'

Generating load

A gatling based load can be sent to the app using:

./gradlew -p applications/load-scripts  -DTARGET_URL=http://localhost:8080 gatlingRun

About

Sample demonstrating micrometer with prometheus and grafana


Languages

Language:TypeScript 44.0%Language:Kotlin 18.4%Language:HTML 15.6%Language:Scala 10.6%Language:JavaScript 6.6%Language:Java 4.0%Language:CSS 0.7%