Skip to content

Commit 0bbd83c

Browse files
committed
addressed reviewer comments on PR36
1 parent 029a2aa commit 0bbd83c

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

contrib/dashboards/jsonnet/dashboard_details.jsonnet

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ dashboard.new(
1818
.addPanel(
1919
graphPanel.new(
2020
datasource='prometheus',
21-
title="Bandwidth per src and destination subnet",
21+
title="Bandwidth per network service",
2222
)
2323
.addTarget(
2424
prometheus.target(
25-
expr='topk(10,rate(fl2m_bandwidthPerSourceDestinationSubnet[1m]))',
25+
expr='topk(10,rate(fl2m_bandwidth_per_network_service[1m]))',
2626
)
2727
), gridPos={
2828
x: 0,
@@ -34,11 +34,11 @@ dashboard.new(
3434
.addPanel(
3535
graphPanel.new(
3636
datasource='prometheus',
37-
title="Bandwidth per network service",
37+
title="Bandwidth per src and destination subnet",
3838
)
3939
.addTarget(
4040
prometheus.target(
41-
expr='topk(10,rate(fl2m_bandwidth_per_network_service[1m]))',
41+
expr='topk(10,rate(fl2m_bandwidth_per_source_destination_subnet[1m]))',
4242
)
4343
), gridPos={
4444
x: 0,
@@ -146,11 +146,11 @@ dashboard.new(
146146
.addPanel(
147147
graphPanel.new(
148148
datasource='prometheus',
149-
title="Count of src / destination subnet occurences",
149+
title="Connections rate of src / destination subnet occurences",
150150
)
151151
.addTarget(
152152
prometheus.target(
153-
expr='topk(10,rate(fl2m_countPerSourceDestinationSubnet[1m]))',
153+
expr='topk(10,rate(fl2m_count_per_source_destination_subnet[1m]))',
154154
)
155155
), gridPos={
156156
x: 0,

contrib/kubernetes/flowlogs2metrics.conf.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ pipeline:
66
encode:
77
prom:
88
metrics:
9-
- name: bandwidthPerSourceDestinationSubnet
9+
- name: bandwidth_per_network_service
1010
type: gauge
11-
valuekey: bandwidth_source_destination_subnet_value
11+
valuekey: bandwidth_network_service_value
1212
labels:
1313
- by
1414
- aggregate
1515
buckets: []
16-
- name: bandwidth_per_network_service
16+
- name: bandwidth_per_source_destination_subnet
1717
type: gauge
18-
valuekey: bandwidth_network_service_value
18+
valuekey: bandwidth_source_destination_subnet_value
1919
labels:
2020
- by
2121
- aggregate
@@ -62,7 +62,7 @@ pipeline:
6262
- by
6363
- aggregate
6464
buckets: []
65-
- name: countPerSourceDestinationSubnet
65+
- name: count_per_source_destination_subnet
6666
type: gauge
6767
valuekey: count_source_destination_subnet_value
6868
labels:
@@ -116,15 +116,15 @@ pipeline:
116116
type: prom
117117
extract:
118118
aggregates:
119-
- name: bandwidth_source_destination_subnet
119+
- name: bandwidth_network_service
120120
by:
121-
- dstSubnet24
122-
- srcSubnet24
121+
- service
123122
operation: sum
124123
recordkey: bytes
125-
- name: bandwidth_network_service
124+
- name: bandwidth_source_destination_subnet
126125
by:
127-
- service
126+
- dstSubnet24
127+
- srcSubnet24
128128
operation: sum
129129
recordkey: bytes
130130
- name: bandwidth_source_subnet
@@ -222,6 +222,10 @@ pipeline:
222222
type: generic
223223
- network:
224224
rules:
225+
- input: dstPort
226+
output: service
227+
type: add_service
228+
parameters: proto
225229
- input: dstIP
226230
output: dstSubnet24
227231
type: add_subnet
@@ -230,10 +234,6 @@ pipeline:
230234
output: srcSubnet24
231235
type: add_subnet
232236
parameters: /24
233-
- input: dstPort
234-
output: service
235-
type: add_service
236-
parameters: proto
237237
- input: srcIP
238238
output: srcSubnet
239239
type: add_subnet

docs/metrics.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ and the transformation to generate the exported metric.
1212

1313

1414

15-
### bandwdth per src dest subnet
16-
| **Description** | This metric observes the network bandwidth per source and destination subnets |
17-
|:---|:---|
18-
| **Details** | Sum bandwidth bytes for all traffic per source / destination subnet pair |
19-
| **Usage** | Evaluate network usage breakdown per source / destination subnet pair |
20-
| **Labels** | bandwidth, graph, rate, subnet |
21-
| **Operation** | aggregate by `dstSubnet24, srcSubnet24` and `sum` field `bytes` |
22-
| **Exposed as** | `fl2m_bandwidthPerSourceDestinationSubnet` of type `gauge` |
23-
| **Visualized as** | "Bandwidth per src and destination subnet" on dashboard `details` |
24-
|||
25-
26-
2715
### bandwidth per network service
2816
| **Description** | This metric observes the network bandwidth per network service |
2917
|:---|:---|
@@ -36,6 +24,18 @@ and the transformation to generate the exported metric.
3624
|||
3725

3826

27+
### bandwidth per src dest subnet
28+
| **Description** | This metric observes the network bandwidth per source and destination subnets |
29+
|:---|:---|
30+
| **Details** | Sum bandwidth bytes for all traffic per source / destination subnet pair |
31+
| **Usage** | Evaluate network usage breakdown per source / destination subnet pair |
32+
| **Labels** | bandwidth, graph, rate, subnet |
33+
| **Operation** | aggregate by `dstSubnet24, srcSubnet24` and `sum` field `bytes` |
34+
| **Exposed as** | `fl2m_bandwidth_per_source_destination_subnet` of type `gauge` |
35+
| **Visualized as** | "Bandwidth per src and destination subnet" on dashboard `details` |
36+
|||
37+
38+
3939
### bandwidth per src subnet
4040
| **Description** | This metric observes the network bandwidth per source subnet |
4141
|:---|:---|
@@ -115,8 +115,8 @@ and the transformation to generate the exported metric.
115115
| **Usage** | Evaluate network usage breakdown per source / destination subnet pair |
116116
| **Labels** | count, graph, rate, subnet |
117117
| **Operation** | aggregate by `dstSubnet24, srcSubnet24` and `count` |
118-
| **Exposed as** | `fl2m_countPerSourceDestinationSubnet` of type `gauge` |
119-
| **Visualized as** | "Count of src / destination subnet occurences" on dashboard `details` |
118+
| **Exposed as** | `fl2m_count_per_source_destination_subnet` of type `gauge` |
119+
| **Visualized as** | "Connections rate of src / destination subnet occurences" on dashboard `details` |
120120
|||
121121

122122

network_definitions/bandwdth_per_src_dest_subnet.yaml renamed to network_definitions/bandwidth_per_src_dest_subnet.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ encode:
3232
type: prom
3333
prom:
3434
metrics:
35-
- name: bandwidthPerSourceDestinationSubnet
35+
- name: bandwidth_per_source_destination_subnet
3636
type: gauge
3737
valuekey: bandwidth_source_destination_subnet_value
3838
labels:
@@ -41,7 +41,7 @@ encode:
4141
visualization:
4242
type: grafana
4343
grafana:
44-
- expr: 'topk(10,rate(fl2m_bandwidthPerSourceDestinationSubnet[1m]))'
44+
- expr: 'topk(10,rate(fl2m_bandwidth_per_source_destination_subnet[1m]))'
4545
type: graphPanel
4646
dashboard: details
4747
title:

network_definitions/count_per_src_dest_subnet.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ encode:
3131
type: prom
3232
prom:
3333
metrics:
34-
- name: countPerSourceDestinationSubnet
34+
- name: count_per_source_destination_subnet
3535
type: gauge
3636
valuekey: count_source_destination_subnet_value
3737
labels:
@@ -40,8 +40,8 @@ encode:
4040
visualization:
4141
type: grafana
4242
grafana:
43-
- expr: 'topk(10,rate(fl2m_countPerSourceDestinationSubnet[1m]))'
43+
- expr: 'topk(10,rate(fl2m_count_per_source_destination_subnet[1m]))'
4444
type: graphPanel
4545
dashboard: details
4646
title:
47-
Count of src / destination subnet occurences
47+
Connections rate of src / destination subnet occurences

0 commit comments

Comments
 (0)