Skip to content

Commit c1f808e

Browse files
authored
Merge branch 'main' into merge-gateways
2 parents f593c80 + 23c91a6 commit c1f808e

File tree

8 files changed

+4914
-0
lines changed

8 files changed

+4914
-0
lines changed

examples/grafana/dashboards/envoy-clusters.json

Lines changed: 1645 additions & 0 deletions
Large diffs are not rendered by default.

examples/grafana/dashboards/envoy-global.json

Lines changed: 2968 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
{
2+
"annotations": {
3+
"list": [
4+
{
5+
"builtIn": 1,
6+
"datasource": {
7+
"type": "grafana",
8+
"uid": "-- Grafana --"
9+
},
10+
"enable": true,
11+
"hide": true,
12+
"iconColor": "rgba(0, 211, 255, 1)",
13+
"name": "Annotations & Alerts",
14+
"type": "dashboard"
15+
}
16+
]
17+
},
18+
"editable": true,
19+
"fiscalYearStartMonth": 0,
20+
"graphTooltip": 0,
21+
"id": 6,
22+
"links": [],
23+
"liveNow": false,
24+
"panels": [
25+
{
26+
"datasource": {
27+
"type": "prometheus",
28+
"uid": "PBFA97CFB590B2093"
29+
},
30+
"fieldConfig": {
31+
"defaults": {
32+
"color": {
33+
"mode": "palette-classic"
34+
},
35+
"custom": {
36+
"axisCenteredZero": false,
37+
"axisColorMode": "text",
38+
"axisLabel": "",
39+
"axisPlacement": "auto",
40+
"barAlignment": 0,
41+
"drawStyle": "line",
42+
"fillOpacity": 0,
43+
"gradientMode": "none",
44+
"hideFrom": {
45+
"legend": false,
46+
"tooltip": false,
47+
"viz": false
48+
},
49+
"lineInterpolation": "linear",
50+
"lineWidth": 1,
51+
"pointSize": 5,
52+
"scaleDistribution": {
53+
"type": "linear"
54+
},
55+
"showPoints": "auto",
56+
"spanNulls": false,
57+
"stacking": {
58+
"group": "A",
59+
"mode": "none"
60+
},
61+
"thresholdsStyle": {
62+
"mode": "off"
63+
}
64+
},
65+
"mappings": [],
66+
"thresholds": {
67+
"mode": "absolute",
68+
"steps": [
69+
{
70+
"color": "green",
71+
"value": null
72+
},
73+
{
74+
"color": "red",
75+
"value": 80
76+
}
77+
]
78+
}
79+
},
80+
"overrides": []
81+
},
82+
"gridPos": {
83+
"h": 8,
84+
"w": 12,
85+
"x": 0,
86+
"y": 0
87+
},
88+
"id": 2,
89+
"options": {
90+
"legend": {
91+
"calcs": [],
92+
"displayMode": "list",
93+
"placement": "bottom",
94+
"showLegend": true
95+
},
96+
"tooltip": {
97+
"mode": "single",
98+
"sort": "none"
99+
}
100+
},
101+
"targets": [
102+
{
103+
"datasource": {
104+
"type": "prometheus",
105+
"uid": "PBFA97CFB590B2093"
106+
},
107+
"editorMode": "code",
108+
"exemplar": false,
109+
"expr": "sum by(pod) (container_memory_working_set_bytes{container=~\"envoy\"}/1000000)",
110+
"instant": false,
111+
"range": true,
112+
"refId": "A"
113+
}
114+
],
115+
"title": "Memory Working Set Envoy Pods(mb)",
116+
"transformations": [],
117+
"type": "timeseries"
118+
},
119+
{
120+
"datasource": {
121+
"type": "prometheus",
122+
"uid": "PBFA97CFB590B2093"
123+
},
124+
"fieldConfig": {
125+
"defaults": {
126+
"color": {
127+
"mode": "palette-classic"
128+
},
129+
"custom": {
130+
"axisCenteredZero": false,
131+
"axisColorMode": "text",
132+
"axisLabel": "",
133+
"axisPlacement": "auto",
134+
"barAlignment": 0,
135+
"drawStyle": "line",
136+
"fillOpacity": 0,
137+
"gradientMode": "none",
138+
"hideFrom": {
139+
"legend": false,
140+
"tooltip": false,
141+
"viz": false
142+
},
143+
"lineInterpolation": "linear",
144+
"lineWidth": 1,
145+
"pointSize": 5,
146+
"scaleDistribution": {
147+
"type": "linear"
148+
},
149+
"showPoints": "auto",
150+
"spanNulls": false,
151+
"stacking": {
152+
"group": "A",
153+
"mode": "none"
154+
},
155+
"thresholdsStyle": {
156+
"mode": "off"
157+
}
158+
},
159+
"mappings": [],
160+
"thresholds": {
161+
"mode": "absolute",
162+
"steps": [
163+
{
164+
"color": "green",
165+
"value": null
166+
},
167+
{
168+
"color": "red",
169+
"value": 80
170+
}
171+
]
172+
}
173+
},
174+
"overrides": []
175+
},
176+
"gridPos": {
177+
"h": 8,
178+
"w": 12,
179+
"x": 12,
180+
"y": 0
181+
},
182+
"id": 1,
183+
"options": {
184+
"legend": {
185+
"calcs": [],
186+
"displayMode": "list",
187+
"placement": "bottom",
188+
"showLegend": true
189+
},
190+
"tooltip": {
191+
"mode": "single",
192+
"sort": "none"
193+
}
194+
},
195+
"targets": [
196+
{
197+
"datasource": {
198+
"type": "prometheus",
199+
"uid": "PBFA97CFB590B2093"
200+
},
201+
"editorMode": "builder",
202+
"expr": "sum by(pod) (rate(container_cpu_usage_seconds_total{container=\"envoy\"}[5m]))",
203+
"instant": false,
204+
"range": true,
205+
"refId": "A"
206+
}
207+
],
208+
"title": "CPU Usage Envoy Pods",
209+
"type": "timeseries"
210+
}
211+
],
212+
"refresh": "",
213+
"schemaVersion": 38,
214+
"style": "dark",
215+
"tags": [],
216+
"templating": {
217+
"list": []
218+
},
219+
"time": {
220+
"from": "now-5m",
221+
"to": "now"
222+
},
223+
"timepicker": {},
224+
"timezone": "",
225+
"title": "Envoy Pod Memory and CPU Usage",
226+
"uid": "f2279235-80b7-4c85-84f4-f25a3bf3eac0",
227+
"version": 2,
228+
"weekStart": ""
229+
}

examples/grafana/helm-values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
datasources:
2+
datasources.yaml:
3+
apiVersion: 1
4+
datasources:
5+
- name: Prometheus
6+
type: prometheus
7+
url: http://prometheus-server
8+
9+
adminPassword: admin
10+
11+
service:
12+
type: LoadBalancer
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: "Visualising metrics using Grafana"
3+
---
4+
# Visualising metrics using Grafana
5+
6+
Envoy Gateway provides support for exposing Envoy Proxy metrics to a Prometheus instance.
7+
This guide shows you how to visualise the metrics exposed to prometheus using grafana.
8+
9+
## Prerequisites
10+
11+
Follow the steps from the [Quickstart Guide](quickstart.md) to install Envoy Gateway and the example manifest.
12+
Before proceeding, you should be able to query the example backend using HTTP.
13+
14+
Follow the steps from the [Proxy Observability](proxy-observability.md#Metrics) to enable prometheus metrics.
15+
16+
[Prometheus](https://prometheus.io) is used to scrape metrics from the Envoy Proxy instances. Install Prometheus:
17+
18+
```shell
19+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
20+
helm repo update
21+
helm upgrade --install prometheus prometheus-community/prometheus -n monitoring --create-namespace
22+
```
23+
24+
[Grafana](https://grafana.com/grafana/) is used to visualise the metrics exposed by the envoy proxy instances.
25+
Install Grafana:
26+
27+
```shell
28+
helm repo add grafana https://grafana.github.io/helm-charts
29+
helm repo update
30+
helm upgrade --install grafana grafana/grafana -f https://raw.githubusercontent.com/envoyproxy/gateway/latest/examples/grafana/helm-values.yaml -n monitoring --create-namespace
31+
```
32+
33+
Expose endpoints:
34+
35+
```shell
36+
GRAFANA_IP=$(kubectl get svc grafana -n monitoring -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
37+
```
38+
39+
## Connecting Grafana with Prometheus datasource
40+
To visualise metrics from Prometheus, we have to connect Grafana with Prometheus. If you installed Grafana from the command
41+
from prerequisites sections, the prometheus datasource should be already configured.
42+
43+
You can also add the data source manually by following the instructions from [Grafana Docs](https://grafana.com/docs/grafana/latest/datasources/prometheus/configure-prometheus-data-source/).
44+
45+
## Accessing Grafana
46+
You can access the Grafana instance by visiting `http://{GRAFANA_IP}`, derived in prerequisites.
47+
48+
To log in to Grafana, use the credentials `admin:admin`.
49+
50+
Envoy Gateway has examples of dashboard for you to get started:
51+
### [Envoy Global](https://raw.githubusercontent.com/envoyproxy/gateway/latest/examples/dashboards/envoy-global.json)
52+
![Envoy Global](/img/envoy-global-dashboard.png)
53+
54+
### [Envoy Clusters]((https://raw.githubusercontent.com/envoyproxy/gateway/latest/examples/dashboards/envoy-clusters.json))
55+
![Envoy Clusters](/img/envoy-clusters-dashboard.png)
56+
57+
### [Envoy Pod Resources]((https://raw.githubusercontent.com/envoyproxy/gateway/latest/examples/dashboards/envoy-pod-resource.json))
58+
![Envoy Pod Resources](/img/envoy-pod-resources-dashboard.png)
59+
60+
You can load the above dashboards in your Grafana to get started. Please refer to Grafana docs for [importing dashboards](https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/#import-a-dashboard).
194 KB
Loading
158 KB
Loading
72.9 KB
Loading

0 commit comments

Comments
 (0)