Skip to content

Commit 26ee671

Browse files
authored
Merge pull request #3690 from Kavinjsir/feat/add-wq-panels
✨ Enrich Grafana plugin panels
2 parents a856875 + 65b1201 commit 26ee671

File tree

3 files changed

+481
-75
lines changed

3 files changed

+481
-75
lines changed

docs/book/src/plugins/grafana-v1-alpha.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ See an example of how to use the plugin in your project:
5959
1. Copy the JSON file
6060
2. Visit `<your-grafana-url>/dashboard/import` to [import a new dashboard](https://grafana.com/docs/grafana/latest/dashboards/export-import/#import-dashboard).
6161
3. Paste the JSON content to `Import via panel json`, then press `Load` button
62-
<img width="644" alt="Screen Shot 2022-06-28 at 3 40 22 AM" src="https://user-images.githubusercontent.com/18136486/176121955-1c4aec9c-0ba4-4271-9767-e8d1726d9d9a.png">
62+
<img width="644" src="https://user-images.githubusercontent.com/18136486/176121955-1c4aec9c-0ba4-4271-9767-e8d1726d9d9a.png">
6363
4. Select the data source for Prometheus metrics
64-
<img width="633" alt="Screen Shot 2022-06-28 at 3 41 26 AM" src="https://user-images.githubusercontent.com/18136486/176122261-e3eab5b0-9fc4-45fc-a68c-d9ce1cfe96ee.png">
64+
<img width="633" src="https://user-images.githubusercontent.com/18136486/176122261-e3eab5b0-9fc4-45fc-a68c-d9ce1cfe96ee.png">
6565
5. Once the json is imported in Grafana, the dashboard is ready.
6666

6767
### Grafana Dashboard
@@ -77,7 +77,7 @@ See an example of how to use the plugin in your project:
7777
- Description:
7878
- Per-second rate of total reconciliation as measured over the last 5 minutes
7979
- Per-second rate of reconciliation errors as measured over the last 5 minutes
80-
- Sample: <img width="1430" src="https://user-images.githubusercontent.com/18136486/176122555-f3493658-6c99-4ad6-a9b7-63d85620d370.png">
80+
- Sample: <img width="912" src="https://user-images.githubusercontent.com/18136486/176122555-f3493658-6c99-4ad6-a9b7-63d85620d370.png">
8181

8282
#### Controller CPU & Memory Usage
8383

@@ -90,7 +90,7 @@ See an example of how to use the plugin in your project:
9090
- Description:
9191
- Per-second rate of CPU usage as measured over the last 5 minutes
9292
- Allocated Memory for the running controller
93-
- Sample: <img width="1381" src="https://user-images.githubusercontent.com/18136486/177239808-7d94b17d-692c-4166-8875-6d9332e05bcb.png">
93+
- Sample: <img width="912" src="https://user-images.githubusercontent.com/18136486/177239808-7d94b17d-692c-4166-8875-6d9332e05bcb.png">
9494

9595
#### Seconds of P50/90/99 Items Stay in Work Queue
9696

@@ -100,7 +100,7 @@ See an example of how to use the plugin in your project:
100100
- histogram_quantile(0.50, sum(rate(workqueue_queue_duration_seconds_bucket{job="$job", namespace="$namespace"}[5m])) by (instance, name, le))
101101
- Description
102102
- Seconds an item stays in workqueue before being requested.
103-
- Sample: <img width="920" src="https://user-images.githubusercontent.com/18136486/180359126-452b2a0f-a511-4ae3-844f-231d13cd27f8.png">
103+
- Sample: <img width="912" src="https://user-images.githubusercontent.com/18136486/180359126-452b2a0f-a511-4ae3-844f-231d13cd27f8.png">
104104

105105
#### Seconds of P50/90/99 Items Processed in Work Queue
106106

@@ -120,7 +120,7 @@ See an example of how to use the plugin in your project:
120120
- sum(rate(workqueue_adds_total{job="$job", namespace="$namespace"}[5m])) by (instance, name)
121121
- Description
122122
- Per-second rate of items added to work queue
123-
- Sample: <img width="913" src="https://user-images.githubusercontent.com/18136486/180360073-698b6f77-a2c4-4a95-8313-fd8745ad472f.png">
123+
- Sample: <img width="912" src="https://user-images.githubusercontent.com/18136486/180360073-698b6f77-a2c4-4a95-8313-fd8745ad472f.png">
124124

125125
#### Retries Rate in Work Queue
126126

@@ -130,7 +130,37 @@ See an example of how to use the plugin in your project:
130130
- sum(rate(workqueue_retries_total{job="$job", namespace="$namespace"}[5m])) by (instance, name)
131131
- Description
132132
- Per-second rate of retries handled by workqueue
133-
- Sample: <img width="914" src="https://user-images.githubusercontent.com/18136486/180360101-411c81e9-d54e-4b21-bbb0-e3f94fcf48cb.png">
133+
- Sample: <img width="912" src="https://user-images.githubusercontent.com/18136486/180360101-411c81e9-d54e-4b21-bbb0-e3f94fcf48cb.png">
134+
135+
#### Number of Workers in Use
136+
137+
- Metrics
138+
- controller_runtime_active_workers
139+
- Query:
140+
- controller_runtime_active_workers{job="$job", namespace="$namespace"}
141+
- Description
142+
- The number of active controller workers
143+
- Sample: <img width="912" src="https://github.com/kubernetes-sigs/kubebuilder/assets/18136486/288db1b5-e2d8-48ea-9aae-30de7eeca277">
144+
145+
#### WorkQueue Depth
146+
147+
- Metrics
148+
- workqueue_depth
149+
- Query:
150+
- workqueue_depth{job="$job", namespace="$namespace"}
151+
- Description
152+
- Current depth of workqueue
153+
- Sample: <img width="912" src="https://github.com/kubernetes-sigs/kubebuilder/assets/18136486/34f14df4-0428-460e-9658-01dd3d34aade">
154+
155+
#### Unfinished Seconds
156+
157+
- Metrics
158+
- workqueue_unfinished_work_seconds
159+
- Query:
160+
- rate(workqueue_unfinished_work_seconds{job="$job", namespace="$namespace"}[5m])
161+
- Description
162+
- How many seconds of work has done that is in progress and hasn't been observed by work_duration.
163+
- Sample: <img width="912" src="https://github.com/kubernetes-sigs/kubebuilder/assets/18136486/081727c0-9531-4f7a-9649-87723ebc773f">
134164

135165
### Visualize Custom Metrics
136166

0 commit comments

Comments
 (0)