Skip to content

Commit 06a8e0e

Browse files
ArthurSensroboquat
authored andcommitted
Add 'team' as a filter to ArgoCD dashboard
Signed-off-by: ArthurSens <[email protected]>
1 parent be28d7f commit 06a8e0e

File tree

1 file changed

+65
-39
lines changed
  • operations/observability/mixins/self-hosted/dashboards/argocd

1 file changed

+65
-39
lines changed

operations/observability/mixins/self-hosted/dashboards/argocd/argocd.json

Lines changed: 65 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@
240240
"maxDataPoints": 100,
241241
"options": {
242242
"colorMode": "none",
243-
"graphMode": "area",
243+
"graphMode": "none",
244244
"justifyMode": "auto",
245-
"orientation": "horizontal",
245+
"orientation": "auto",
246246
"reduceOptions": {
247247
"calcs": [
248248
"lastNotNull"
@@ -259,14 +259,14 @@
259259
"uid": "$datasource"
260260
},
261261
"editorMode": "code",
262-
"expr": "count(count by (server) (argocd_cluster_info))",
262+
"expr": "count(\r\n count by (dest_server) (\r\n argocd_app_info \r\n * on(name) group_left(label_environment) argocd_app_labels{label_environment=~\"$environment\", label_team=~\"$team\"}\r\n )\r\n)",
263263
"format": "time_series",
264264
"instant": false,
265265
"intervalFactor": 1,
266266
"refId": "A"
267267
}
268268
],
269-
"title": "Managed Clusters",
269+
"title": "Clusters with apps deployed",
270270
"type": "stat"
271271
},
272272
{
@@ -319,7 +319,7 @@
319319
"maxDataPoints": 100,
320320
"options": {
321321
"colorMode": "none",
322-
"graphMode": "area",
322+
"graphMode": "none",
323323
"justifyMode": "auto",
324324
"orientation": "horizontal",
325325
"reduceOptions": {
@@ -339,7 +339,7 @@
339339
"uid": "$datasource"
340340
},
341341
"editorMode": "code",
342-
"expr": "sum(\r\n argocd_app_info{health_status=~\"$health_status\",sync_status=~\"$sync_status\"} \r\n * on(name) group_left(label_environment) argocd_app_labels{label_environment=~\"$environment\"}\r\n)",
342+
"expr": "sum(\r\n argocd_app_info{health_status=~\"$health_status\",sync_status=~\"$sync_status\"} \r\n * on(name) group_left(label_environment) argocd_app_labels{label_environment=~\"$environment\", label_team=~\"$team\"}\r\n)",
343343
"format": "time_series",
344344
"instant": false,
345345
"intervalFactor": 1,
@@ -399,7 +399,7 @@
399399
"maxDataPoints": 100,
400400
"options": {
401401
"colorMode": "none",
402-
"graphMode": "area",
402+
"graphMode": "none",
403403
"justifyMode": "auto",
404404
"orientation": "horizontal",
405405
"reduceOptions": {
@@ -418,7 +418,7 @@
418418
"uid": "$datasource"
419419
},
420420
"editorMode": "code",
421-
"expr": "count(count by (repo) (\r\n argocd_app_info * on(name) group_left argocd_app_labels{label_environment=~\"$environment\"}\r\n))",
421+
"expr": "count(count by (repo) (\r\n argocd_app_info * on(name) group_left argocd_app_labels{label_environment=~\"$environment\", label_team=~\"$team\"}\r\n))",
422422
"format": "time_series",
423423
"instant": false,
424424
"intervalFactor": 1,
@@ -618,7 +618,7 @@
618618
},
619619
"editorMode": "code",
620620
"exemplar": false,
621-
"expr": "argocd_app_info{health_status=~\"$health_status\",sync_status=~\"$sync_status\"} \r\n* on(name) group_left(label_environment, label_team) argocd_app_labels{label_environment=~\"$environment\"}",
621+
"expr": "argocd_app_info{health_status=~\"$health_status\",sync_status=~\"$sync_status\"} \r\n* on(name) group_left(label_environment, label_team) argocd_app_labels{label_environment=~\"$environment\", label_team=~\"$team\"}",
622622
"format": "table",
623623
"instant": true,
624624
"intervalFactor": 1,
@@ -654,31 +654,34 @@
654654
"service": true
655655
},
656656
"indexByName": {
657-
"Time": 4,
658-
"Value": 20,
659-
"cluster": 5,
660-
"container": 6,
661-
"dest_namespace": 7,
662-
"dest_server": 8,
663-
"endpoint": 9,
664-
"exported_namespace": 10,
665-
"health_status": 2,
666-
"instance": 11,
667-
"job": 12,
657+
"Time": 5,
658+
"Value": 21,
659+
"cluster": 6,
660+
"container": 7,
661+
"dest_namespace": 8,
662+
"dest_server": 9,
663+
"endpoint": 10,
664+
"exported_namespace": 11,
665+
"health_status": 3,
666+
"instance": 12,
667+
"job": 13,
668668
"label_environment": 1,
669+
"label_team": 2,
669670
"name": 0,
670-
"namespace": 13,
671-
"pod": 14,
672-
"project": 15,
673-
"prometheus": 16,
674-
"prometheus_replica": 17,
675-
"repo": 18,
676-
"service": 19,
677-
"sync_status": 3
671+
"namespace": 14,
672+
"operation": 22,
673+
"pod": 15,
674+
"project": 16,
675+
"prometheus": 17,
676+
"prometheus_replica": 18,
677+
"repo": 19,
678+
"service": 20,
679+
"sync_status": 4
678680
},
679681
"renameByName": {
680682
"health_status": "Health",
681683
"label_environment": "Environment",
684+
"label_team": "Team Owner",
682685
"name": "Application",
683686
"sync_status": "Synchronization Status"
684687
}
@@ -892,7 +895,7 @@
892895
"uid": "$datasource"
893896
},
894897
"editorMode": "code",
895-
"expr": "sum(\r\n argocd_app_info{health_status=~\"$health_status\",sync_status=~\"$sync_status\",health_status!=\"\"} \r\n * on(name) group_left argocd_app_labels{label_environment=~\"$environment\"}\r\n) by (health_status)",
898+
"expr": "sum(\r\n argocd_app_info{health_status=~\"$health_status\",sync_status=~\"$sync_status\",health_status!=\"\"} \r\n * on(name) group_left argocd_app_labels{label_environment=~\"$environment\", label_team=~\"$team\"}\r\n) by (health_status)",
896899
"format": "time_series",
897900
"instant": false,
898901
"intervalFactor": 1,
@@ -1114,7 +1117,7 @@
11141117
"uid": "$datasource"
11151118
},
11161119
"editorMode": "code",
1117-
"expr": "sum(\r\n argocd_app_info{health_status=~\"$health_status\",sync_status=~\"$sync_status\",health_status!=\"\"}\r\n * on(name) group_left argocd_app_labels{label_environment=~\"$environment\"}\r\n) by (sync_status)",
1120+
"expr": "sum(\r\n argocd_app_info{health_status=~\"$health_status\",sync_status=~\"$sync_status\",health_status!=\"\"}\r\n * on(name) group_left argocd_app_labels{label_environment=~\"$environment\", label_team=~\"$team\"}\r\n) by (sync_status)",
11181121
"format": "time_series",
11191122
"instant": false,
11201123
"intervalFactor": 1,
@@ -1240,7 +1243,7 @@
12401243
"uid": "$datasource"
12411244
},
12421245
"editorMode": "code",
1243-
"expr": "sum(\r\n round(\r\n increase(\r\n argocd_app_sync_total[$interval]\r\n * on(name) group_left argocd_app_labels{label_environment=~\"$environment\"}\r\n )\r\n )\r\n) by (name)",
1246+
"expr": "sum(\r\n round(\r\n increase(\r\n argocd_app_sync_total[$interval]\r\n * on(name) group_left argocd_app_labels{label_environment=~\"$environment\", label_team=~\"$team\"}\r\n )\r\n )\r\n) by (name)",
12441247
"format": "time_series",
12451248
"intervalFactor": 1,
12461249
"legendFormat": "{{name}}",
@@ -1314,7 +1317,7 @@
13141317
"uid": "$datasource"
13151318
},
13161319
"editorMode": "code",
1317-
"expr": "sum(\r\n round(\r\n increase(\r\n argocd_app_sync_total{phase=~\"Error|Failed\"}[$interval]\r\n * on(name) group_left argocd_app_labels{label_environment=~\"$environment\"}\r\n )\r\n )\r\n) by (name, phase)",
1320+
"expr": "sum(\r\n round(\r\n increase(\r\n argocd_app_sync_total{phase=~\"Error|Failed\"}[$interval]\r\n * on(name) group_left argocd_app_labels{label_environment=~\"$environment\", label_team=~\"$team\"}\r\n )\r\n )\r\n) by (name, phase)",
13181321
"format": "time_series",
13191322
"intervalFactor": 1,
13201323
"legendFormat": "{{phase}}: {{name}}",
@@ -2605,8 +2608,7 @@
26052608
"mode": "absolute",
26062609
"steps": [
26072610
{
2608-
"color": "green",
2609-
"value": null
2611+
"color": "green"
26102612
},
26112613
{
26122614
"color": "red",
@@ -2702,8 +2704,7 @@
27022704
"mode": "absolute",
27032705
"steps": [
27042706
{
2705-
"color": "green",
2706-
"value": null
2707+
"color": "green"
27072708
},
27082709
{
27092710
"color": "red",
@@ -3021,8 +3022,7 @@
30213022
"mode": "absolute",
30223023
"steps": [
30233024
{
3024-
"color": "green",
3025-
"value": null
3025+
"color": "green"
30263026
},
30273027
{
30283028
"color": "red",
@@ -4533,6 +4533,32 @@
45334533
"type": "query",
45344534
"useTags": false
45354535
},
4536+
{
4537+
"allValue": ".*",
4538+
"current": {},
4539+
"datasource": {
4540+
"uid": "$datasource"
4541+
},
4542+
"definition": "label_values(argocd_app_labels, label_team)",
4543+
"hide": 0,
4544+
"includeAll": true,
4545+
"label": "Team",
4546+
"multi": false,
4547+
"name": "team",
4548+
"options": [],
4549+
"query": {
4550+
"query": "label_values(argocd_app_labels, label_team)",
4551+
"refId": "StandardVariableQuery"
4552+
},
4553+
"refresh": 1,
4554+
"regex": "",
4555+
"skipUrlSync": false,
4556+
"sort": 1,
4557+
"tagValuesQuery": "",
4558+
"tagsQuery": "",
4559+
"type": "query",
4560+
"useTags": false
4561+
},
45364562
{
45374563
"allValue": ".*",
45384564
"current": {
@@ -4658,6 +4684,6 @@
46584684
"timezone": "",
46594685
"title": "ArgoCD",
46604686
"uid": "argocd-apps",
4661-
"version": 2,
4687+
"version": 1,
46624688
"weekStart": ""
46634689
}

0 commit comments

Comments
 (0)