Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Use Grafana to visualize kmesh perofrmance monitoring #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions content/en/docs/userguide/performance_monitoring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
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. Deploy bookinfo as sample application and sleep as curl client

3. 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)*

4. 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.