-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stale entry removal functionality to the process cache. This won't affect normal operations, but in the event that a custom ref count has been placed on an entry and not removed (for whatever reason, maybe logic error, maybe missed event, etc), remove entries where the process and all its children have exited at least 10 minutes ago. Record a metric when entries are removed. Signed-off-by: Kevin Sheldrake <kevin.sheldrake@isovalent.com>
- Loading branch information
1 parent
5c4652c
commit 83eff54
Showing
11 changed files
with
312 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
docs/content/en/docs/use-cases/network-observability/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "Network observability" | ||
weight: 3 | ||
icon: "overview" | ||
description: "Monitor TCP connect using kprobe hooks" | ||
--- | ||
|
||
To view TCP connect events, apply the example TCP connect `TracingPolicy`: | ||
|
||
```bash | ||
kubectl apply -f https://raw.githubusercontent.com/cilium/tetragon/main/examples/tracingpolicy/tcp-connect.yaml | ||
``` | ||
|
||
To start monitoring events in the `xwing` pod run the Tetragon CLI: | ||
|
||
```bash | ||
kubectl logs -n kube-system -l app.kubernetes.io/name=tetragon -c export-stdout -f | tetra getevents -o compact --namespace default --pod xwing | ||
``` | ||
|
||
In another terminal, start generate a TCP connection. Here we use | ||
curl. | ||
```bash | ||
kubectl exec -it xwing -- curl http://cilium.io | ||
``` | ||
The output in the first terminal will capture the new connect and write, | ||
```bash | ||
🚀 process default/xwing /usr/bin/curl http://cilium.io | ||
🔌 connect default/xwing /usr/bin/curl tcp 10.244.0.6:34965 -> 104.198.14.52:80 | ||
📤 sendmsg default/xwing /usr/bin/curl tcp 10.244.0.6:34965 -> 104.198.14.52:80 bytes 73 | ||
🧹 close default/xwing /usr/bin/curl tcp 10.244.0.6:34965 -> 104.198.14.52:80 | ||
💥 exit default/xwing /usr/bin/curl http://cilium.io 0 | ||
``` | ||
|
||
To disable the TracingPolicy run: | ||
```bash | ||
kubectl delete -f https://raw.githubusercontent.com/cilium/tetragon/main/examples/tracingpolicy/tcp-connect.yaml | ||
``` |
37 changes: 37 additions & 0 deletions
37
docs/content/en/docs/use-cases/network-observability/approved-dns-servers.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "Network observability" | ||
weight: 3 | ||
icon: "overview" | ||
description: "Monitor TCP connect using kprobe hooks" | ||
--- | ||
|
||
To view TCP connect events, apply the example TCP connect `TracingPolicy`: | ||
|
||
```bash | ||
kubectl apply -f https://raw.githubusercontent.com/cilium/tetragon/main/examples/tracingpolicy/tcp-connect.yaml | ||
``` | ||
|
||
To start monitoring events in the `xwing` pod run the Tetragon CLI: | ||
|
||
```bash | ||
kubectl logs -n kube-system -l app.kubernetes.io/name=tetragon -c export-stdout -f | tetra getevents -o compact --namespace default --pod xwing | ||
``` | ||
|
||
In another terminal, start generate a TCP connection. Here we use | ||
curl. | ||
```bash | ||
kubectl exec -it xwing -- curl http://cilium.io | ||
``` | ||
The output in the first terminal will capture the new connect and write, | ||
```bash | ||
🚀 process default/xwing /usr/bin/curl http://cilium.io | ||
🔌 connect default/xwing /usr/bin/curl tcp 10.244.0.6:34965 -> 104.198.14.52:80 | ||
📤 sendmsg default/xwing /usr/bin/curl tcp 10.244.0.6:34965 -> 104.198.14.52:80 bytes 73 | ||
🧹 close default/xwing /usr/bin/curl tcp 10.244.0.6:34965 -> 104.198.14.52:80 | ||
💥 exit default/xwing /usr/bin/curl http://cilium.io 0 | ||
``` | ||
|
||
To disable the TracingPolicy run: | ||
```bash | ||
kubectl delete -f https://raw.githubusercontent.com/cilium/tetragon/main/examples/tracingpolicy/tcp-connect.yaml | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.