Skip to content

Commit

Permalink
Add template
Browse files Browse the repository at this point in the history
Signed-off-by: raihankhan <[email protected]>
  • Loading branch information
raihankhan committed Feb 14, 2024
1 parent 56f8012 commit f30c7ff
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}}
{
"annotations": {
"list": [
Expand Down Expand Up @@ -17964,10 +17965,16 @@
"multi": false,
"name": "namespace",
"options": [],
{{- if $shared }}
"query": {
"query": "label_values(kube_namespace_created,namespace)",
"refId": "Prometheus-namespace-Variable-Query"
"query": "label_values(kube_namespace_created,namespace)",
"refId": "Prometheus-namespace-Variable-Query"
},
"type": "query",
{{- else }}
"query": {{ $.Values.app.namespace | quote }},
"type": "constant",
{{- end }}
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand Down Expand Up @@ -17995,10 +18002,13 @@
"multi": false,
"name": "app",
"options": [],
"query": {
"query": "label_values(rabbitmq_identity_info{namespace=\"$namespace\"}, rabbitmq_cluster)",
"refId": "StandardVariableQuery"
},
{{- if $shared }}
"query": "label_values(rabbitmq_identity_info{namespace=\"$namespace\"}, rabbitmq_cluster)",
"type": "query",
{{- else }}
"query": {{ $.Values.app.name | quote }},
"type": "constant",
{{- end }}
"refresh": 2,
"regex": "",
"skipUrlSync": false,
Expand All @@ -18017,7 +18027,11 @@
},
"timepicker": {},
"timezone": "",
{{- if $shared }}
"title": "KubeDB / RabbitMQ / Database",
{{- else }}
"title": {{ printf "KubeDB / RabbitMQ / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }},
{{- end }}
"uid": "ohrdrabbitmq",
"version": 4
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}}
{
"annotations": {
"list": [
Expand Down Expand Up @@ -477,7 +478,7 @@
"exemplar": true,
"expr": "rabbitmq_queue_messages_ram_bytes{pod=~\"$pod\"}",
"interval": "",
"legendFormat": "{{ pod }}",
"legendFormat": {{ `"{{pod}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -576,7 +577,7 @@
"expr": "rabbitmq_queue_messages_persistent{pod=~\"$pod\"}",
"instant": false,
"interval": "",
"legendFormat": "{{ pod }}",
"legendFormat": {{ `"{{pod}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -772,7 +773,7 @@
"exemplar": true,
"expr": "rate(rabbitmq_erlang_gc_reclaimed_bytes_total{pod=~\"$pod\"}[5m])",
"interval": "",
"legendFormat": "{{ pod }}",
"legendFormat": {{ `"{{pod}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -1427,10 +1428,16 @@
"multi": false,
"name": "namespace",
"options": [],
{{- if $shared }}
"query": {
"query": "label_values(kube_namespace_created,namespace)",
"refId": "Prometheus-namespace-Variable-Query"
"query": "label_values(kube_namespace_created,namespace)",
"refId": "Prometheus-namespace-Variable-Query"
},
"type": "query",
{{- else }}
"query": {{ $.Values.app.namespace | quote }},
"type": "constant",
{{- end }}
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand Down Expand Up @@ -1458,10 +1465,13 @@
"multi": false,
"name": "app",
"options": [],
"query": {
"query": "label_values(kubedb_com_rabbitmq_status_phase{namespace=~\"$namespace\"},app)",
"refId": "Prometheus-app-Variable-Query"
},
{{- if $shared }}
"query": "label_values(rabbitmq_identity_info{namespace=\"$namespace\"}, rabbitmq_cluster)",
"type": "query",
{{- else }}
"query": {{ $.Values.app.name | quote }},
"type": "constant",
{{- end }}
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand Down Expand Up @@ -1535,7 +1545,11 @@
]
},
"timezone": "",
{{- if $shared }}
"title": "KubeDB / RabbitMQ / Pod",
{{- else }}
"title": {{ printf "KubeDB / RabbitMQ / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }},
{{- end }}
"uid": "FktZiiOnz",
"version": 27
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}}
{
"annotations": {
"list": [
Expand Down Expand Up @@ -121,7 +122,7 @@
"format": "table",
"instant": true,
"interval": "",
"legendFormat": "{{phase}}",
"legendFormat": {{ `"{{phase}}"` }},
"refId": "A"
}
],
Expand Down Expand Up @@ -204,7 +205,7 @@
"instant": true,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{ version }}",
"legendFormat": {{ `"{{version}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -365,7 +366,7 @@
"format": "table",
"instant": true,
"interval": "",
"legendFormat": "{{terminationPolicy}}",
"legendFormat": {{ `"{{terminationPolicy}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -794,7 +795,7 @@
"exemplar": true,
"expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)",
"interval": "",
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},
"refId": "A"
}
],
Expand Down Expand Up @@ -1197,7 +1198,7 @@
"exemplar": true,
"expr": "sum(node_namespace_pod_container:container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\",container!=\"\"}) by (pod)",
"interval": "",
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -1704,7 +1705,7 @@
"exemplar": true,
"expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-\\\\d+$\"}) by (pod)",
"interval": "",
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -1803,7 +1804,7 @@
"instant": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{pod}}-disk-write",
"legendFormat": {{ `"{{pod}}-disk-write"` }},
"refId": "A"
},
{
Expand All @@ -1812,7 +1813,7 @@
"hide": false,
"instant": false,
"interval": "",
"legendFormat": "{{pod}}-disk-read",
"legendFormat": {{ `"{{pod}}-disk-write"` }},
"refId": "B"
}
],
Expand Down Expand Up @@ -1911,7 +1912,7 @@
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},,
"legendLink": null,
"refId": "A",
"step": 10
Expand Down Expand Up @@ -2012,7 +2013,7 @@
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},,
"legendLink": null,
"refId": "A",
"step": 10
Expand Down Expand Up @@ -2521,7 +2522,7 @@
"expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100",
"instant": true,
"interval": "",
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -2605,7 +2606,7 @@
"expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ",
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},,
"refId": "A"
}
],
Expand Down Expand Up @@ -2678,7 +2679,7 @@
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},,
"legendLink": null,
"refId": "A",
"step": 10
Expand Down Expand Up @@ -2779,7 +2780,7 @@
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{pod}}",
"legendFormat": {{ `"{{pod}}"` }},,
"legendLink": null,
"refId": "A",
"step": 10
Expand Down Expand Up @@ -2876,10 +2877,16 @@
"multi": false,
"name": "namespace",
"options": [],
{{- if $shared }}
"query": {
"query": "label_values(kube_namespace_created,namespace)",
"refId": "Prometheus-namespace-Variable-Query"
"query": "label_values(kube_namespace_created,namespace)",
"refId": "Prometheus-namespace-Variable-Query"
},
"type": "query",
{{- else }}
"query": {{ $.Values.app.namespace | quote }},
"type": "constant",
{{- end }}
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand Down Expand Up @@ -2907,10 +2914,16 @@
"multi": false,
"name": "app",
"options": [],
{{- if $shared }}
"query": {
"query": "label_values(kubedb_com_rabbitmq_status_phase{namespace=~\"$namespace\"},app)",
"refId": "Prometheus-app-Variable-Query"
"query": "label_values(kubedb_com_rabbitmq_status_phase{namespace=~\"$namespace\"},app)",
"refId": "Prometheus-app-Variable-Query"
},
"type": "query",
{{- else }}
"query": {{ $.Values.app.name | quote }},
"type": "constant",
{{- end }}
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand Down Expand Up @@ -2953,7 +2966,11 @@
]
},
"timezone": "",
{{- if $shared }}
"title": "KubeDB / RabbitMQ / Summary",
{{- else }}
"title": {{ printf "KubeDB / RabbitMQ / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }},
{{- end }}
"uid": "rAbbItMqSumMaRy",
"version": 1
}
3 changes: 3 additions & 0 deletions charts/kubedb-grafana-dashboards/data/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ postgres:
proxysql:
kind: ProxySQL
resource: proxysqls
redis:
kind: RabbitMQ
resource: rabbitmqs
redis:
kind: Redis
resource: redises

0 comments on commit f30c7ff

Please sign in to comment.