Skip to content

Application Matrix for Prometheus using Micrometer

Notifications You must be signed in to change notification settings

alokkusingh/app-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

app-matrix

Some description

Table of Contents

Created by Alok Singh

Docker Build

Build Docker Image

For ARM64 V8 Processor

cd app-matrix
docker build -t alokkusingh/app-matrix:arm64v8 --build-arg JAR_FILE=target/app-matrix-0.0.1-SNAPSHOT.jar --build-arg ARCH=arm64v8/ .
docker push alokkusingh/app-matrix:arm64v8

For AMD64 Processor

cd app-matrix
docker build -t alokkusingh/app-matrix:amd64 --build-arg JAR_FILE=target/app-matrix-0.0.1-SNAPSHOT.jar --build-arg ARCH=amd64/ .
docker push alokkusingh/app-matrix:amd64

Docker Run

Run the application by executing following command

For ARM64 V8 Processor based environment

docker run --rm --name app-matrix -p 8080:8080 alokkusingh/app-matrix:arm64v8

For AMD64 Processor based environment

docker run --rm --name app-matrix -p 8080:8080 alokkusingh/app-matrix:amd64

Kubernetes Deployment

Create Namespace

kubectl apply -f yaml/monitoring-namespace.yaml

Deploy Hello Service

kubectl apply -f yaml/hello-service-config.yaml
kubectl apply -f yaml/hello-service-deploy.yaml

Auto Scale

kubectl autoscale deployment hello-service --min=2 --max=3 --cpu-percent=80 -n monitoring

Deploy Prometheus

kubectl apply -f yaml/prometheus-config.yaml
kubectl apply -f yaml/prometheus-roles.yml
kubectl apply -f yaml/prometheus-deployment.yaml

Deploy Grafana

kubectl apply -f yaml/grafana.yaml

Monitoring Commands

kubectl get ep hello-service -n monitoring
kubectl describe svc hello-service -n monitoring

kubectl logs pod/hello-service-c668fb66-jtf97 app-matrix -n monitoring
kubectl logs pod/prometheus-c6d5c4d95-2c59b prometheus -n monitoring

kubectl describe pod/grafana-756fb84d84-b8mzm -n monitoring

kubectl get all -n monitoring

Undeploy All

kubectl delete namespace monitoring

Available APIs

Hello Service

GET http://jgte:30080/hello/app/hello/greet

Prometheus Dashboard

GET http://jgte:30900/

Grafana

GET http://jgte:3000/login