forked from kmesh-net/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kmesh-net#77 from skwwwwww/kmesh-performance-monit…
…oring Add Use Grafana to visualize kmesh perofrmance monitoring
- Loading branch information
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
draft: false | ||
linktitle: Use Grafana to visualize kmesh perofrmance monitoring | ||
menu: | ||
docs: | ||
parent: user guide | ||
weight: 19 | ||
title: Use Grafana to visualize kmesh perofrmance monitoring | ||
toc: true | ||
type: docs | ||
|
||
--- | ||
|
||
### Preparation | ||
|
||
1. Make default namespace managed by Kmesh | ||
|
||
2. Set relevant args | ||
|
||
Modify bpf/kmesh/probes/performance_probe.h by changing #define PERF_MONITOR 0 to #define PERF_MONITOR 1. | ||
Change --enable-perfmonitor=false to --enable-perfmonitor=true in deploy/yaml/kmesh.yaml. | ||
|
||
3. Deploy bookinfo as sample application and sleep as curl client | ||
|
||
4. Install namespace granularity waypoint for default namespace | ||
|
||
*The above steps could refer to [Install Waypoint | Kmesh](https://kmesh.net/en/docs/userguide/install_waypoint/#preparation)* | ||
|
||
5. Deploy prometheus and garafana: | ||
|
||
```bash | ||
[root@ ~]# kubectl apply -f https://raw.githubusercontent.com/kmesh-net/kmesh/main/samples/addons/prometheus.yaml | ||
[root@ ~]# kubectl apply -f https://raw.githubusercontent.com/kmesh-net/kmesh/main/samples/addons/grafana.yaml | ||
``` | ||
### Generate some continuous traffic between applications in the mesh | ||
|
||
```bash | ||
[root@ ~]# kubectl exec deploy/sleep -- sh -c "while true; do curl -s http://productpage:9080/productpage | grep reviews-v.-; sleep 1; done" | ||
``` | ||
### Use grafana to visualize kmesh performance monitoring | ||
|
||
1. Use the port-forward command to forward traffic to grafana: | ||
|
||
```bash | ||
[root@ ~]# kubectl port-forward --address 0.0.0.0 svc/grafana 3000:3000 -n kmesh-system | ||
Forwarding from 0.0.0.0:3000 -> 3000 | ||
``` | ||
|
||
2. View the dashboard from browser | ||
|
||
Visit `Dashboards>Kmesh>Kmesh performance monitoring`: | ||
|
||
<div align="center"> | ||
<img src="/docs/userguide/kmesh_deamon_monitoring.jpg" width="1400" /> | ||
<img src="/docs/userguide/kmesh_map_and_operation_monitoring.jpg" width="1400" /> | ||
</div> | ||
|
||
### Cleanup | ||
|
||
1. Remove prometheus and grafana: | ||
|
||
```bash | ||
[root@ ~]# kubectl delete -f https://raw.githubusercontent.com/kmesh-net/kmesh/main/samples/addons/prometheus.yaml | ||
[root@ ~]# kubectl delete -f https://raw.githubusercontent.com/kmesh-net/kmesh/main/samples/addons/grafana.yaml | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.