rakutentech / shibuya

Apache License 2.0
24 stars 9 forks source link

feat: Enable engine metrics exposing in the agent #112

Closed iandyh closed 1 month ago

iandyh commented 3 months ago

This will be the first PR for distributed mode phase 2 release. In this PR, we add the /metrics to the http handler so it will expose the metrics created by the Jmeter.

This new version of Jmeter will be backwards compatible so we can firstly release it. Controller side development will require more time.

In addition, we also want to achieve following items:

Above todos will be addressed by this PR: https://github.com/rakutentech/shibuya/pull/113

muthuv1 commented 1 month ago

Hi @iandyh , I could deploy this in local, can i know the /metrics will work on engines pod ?

` $ kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES db-7d6cd75887-sdk7n 1/1 Running 0 46m 10.244.0.6 shibuya-control-plane engine-1-1-1-0 1/1 Running 0 37m 10.244.0.14 shibuya-control-plane engine-1-1-1-1 1/1 Running 0 37m 10.244.0.13 shibuya-control-plane grafana-7596b4bf88-dfnr5 1/1 Running 0 45m 10.244.0.8 shibuya-control-plane ig-1-6dd594b8cf-h9vhj 1/1 Running 0 37m 10.244.0.12 shibuya-control-plane prometheus-76d4bf8557-44zvq 1/1 Running 0 46m 10.244.0.7 shibuya-control-plane shibuya-apiserver-local-797d94645d-snjkj 1/1 Running 3 (44m ago) 45m 10.244.0.9 shibuya-control-plane shibuya-controller-local-75f747fc97-mkwfc 1/1 Running 3 (44m ago) 45m 10.244.0.10 shibuya-control-plane storage-65cdfb8688-lcq8m 1/1 Running 0 44m 10.244.0.11 shibuya-control-plane

$ kubectl get svc -o wide -l project=1 NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR engine-1-1-1 ClusterIP None 80/TCP 73m collection=1,kind=executor,plan=1,project=1 ig-1 ClusterIP 10.96.89.209 80/TCP 73m kind=ingress-controller,project=1

$ curl -v http://10.244.0.14/metrics

iandyh commented 1 month ago

@muthuv1 You need to go into the pod first

kubectl exec -it pod bash

Then

curl localhost:8080/metrics and search for shibuya metrics.