97565cb1fb2e3ec16097a46b84706aa6cc41664b
[demo.git] / vnfs / DAaaS / prometheus-operator / templates / grafana / dashboards / persistentvolumesusage.yaml
1 # Generated from 'persistentvolumesusage' from https://raw.githubusercontent.com/coreos/prometheus-operator/master/contrib/kube-prometheus/manifests/grafana-dashboardDefinitions.yaml
2 {{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
3 apiVersion: v1
4 kind: ConfigMap
5 metadata:
6   name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }}
7   labels:
8     {{- if $.Values.grafana.sidecar.dashboards.label }}
9     {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
10     {{- end }}
11     app: {{ template "prometheus-operator.name" $ }}-grafana
12 {{ include "prometheus-operator.labels" $ | indent 4 }}
13 data:
14   persistentvolumesusage.json: |-
15     {
16         "annotations": {
17             "list": [
18
19             ]
20         },
21         "editable": false,
22         "gnetId": null,
23         "graphTooltip": 0,
24         "hideControls": false,
25         "id": null,
26         "links": [
27
28         ],
29         "refresh": "",
30         "rows": [
31             {
32                 "collapse": false,
33                 "collapsed": false,
34                 "panels": [
35                     {
36                         "aliasColors": {
37
38                         },
39                         "bars": false,
40                         "dashLength": 10,
41                         "dashes": false,
42                         "datasource": "$datasource",
43                         "fill": 1,
44                         "gridPos": {
45
46                         },
47                         "id": 2,
48                         "legend": {
49                             "alignAsTable": false,
50                             "avg": true,
51                             "current": true,
52                             "max": true,
53                             "min": true,
54                             "rightSide": false,
55                             "show": true,
56                             "total": false,
57                             "values": true
58                         },
59                         "lines": true,
60                         "linewidth": 1,
61                         "links": [
62
63                         ],
64                         "nullPointMode": "null",
65                         "percentage": false,
66                         "pointradius": 5,
67                         "points": false,
68                         "renderer": "flot",
69                         "repeat": null,
70                         "seriesOverrides": [
71
72                         ],
73                         "spaceLength": 10,
74                         "span": 12,
75                         "stack": false,
76                         "steppedLine": false,
77                         "targets": [
78                             {
79                                 "expr": "(kubelet_volume_stats_capacity_bytes{job=\"kubelet\", persistentvolumeclaim=\"$volume\"} - kubelet_volume_stats_available_bytes{job=\"kubelet\", persistentvolumeclaim=\"$volume\"}) / kubelet_volume_stats_capacity_bytes{job=\"kubelet\", persistentvolumeclaim=\"$volume\"} * 100\n",
80                                 "format": "time_series",
81                                 "intervalFactor": 1,
82                                 "legendFormat": "{{`{{ Usage }}`}}",
83                                 "refId": "A"
84                             }
85                         ],
86                         "thresholds": [
87
88                         ],
89                         "timeFrom": null,
90                         "timeShift": null,
91                         "title": "Volume Space Usage",
92                         "tooltip": {
93                             "shared": true,
94                             "sort": 0,
95                             "value_type": "individual"
96                         },
97                         "type": "graph",
98                         "xaxis": {
99                             "buckets": null,
100                             "mode": "time",
101                             "name": null,
102                             "show": true,
103                             "values": [
104
105                             ]
106                         },
107                         "yaxes": [
108                             {
109                                 "format": "percent",
110                                 "label": null,
111                                 "logBase": 1,
112                                 "max": 100,
113                                 "min": 0,
114                                 "show": true
115                             },
116                             {
117                                 "format": "percent",
118                                 "label": null,
119                                 "logBase": 1,
120                                 "max": 100,
121                                 "min": 0,
122                                 "show": true
123                             }
124                         ]
125                     }
126                 ],
127                 "repeat": null,
128                 "repeatIteration": null,
129                 "repeatRowId": null,
130                 "showTitle": false,
131                 "title": "Dashboard Row",
132                 "titleSize": "h6",
133                 "type": "row"
134             },
135             {
136                 "collapse": false,
137                 "collapsed": false,
138                 "panels": [
139                     {
140                         "aliasColors": {
141
142                         },
143                         "bars": false,
144                         "dashLength": 10,
145                         "dashes": false,
146                         "datasource": "$datasource",
147                         "fill": 1,
148                         "gridPos": {
149
150                         },
151                         "id": 3,
152                         "legend": {
153                             "alignAsTable": false,
154                             "avg": true,
155                             "current": true,
156                             "max": true,
157                             "min": true,
158                             "rightSide": false,
159                             "show": true,
160                             "total": false,
161                             "values": true
162                         },
163                         "lines": true,
164                         "linewidth": 1,
165                         "links": [
166
167                         ],
168                         "nullPointMode": "null",
169                         "percentage": false,
170                         "pointradius": 5,
171                         "points": false,
172                         "renderer": "flot",
173                         "repeat": null,
174                         "seriesOverrides": [
175
176                         ],
177                         "spaceLength": 10,
178                         "span": 12,
179                         "stack": false,
180                         "steppedLine": false,
181                         "targets": [
182                             {
183                                 "expr": "kubelet_volume_stats_inodes_used{job=\"kubelet\", persistentvolumeclaim=\"$volume\"} / kubelet_volume_stats_inodes{job=\"kubelet\", persistentvolumeclaim=\"$volume\"} * 100\n",
184                                 "format": "time_series",
185                                 "intervalFactor": 1,
186                                 "legendFormat": "{{`{{ Usage }}`}}",
187                                 "refId": "A"
188                             }
189                         ],
190                         "thresholds": [
191
192                         ],
193                         "timeFrom": null,
194                         "timeShift": null,
195                         "title": "Volume inodes Usage",
196                         "tooltip": {
197                             "shared": true,
198                             "sort": 0,
199                             "value_type": "individual"
200                         },
201                         "type": "graph",
202                         "xaxis": {
203                             "buckets": null,
204                             "mode": "time",
205                             "name": null,
206                             "show": true,
207                             "values": [
208
209                             ]
210                         },
211                         "yaxes": [
212                             {
213                                 "format": "percent",
214                                 "label": null,
215                                 "logBase": 1,
216                                 "max": 100,
217                                 "min": 0,
218                                 "show": true
219                             },
220                             {
221                                 "format": "percent",
222                                 "label": null,
223                                 "logBase": 1,
224                                 "max": 100,
225                                 "min": 0,
226                                 "show": true
227                             }
228                         ]
229                     }
230                 ],
231                 "repeat": null,
232                 "repeatIteration": null,
233                 "repeatRowId": null,
234                 "showTitle": false,
235                 "title": "Dashboard Row",
236                 "titleSize": "h6",
237                 "type": "row"
238             }
239         ],
240         "schemaVersion": 14,
241         "style": "dark",
242         "tags": [
243
244         ],
245         "templating": {
246             "list": [
247                 {
248                     "current": {
249                         "text": "Prometheus",
250                         "value": "Prometheus"
251                     },
252                     "hide": 0,
253                     "label": null,
254                     "name": "datasource",
255                     "options": [
256
257                     ],
258                     "query": "prometheus",
259                     "refresh": 1,
260                     "regex": "",
261                     "type": "datasource"
262                 },
263                 {
264                     "allValue": null,
265                     "current": {
266
267                     },
268                     "datasource": "$datasource",
269                     "hide": 0,
270                     "includeAll": false,
271                     "label": "Namespace",
272                     "multi": false,
273                     "name": "namespace",
274                     "options": [
275
276                     ],
277                     "query": "label_values(kubelet_volume_stats_capacity_bytes{job=\"kubelet\"}, exported_namespace)",
278                     "refresh": 2,
279                     "regex": "",
280                     "sort": 0,
281                     "tagValuesQuery": "",
282                     "tags": [
283
284                     ],
285                     "tagsQuery": "",
286                     "type": "query",
287                     "useTags": false
288                 },
289                 {
290                     "allValue": null,
291                     "current": {
292
293                     },
294                     "datasource": "$datasource",
295                     "hide": 0,
296                     "includeAll": false,
297                     "label": "PersistentVolumeClaim",
298                     "multi": false,
299                     "name": "volume",
300                     "options": [
301
302                     ],
303                     "query": "label_values(kubelet_volume_stats_capacity_bytes{job=\"kubelet\", exported_namespace=\"$namespace\"}, persistentvolumeclaim)",
304                     "refresh": 2,
305                     "regex": "",
306                     "sort": 0,
307                     "tagValuesQuery": "",
308                     "tags": [
309
310                     ],
311                     "tagsQuery": "",
312                     "type": "query",
313                     "useTags": false
314                 }
315             ]
316         },
317         "time": {
318             "from": "now-7d",
319             "to": "now"
320         },
321         "timepicker": {
322             "refresh_intervals": [
323                 "5s",
324                 "10s",
325                 "30s",
326                 "1m",
327                 "5m",
328                 "15m",
329                 "30m",
330                 "1h",
331                 "2h",
332                 "1d"
333             ],
334             "time_options": [
335                 "5m",
336                 "15m",
337                 "1h",
338                 "6h",
339                 "12h",
340                 "24h",
341                 "2d",
342                 "7d",
343                 "30d"
344             ]
345         },
346         "timezone": "",
347         "title": "Persistent Volumes",
348         "uid": "919b92a8e8041bd567af9edab12c840c",
349         "version": 0
350     }
351 {{- end }}