Skip to content

Commit 3fc9829

Browse files
committed
address feedback and improve mocks
1 parent 983b94d commit 3fc9829

File tree

12 files changed

+1129
-74
lines changed

12 files changed

+1129
-74
lines changed

mocks/loki/flow_metrics_cluster.json

Lines changed: 116 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,142 @@
44
"resultType": "matrix",
55
"result": [
66
{
7-
"metric": {},
7+
"metric": {
8+
"K8S_ClusterName": "production-cluster"
9+
},
10+
"values": [
11+
[
12+
1708009560,
13+
"320.5"
14+
],
15+
[
16+
1708009920,
17+
"385.2"
18+
],
19+
[
20+
1708010280,
21+
"425.8"
22+
],
23+
[
24+
1708010640,
25+
"445.3"
26+
],
27+
[
28+
1708011000,
29+
"438.7"
30+
],
31+
[
32+
1708011360,
33+
"465.1"
34+
],
35+
[
36+
1708011720,
37+
"478.9"
38+
]
39+
]
40+
},
41+
{
42+
"metric": {
43+
"K8S_ClusterName": "staging-cluster"
44+
},
45+
"values": [
46+
[
47+
1708009560,
48+
"180.3"
49+
],
50+
[
51+
1708009920,
52+
"225.8"
53+
],
54+
[
55+
1708010280,
56+
"245.2"
57+
],
58+
[
59+
1708010640,
60+
"258.7"
61+
],
62+
[
63+
1708011000,
64+
"252.1"
65+
],
66+
[
67+
1708011360,
68+
"268.5"
69+
],
70+
[
71+
1708011720,
72+
"275.2"
73+
]
74+
]
75+
},
76+
{
77+
"metric": {
78+
"K8S_ClusterName": "development-cluster"
79+
},
80+
"values": [
81+
[
82+
1708009560,
83+
"95.8"
84+
],
85+
[
86+
1708009920,
87+
"112.5"
88+
],
89+
[
90+
1708010280,
91+
"128.3"
92+
],
93+
[
94+
1708010640,
95+
"135.7"
96+
],
97+
[
98+
1708011000,
99+
"132.2"
100+
],
101+
[
102+
1708011360,
103+
"142.8"
104+
],
105+
[
106+
1708011720,
107+
"148.5"
108+
]
109+
]
110+
},
111+
{
112+
"metric": {
113+
"K8S_ClusterName": "edge-cluster"
114+
},
8115
"values": [
9116
[
10117
1708009560,
11-
"149.26388888888889"
118+
"65.2"
12119
],
13120
[
14121
1708009920,
15-
"374.69722222222225"
122+
"78.5"
16123
],
17124
[
18125
1708010280,
19-
"453.8902777777778"
126+
"85.1"
20127
],
21128
[
22129
1708010640,
23-
"478.52638888888896"
130+
"92.3"
24131
],
25132
[
26133
1708011000,
27-
"467.9861111111112"
134+
"88.7"
28135
],
29136
[
30137
1708011360,
31-
"511.25972222222225"
138+
"95.2"
32139
],
33140
[
34141
1708011720,
35-
"518.5291666666666"
142+
"98.8"
36143
]
37144
]
38145
}
@@ -46,7 +153,7 @@
46153
"execTime": 0.718415087,
47154
"queueTime": 11.360357994,
48155
"subqueries": 0,
49-
"totalEntriesReturned": 1,
156+
"totalEntriesReturned": 4,
50157
"splits": 6,
51158
"shards": 48,
52159
"totalPostFilterLines": 199944,

mocks/loki/flow_metrics_dropped_owner.json

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,106 @@
184184
"0.001388888888888889"
185185
]
186186
]
187+
},
188+
{
189+
"metric": {
190+
"DstK8S_Namespace": "production",
191+
"DstK8S_OwnerName": "gateway-api",
192+
"DstK8S_OwnerType": "Gateway",
193+
"SrcK8S_Namespace": "production",
194+
"SrcK8S_OwnerName": "web-deployment",
195+
"SrcK8S_OwnerType": "Deployment"
196+
},
197+
"values": [
198+
[
199+
1708011360,
200+
"0.5"
201+
],
202+
[
203+
1708011720,
204+
"0.8"
205+
]
206+
]
207+
},
208+
{
209+
"metric": {
210+
"DstK8S_Namespace": "gateway-system",
211+
"DstK8S_OwnerName": "gateway-external",
212+
"DstK8S_OwnerType": "Gateway",
213+
"SrcK8S_Namespace": "gateway-system",
214+
"SrcK8S_OwnerName": "gateway-internal",
215+
"SrcK8S_OwnerType": "Gateway"
216+
},
217+
"values": [
218+
[
219+
1708011360,
220+
"0.3"
221+
],
222+
[
223+
1708011720,
224+
"0.6"
225+
]
226+
]
227+
},
228+
{
229+
"metric": {
230+
"DstK8S_Namespace": "vms",
231+
"DstK8S_OwnerName": "vm-ubuntu-server",
232+
"DstK8S_OwnerType": "VirtualMachine",
233+
"SrcK8S_Namespace": "vms",
234+
"SrcK8S_OwnerName": "vm-centos-server",
235+
"SrcK8S_OwnerType": "VirtualMachine"
236+
},
237+
"values": [
238+
[
239+
1708011360,
240+
"0.2"
241+
],
242+
[
243+
1708011720,
244+
"0.4"
245+
]
246+
]
247+
},
248+
{
249+
"metric": {
250+
"DstK8S_Namespace": "vms",
251+
"DstK8S_OwnerName": "vmi-windows",
252+
"DstK8S_OwnerType": "VirtualMachineInstance",
253+
"SrcK8S_Namespace": "vms",
254+
"SrcK8S_OwnerName": "vmi-linux",
255+
"SrcK8S_OwnerType": "VirtualMachineInstance"
256+
},
257+
"values": [
258+
[
259+
1708011360,
260+
"0.15"
261+
],
262+
[
263+
1708011720,
264+
"0.35"
265+
]
266+
]
267+
},
268+
{
269+
"metric": {
270+
"DstK8S_Namespace": "production",
271+
"DstK8S_OwnerName": "app-deployment",
272+
"DstK8S_OwnerType": "Deployment",
273+
"SrcK8S_Namespace": "vms",
274+
"SrcK8S_OwnerName": "vm-ubuntu-server",
275+
"SrcK8S_OwnerType": "VirtualMachine"
276+
},
277+
"values": [
278+
[
279+
1708011360,
280+
"0.1"
281+
],
282+
[
283+
1708011720,
284+
"0.25"
285+
]
286+
]
187287
}
188288
],
189289
"stats": {
@@ -195,7 +295,7 @@
195295
"execTime": 0.509199253,
196296
"queueTime": 5.761458995,
197297
"subqueries": 0,
198-
"totalEntriesReturned": 11,
298+
"totalEntriesReturned": 16,
199299
"splits": 6,
200300
"shards": 48,
201301
"totalPostFilterLines": 810,

mocks/loki/flow_metrics_dropped_udn.json

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,68 @@
3232
"0.49166666666666664"
3333
]
3434
]
35+
},
36+
{
37+
"metric": {
38+
"DstK8S_NetworkName": "production-network",
39+
"DstK8S_Type": "UserDefinedNetwork",
40+
"SrcAddr": "10.128.0.90",
41+
"SrcK8S_Name": "app-pod-1",
42+
"SrcK8S_Namespace": "production",
43+
"SrcK8S_OwnerName": "app-deployment",
44+
"SrcK8S_OwnerType": "Deployment",
45+
"SrcK8S_Type": "Pod"
46+
},
47+
"values": [
48+
[
49+
1708011360,
50+
"0.15"
51+
],
52+
[
53+
1708011720,
54+
"0.25"
55+
]
56+
]
57+
},
58+
{
59+
"metric": {
60+
"DstK8S_NetworkName": "development-network",
61+
"DstK8S_Type": "UserDefinedNetwork",
62+
"SrcK8S_NetworkName": "production-network",
63+
"SrcK8S_Type": "UserDefinedNetwork"
64+
},
65+
"values": [
66+
[
67+
1708011360,
68+
"0.08"
69+
],
70+
[
71+
1708011720,
72+
"0.12"
73+
]
74+
]
75+
},
76+
{
77+
"metric": {
78+
"DstK8S_NetworkName": "cluster-network",
79+
"DstK8S_Type": "ClusterUserDefinedNetwork",
80+
"SrcAddr": "10.128.0.100",
81+
"SrcK8S_Name": "cluster-pod",
82+
"SrcK8S_Namespace": "kube-system",
83+
"SrcK8S_OwnerName": "cluster-deployment",
84+
"SrcK8S_OwnerType": "Deployment",
85+
"SrcK8S_Type": "Pod"
86+
},
87+
"values": [
88+
[
89+
1708011360,
90+
"0.1"
91+
],
92+
[
93+
1708011720,
94+
"0.18"
95+
]
96+
]
3597
}
3698
],
3799
"stats": {
@@ -43,7 +105,7 @@
43105
"execTime": 0.585506558,
44106
"queueTime": 5.295528995,
45107
"subqueries": 0,
46-
"totalEntriesReturned": 2,
108+
"totalEntriesReturned": 5,
47109
"splits": 6,
48110
"shards": 48,
49111
"totalPostFilterLines": 810,

0 commit comments

Comments
 (0)