Skip to content

basic client-server grpc metrics

License

Notifications You must be signed in to change notification settings

tyholling/golang

Repository files navigation

golang

Example project to collect metrics from clients over gRPC.

Build

  1. Requires: go, gcc, make, podman

  2. make setup to install the build tools

  3. make builder to build the builder image

  4. make build to build

  5. make check to run the checkers

  6. make images to build the images

Deploy

  1. cd deploy

  2. Install ingress-nginx

     kubectl create namespace ingress-nginx
     helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
     helm install ingress-nginx ingress-nginx/ingress-nginx -n ingress-nginx
    
  3. Install prometheus

     helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
     helm install prometheus prometheus-community/prometheus -f prometheus-values.yaml
     kubectl apply -f prometheus-ingress.yaml
    
  4. Install grafana

     helm repo add grafana https://grafana.github.io/helm-charts
     helm install grafana grafana/grafana -f grafana-values.yaml \
     --set-file dashboards.default.client-metrics.json=client-metrics.json
     kubectl apply -f grafana-ingress.yaml
     kubectl get secret grafana -o jsonpath="{.data.admin-password}" | base64 --decode; echo
    
  5. Deploy http service

     kubectl apply -f http-deployment.yaml
     kubectl apply -f http-service.yaml
     kubectl apply -f http-ingress.yaml
    
  6. Deploy grpc service

     kubectl apply -f server-deployment.yaml
     kubectl apply -f server-service.yaml
    

Collect metrics

  1. ./bin/client | jq .msg to run the client

  2. Navigate to /grafana and open the Client Metrics dashboard

About

basic client-server grpc metrics

Resources

License

Stars

Watchers

Forks