module
Version:
v0.0.0-...-c6ccb82
Opens a new window with list of versions in this module.
Published: Aug 5, 2023
License: MIT
Opens a new window with license information.
README
¶
golang
Example project to collect metrics from clients over gRPC.
Build
-
Requires: go
, gcc
, make
, podman
-
make setup
to install the build tools
-
make builder
to build the builder image
-
make build
to build
-
make check
to run the checkers
-
make images
to build the images
Deploy
-
cd deploy
-
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
-
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
-
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
-
Deploy http service
kubectl apply -f http-deployment.yaml
kubectl apply -f http-service.yaml
kubectl apply -f http-ingress.yaml
-
Deploy grpc service
kubectl apply -f server-deployment.yaml
kubectl apply -f server-service.yaml
Collect metrics
-
./bin/client | jq .msg
to run the client
-
Navigate to /grafana
and open the Client Metrics dashboard
Directories
¶
cmd
|
|
|
Command client |
|
Command server |
|
Command http |
Package internal is an internal package
|
Package internal is an internal package |
grpc
Package grpc handles the grpc connection
|
Package grpc handles the grpc connection |
proto
|
|
|
|
Click to show internal directories.
Click to hide internal directories.