Skip to content

Commit 402528b

Browse files
committed
fix issues
1 parent 04f7c24 commit 402528b

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

content/posts/2023-12-05-acm.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ data:
145145
146146
# Namespaces / cluster ingress|egress
147147
- record: namespace:netobserv_workload_egress_bytes_total:src:unknown_dst:rate5m
148-
expr: sum(label_replace(rate(netobserv_workload_egress_bytes_total{DstK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"SrcK8S_Namespace\",\"(.*)\")) by (namespace)
148+
expr: sum(label_replace(rate(netobserv_workload_egress_bytes_total{ DstK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"SrcK8S_Namespace\",\"(.*)\")) by (namespace)
149149
- record: namespace:netobserv_workload_ingress_bytes_total:dst:unknown_src:rate5m
150-
expr: sum(label_replace(rate(netobserv_workload_ingress_bytes_total{SrcK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"DstK8S_Namespace\",\"(.*)\")) by (namespace)
150+
expr: sum(label_replace(rate(netobserv_workload_ingress_bytes_total{ SrcK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"DstK8S_Namespace\",\"(.*)\")) by (namespace)
151151
- record: namespace:netobserv_workload_egress_packets_total:src:unknown_dst:rate5m
152-
expr: sum(label_replace(rate(netobserv_workload_egress_packets_total{DstK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"SrcK8S_Namespace\",\"(.*)\")) by (namespace)
152+
expr: sum(label_replace(rate(netobserv_workload_egress_packets_total{ DstK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"SrcK8S_Namespace\",\"(.*)\")) by (namespace)
153153
- record: namespace:netobserv_workload_ingress_packets_total:dst:unknown_src:rate5m
154-
expr: sum(label_replace(rate(netobserv_workload_ingress_packets_total{SrcK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"DstK8S_Namespace\",\"(.*)\")) by (namespace)
154+
expr: sum(label_replace(rate(netobserv_workload_ingress_packets_total{ SrcK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"DstK8S_Namespace\",\"(.*)\")) by (namespace)
155155
156156
# Workloads
157157
- record: workload:netobserv_workload_egress_bytes_total:src:rate5m
@@ -251,9 +251,9 @@ We would end up with these two new rules:
251251

252252
```yaml
253253
- record: workload:netobserv_workload_egress_bytes_total:src:unknown_dst:rate5m
254-
expr: sum(label_replace(label_replace(label_replace(rate(netobserv_workload_egress_bytes_total{DstK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"SrcK8S_Namespace\",\"(.*)\"),\"workload\",\"$1\",\"SrcK8S_OwnerName\",\"(.*)\"),\"kind\",\"$1\",\"SrcK8S_OwnerType\",\"(.*)\")) by (namespace,workload,kind)
254+
expr: sum(label_replace(label_replace(label_replace(rate(netobserv_workload_egress_bytes_total{ DstK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"SrcK8S_Namespace\",\"(.*)\"),\"workload\",\"$1\",\"SrcK8S_OwnerName\",\"(.*)\"),\"kind\",\"$1\",\"SrcK8S_OwnerType\",\"(.*)\")) by (namespace,workload,kind)
255255
- record: workload:netobserv_workload_ingress_bytes_total:dst:unknown_src:rate5m
256-
expr: sum(label_replace(label_replace(label_replace(rate(netobserv_workload_ingress_bytes_total{SrcK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"DstK8S_Namespace\",\"(.*)\"),\"workload\",\"$1\",\"DstK8S_OwnerName\",\"(.*)\"),\"kind\",\"$1\",\"DstK8S_OwnerType\",\"(.*)\")) by (namespace,workload,kind)
256+
expr: sum(label_replace(label_replace(label_replace(rate(netobserv_workload_ingress_bytes_total{ SrcK8S_OwnerType=\"\"}[5m]),\"namespace\",\"$1\",\"DstK8S_Namespace\",\"(.*)\"),\"workload\",\"$1\",\"DstK8S_OwnerName\",\"(.*)\"),\"kind\",\"$1\",\"DstK8S_OwnerType\",\"(.*)\")) by (namespace,workload,kind)
257257
```
258258

259259
Be careful about escaping double-quotes, though it's not very pretty, it is necessary: else you would end up with a parsing error. Also, the `label_replace` chained calls here could be avoided as they look messy, but they make it actually easier to manipulate those metrics later on, in Grafana.

content/posts/2024-02-28-whats_new_1.5.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,13 @@ labels:
176176
When you create this instance or make any changes to FlowMetric, the flowlogs-pipeline pods will restart automatically. Now go to **Observe > Metrics** and enter `netobserv_ingress_external_bytes_total` (don't forget the prefix "netobserv_"). Because of the label, it separates out each destination namespace in its own graph line. Try out the other PromQL queries below.
177177

178178
1. Graph the number of bytes incoming on namespace "openshift-ingress". You can replace with any namespace.
179-
`netobserv_ingress_external_bytes_total{DstK8S_Namespace="openshift-ingress"}`
179+
`netobserv_ingress_external_bytes_total{ DstK8S_Namespace="openshift-ingress"}`
180180

181181
2. In some cases like "openshift-dns", you might get more than one graph line because it's running on multiple pods. Use `sum` to combine them into one graph line.
182-
`sum(netobserv_ingress_external_bytes_total{DstK8S_Namespace="openshift-dns"})`
182+
`sum(netobserv_ingress_external_bytes_total{ DstK8S_Namespace="openshift-dns"})`
183183

184184
3. Graph the average rate over a 5-minute interval.
185-
`sum(rate(netobserv_ingress_external_bytes_total{DstK8S_Namespace="openshift-ingress"}[5m]))`
185+
`sum(rate(netobserv_ingress_external_bytes_total{ DstK8S_Namespace="openshift-ingress"}[5m]))`
186186

187187
## Conclusion
188188

content/posts/2024-04-05-agent_metrics_perf.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The dashboard shows a stable number of flows captured per second, most of the ti
5151

5252
![Flows per second]({page.image('agent_metrics_perf/fps-1.png')})
5353

54-
We may also check the `hey-ho` traffic captured by NetObserv, in bytes per second, with this `promql` query: `sum(rate(netobserv_workload_ingress_bytes_total{DstK8S_Namespace=~"gallery.*",DstK8S_OwnerType="Deployment"}[2m]))`. It is very stable at 4MBps:
54+
We may also check the `hey-ho` traffic captured by NetObserv, in bytes per second, with this `promql` query: `sum(rate(netobserv_workload_ingress_bytes_total{ DstK8S_Namespace=~"gallery.*",DstK8S_OwnerType="Deployment"}[2m]))`. It is very stable at 4MBps:
5555

5656
![Hey-ho traffic]({page.image('agent_metrics_perf/heyho-mbps-1.png')})
5757

@@ -120,7 +120,7 @@ Even if there are five metrics, it shows mostly three things: the deduper cache
120120

121121
The buffer size metrics tell us that the hashmaps are containing between 15K and 25K elements, which is a sum for every eBPF agent pods. We are interested to know if the hashmap configuration isn't over-sized. We can click the Inspect link and edit a little bit the promQL to see per-pod utilization:
122122

123-
`netobserv_agent_buffer_size{name="hashmap-unique"}` shows per-pod maps size, or `max(netobserv_agent_buffer_size{name="hashmap-unique"})` shows the maximum map utilization across pods.
123+
`netobserv_agent_buffer_size{ name="hashmap-unique"}` shows per-pod maps size, or `max(netobserv_agent_buffer_size{ name="hashmap-unique"})` shows the maximum map utilization across pods.
124124

125125
![Per-pod size]({page.image('agent_metrics_perf/per-pod-hashmap-size.png')})
126126

content/posts/2024-10-23-whats_new_1.6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ _<div style="text-align: center">Figure 7: Not 'ip' filter</div>_
168168
By default, the OpenShift auto-detect mode is enabled to identify internal CIDRs as `Pods`, `Services`, `Machines` or `n/a` for not applicable. While CIDRs can be internal or external, they are typically external to allow you to provide a custom name for them. If you use a naming convention such as prefixing "Ext_" for all cluster-external traffic, then you can create a custom metric for this. Here's a PromQL that displays a graph of external traffic in bytes over a 1-minute period.
169169
170170
```
171-
sum(rate(netobserv_workload_egress_bytes_total{DstSubnetLabel=~"|Ext_.*"}[1m]))
171+
sum(rate(netobserv_workload_egress_bytes_total{ DstSubnetLabel=~"|Ext_.*"}[1m]))
172172
```
173173
174174
This assumes the `workload_egress_bytes_total` metric has been included in `processor.metrics.includeList`. See my [Network Observability 1.5 blog](https://developers.redhat.com/articles/2024/03/20/whats-new-network-observability-15) on how to do this.

0 commit comments

Comments
 (0)