|
85 | 85 | ], |
86 | 86 | "queries": [ |
87 | 87 | { |
88 | | - "query": "sum:kubernetes_state.pod.status_phase{$scope AND $cluster AND $namespace AND $deployment AND $statefulset AND $daemonset AND $job AND $cronjob AND (pod_phase:succeeded OR pod_phase:running)} by {pod_phase}", |
| 88 | + "query": "sum:kubernetes_state.pod.status_phase{$scope AND $cluster AND $namespace AND $deployment AND $statefulset AND $daemonset AND $job AND $cronjob AND (pod_phase:succeeded OR pod_phase:running)} by {pod_phase}.weighted()", |
89 | 89 | "data_source": "metrics", |
90 | 90 | "name": "query1", |
91 | 91 | "semantic_mode": "combined" |
92 | 92 | }, |
93 | 93 | { |
94 | | - "query": "sum:kubernetes_state.pod.status_phase{$scope,$cluster,$namespace,$deployment,$statefulset,$daemonset,$job,$cronjob,!pod_phase:succeeded,!pod_phase:running} by {pod_phase}", |
| 94 | + "query": "sum:kubernetes_state.pod.status_phase{$scope,$cluster,$namespace,$deployment,$statefulset,$daemonset,$job,$cronjob,!pod_phase:succeeded,!pod_phase:running} by {pod_phase}.weighted()", |
95 | 95 | "data_source": "metrics", |
96 | 96 | "name": "query2", |
97 | 97 | "semantic_mode": "combined" |
|
138 | 138 | ], |
139 | 139 | "queries": [ |
140 | 140 | { |
141 | | - "query": "sum:kubernetes_state.pod.ready{$scope,$cluster,$namespace,$deployment,$statefulset,$daemonset,$job,$cronjob,condition:true,!pod_phase:succeeded,!pod_phase:failed}", |
| 141 | + "query": "sum:kubernetes_state.pod.ready{$scope,$cluster,$namespace,$deployment,$statefulset,$daemonset,$job,$cronjob,condition:true,!pod_phase:succeeded,!pod_phase:failed}.weighted()", |
142 | 142 | "data_source": "metrics", |
143 | 143 | "name": "query1", |
144 | 144 | "semantic_mode": "combined", |
145 | 145 | "aggregator": "last" |
146 | 146 | }, |
147 | 147 | { |
148 | | - "query": "sum:kubernetes_state.pod.ready{$scope,$cluster,$namespace,$deployment,$statefulset,$daemonset,$job,$cronjob,!pod_phase:succeeded,!pod_phase:failed}", |
| 148 | + "query": "sum:kubernetes_state.pod.ready{$scope,$cluster,$namespace,$deployment,$statefulset,$daemonset,$job,$cronjob,!pod_phase:succeeded,!pod_phase:failed}.weighted()", |
149 | 149 | "data_source": "metrics", |
150 | 150 | "name": "query2", |
151 | 151 | "semantic_mode": "combined", |
|
174 | 174 | "title": "Issues by Namespace (changed weekly)", |
175 | 175 | "title_size": "16", |
176 | 176 | "title_align": "left", |
| 177 | + "time": { |
| 178 | + "type": "live", |
| 179 | + "unit": "week", |
| 180 | + "value": 1 |
| 181 | + }, |
177 | 182 | "type": "change", |
178 | 183 | "custom_links": [], |
179 | 184 | "requests": [ |
|
185 | 190 | "response_format": "scalar", |
186 | 191 | "formulas": [ |
187 | 192 | { |
188 | | - "formula": "week_before(query1)" |
| 193 | + "formula": "calendar_shift(query1, '-1w', 'UTC')" |
189 | 194 | }, |
190 | 195 | { |
191 | 196 | "formula": "query1" |
|
927 | 932 | "layout": { |
928 | 933 | "x": 0, |
929 | 934 | "y": 6, |
930 | | - "width": 6, |
931 | | - "height": 3 |
| 935 | + "width": 4, |
| 936 | + "height": 2 |
932 | 937 | } |
933 | 938 | }, |
934 | 939 | { |
|
998 | 1003 | ] |
999 | 1004 | }, |
1000 | 1005 | "layout": { |
1001 | | - "x": 6, |
| 1006 | + "x": 4, |
1002 | 1007 | "y": 6, |
1003 | | - "width": 6, |
1004 | | - "height": 3 |
| 1008 | + "width": 4, |
| 1009 | + "height": 2 |
| 1010 | + } |
| 1011 | + }, |
| 1012 | + { |
| 1013 | + "id": 5594150827125000, |
| 1014 | + "definition": { |
| 1015 | + "title": "Disk I/O", |
| 1016 | + "title_size": "16", |
| 1017 | + "title_align": "left", |
| 1018 | + "show_legend": false, |
| 1019 | + "legend_layout": "auto", |
| 1020 | + "legend_columns": [ |
| 1021 | + "avg", |
| 1022 | + "min", |
| 1023 | + "max", |
| 1024 | + "value", |
| 1025 | + "sum" |
| 1026 | + ], |
| 1027 | + "type": "timeseries", |
| 1028 | + "requests": [ |
| 1029 | + { |
| 1030 | + "response_format": "timeseries", |
| 1031 | + "queries": [ |
| 1032 | + { |
| 1033 | + "data_source": "metrics", |
| 1034 | + "name": "query1", |
| 1035 | + "query": "sum:kubernetes.io.write_bytes{$scope,$cluster,$namespace,$deployment,$statefulset,$daemonset,$job,$cronjob}" |
| 1036 | + }, |
| 1037 | + { |
| 1038 | + "data_source": "metrics", |
| 1039 | + "name": "query2", |
| 1040 | + "query": "sum:kubernetes.io.read_bytes{$scope,$cluster,$namespace,$deployment,$statefulset,$daemonset,$job,$cronjob}" |
| 1041 | + } |
| 1042 | + ], |
| 1043 | + "formulas": [ |
| 1044 | + { |
| 1045 | + "alias": "Write Bytes", |
| 1046 | + "formula": "query1" |
| 1047 | + }, |
| 1048 | + { |
| 1049 | + "alias": "Read Bytes", |
| 1050 | + "formula": "query2" |
| 1051 | + } |
| 1052 | + ], |
| 1053 | + "style": { |
| 1054 | + "palette": "grey", |
| 1055 | + "line_type": "solid", |
| 1056 | + "line_width": "normal" |
| 1057 | + }, |
| 1058 | + "display_type": "line" |
| 1059 | + } |
| 1060 | + ] |
| 1061 | + }, |
| 1062 | + "layout": { |
| 1063 | + "x": 8, |
| 1064 | + "y": 6, |
| 1065 | + "width": 4, |
| 1066 | + "height": 2 |
1005 | 1067 | } |
1006 | 1068 | } |
1007 | 1069 | ] |
|
1010 | 1072 | "x": 0, |
1011 | 1073 | "y": 13, |
1012 | 1074 | "width": 12, |
1013 | | - "height": 10 |
| 1075 | + "height": 9 |
1014 | 1076 | } |
1015 | 1077 | } |
1016 | 1078 | ], |
|
0 commit comments