Skip to content

Commit

Permalink
addressed reviewer comments on PR36
Browse files Browse the repository at this point in the history
  • Loading branch information
KalmanMeth committed Jan 20, 2022
1 parent 029a2aa commit 0bbd83c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 39 deletions.
12 changes: 6 additions & 6 deletions contrib/dashboards/jsonnet/dashboard_details.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ dashboard.new(
.addPanel(
graphPanel.new(
datasource='prometheus',
title="Bandwidth per src and destination subnet",
title="Bandwidth per network service",
)
.addTarget(
prometheus.target(
expr='topk(10,rate(fl2m_bandwidthPerSourceDestinationSubnet[1m]))',
expr='topk(10,rate(fl2m_bandwidth_per_network_service[1m]))',
)
), gridPos={
x: 0,
Expand All @@ -34,11 +34,11 @@ dashboard.new(
.addPanel(
graphPanel.new(
datasource='prometheus',
title="Bandwidth per network service",
title="Bandwidth per src and destination subnet",
)
.addTarget(
prometheus.target(
expr='topk(10,rate(fl2m_bandwidth_per_network_service[1m]))',
expr='topk(10,rate(fl2m_bandwidth_per_source_destination_subnet[1m]))',
)
), gridPos={
x: 0,
Expand Down Expand Up @@ -146,11 +146,11 @@ dashboard.new(
.addPanel(
graphPanel.new(
datasource='prometheus',
title="Count of src / destination subnet occurences",
title="Connections rate of src / destination subnet occurences",
)
.addTarget(
prometheus.target(
expr='topk(10,rate(fl2m_countPerSourceDestinationSubnet[1m]))',
expr='topk(10,rate(fl2m_count_per_source_destination_subnet[1m]))',
)
), gridPos={
x: 0,
Expand Down
28 changes: 14 additions & 14 deletions contrib/kubernetes/flowlogs2metrics.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ pipeline:
encode:
prom:
metrics:
- name: bandwidthPerSourceDestinationSubnet
- name: bandwidth_per_network_service
type: gauge
valuekey: bandwidth_source_destination_subnet_value
valuekey: bandwidth_network_service_value
labels:
- by
- aggregate
buckets: []
- name: bandwidth_per_network_service
- name: bandwidth_per_source_destination_subnet
type: gauge
valuekey: bandwidth_network_service_value
valuekey: bandwidth_source_destination_subnet_value
labels:
- by
- aggregate
Expand Down Expand Up @@ -62,7 +62,7 @@ pipeline:
- by
- aggregate
buckets: []
- name: countPerSourceDestinationSubnet
- name: count_per_source_destination_subnet
type: gauge
valuekey: count_source_destination_subnet_value
labels:
Expand Down Expand Up @@ -116,15 +116,15 @@ pipeline:
type: prom
extract:
aggregates:
- name: bandwidth_source_destination_subnet
- name: bandwidth_network_service
by:
- dstSubnet24
- srcSubnet24
- service
operation: sum
recordkey: bytes
- name: bandwidth_network_service
- name: bandwidth_source_destination_subnet
by:
- service
- dstSubnet24
- srcSubnet24
operation: sum
recordkey: bytes
- name: bandwidth_source_subnet
Expand Down Expand Up @@ -222,6 +222,10 @@ pipeline:
type: generic
- network:
rules:
- input: dstPort
output: service
type: add_service
parameters: proto
- input: dstIP
output: dstSubnet24
type: add_subnet
Expand All @@ -230,10 +234,6 @@ pipeline:
output: srcSubnet24
type: add_subnet
parameters: /24
- input: dstPort
output: service
type: add_service
parameters: proto
- input: srcIP
output: srcSubnet
type: add_subnet
Expand Down
28 changes: 14 additions & 14 deletions docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ and the transformation to generate the exported metric.



### bandwdth per src dest subnet
| **Description** | This metric observes the network bandwidth per source and destination subnets |
|:---|:---|
| **Details** | Sum bandwidth bytes for all traffic per source / destination subnet pair |
| **Usage** | Evaluate network usage breakdown per source / destination subnet pair |
| **Labels** | bandwidth, graph, rate, subnet |
| **Operation** | aggregate by `dstSubnet24, srcSubnet24` and `sum` field `bytes` |
| **Exposed as** | `fl2m_bandwidthPerSourceDestinationSubnet` of type `gauge` |
| **Visualized as** | "Bandwidth per src and destination subnet" on dashboard `details` |
|||


### bandwidth per network service
| **Description** | This metric observes the network bandwidth per network service |
|:---|:---|
Expand All @@ -36,6 +24,18 @@ and the transformation to generate the exported metric.
|||


### bandwidth per src dest subnet
| **Description** | This metric observes the network bandwidth per source and destination subnets |
|:---|:---|
| **Details** | Sum bandwidth bytes for all traffic per source / destination subnet pair |
| **Usage** | Evaluate network usage breakdown per source / destination subnet pair |
| **Labels** | bandwidth, graph, rate, subnet |
| **Operation** | aggregate by `dstSubnet24, srcSubnet24` and `sum` field `bytes` |
| **Exposed as** | `fl2m_bandwidth_per_source_destination_subnet` of type `gauge` |
| **Visualized as** | "Bandwidth per src and destination subnet" on dashboard `details` |
|||


### bandwidth per src subnet
| **Description** | This metric observes the network bandwidth per source subnet |
|:---|:---|
Expand Down Expand Up @@ -115,8 +115,8 @@ and the transformation to generate the exported metric.
| **Usage** | Evaluate network usage breakdown per source / destination subnet pair |
| **Labels** | count, graph, rate, subnet |
| **Operation** | aggregate by `dstSubnet24, srcSubnet24` and `count` |
| **Exposed as** | `fl2m_countPerSourceDestinationSubnet` of type `gauge` |
| **Visualized as** | "Count of src / destination subnet occurences" on dashboard `details` |
| **Exposed as** | `fl2m_count_per_source_destination_subnet` of type `gauge` |
| **Visualized as** | "Connections rate of src / destination subnet occurences" on dashboard `details` |
|||


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ encode:
type: prom
prom:
metrics:
- name: bandwidthPerSourceDestinationSubnet
- name: bandwidth_per_source_destination_subnet
type: gauge
valuekey: bandwidth_source_destination_subnet_value
labels:
Expand All @@ -41,7 +41,7 @@ encode:
visualization:
type: grafana
grafana:
- expr: 'topk(10,rate(fl2m_bandwidthPerSourceDestinationSubnet[1m]))'
- expr: 'topk(10,rate(fl2m_bandwidth_per_source_destination_subnet[1m]))'
type: graphPanel
dashboard: details
title:
Expand Down
6 changes: 3 additions & 3 deletions network_definitions/count_per_src_dest_subnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ encode:
type: prom
prom:
metrics:
- name: countPerSourceDestinationSubnet
- name: count_per_source_destination_subnet
type: gauge
valuekey: count_source_destination_subnet_value
labels:
Expand All @@ -40,8 +40,8 @@ encode:
visualization:
type: grafana
grafana:
- expr: 'topk(10,rate(fl2m_countPerSourceDestinationSubnet[1m]))'
- expr: 'topk(10,rate(fl2m_count_per_source_destination_subnet[1m]))'
type: graphPanel
dashboard: details
title:
Count of src / destination subnet occurences
Connections rate of src / destination subnet occurences

0 comments on commit 0bbd83c

Please sign in to comment.