-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: revamp site + update docs (#762)
# Description Please provide a brief description of the changes made in this pull request. - Revamped the site - Update docs which should closes #755 and #507 ## Related Issue If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request. ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed Please add any relevant screenshots or GIFs to showcase the changes made. ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project.
- Loading branch information
Showing
59 changed files
with
2,813 additions
and
573 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"MD013": false, | ||
"MD010": false, | ||
"MD033": false, | ||
"MD024": { | ||
"siblings_only": true | ||
} | ||
|
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
27 changes: 14 additions & 13 deletions
27
...03-Metrics/plugins/ciliumeventobserver.md → ...rics/plugins/Linux/ciliumeventobserver.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 |
---|---|---|
@@ -1,30 +1,31 @@ | ||
# `ciliumEventObserver` (Linux) | ||
# `ciliumEventObserver` | ||
|
||
Collect agent and perf events from cilium via monitor1_2 socket. This allows us to serve additional metrics and flows alongside Cilium events. | ||
|
||
## Architecture | ||
|
||
Cilium collects events and sends these events through the cilium monitor1_2 socket. These events can be categorized as Event Sample or Lost Record. Event samples can be broken down into different categories: Agent events or Perf Events. | ||
Access Log events are events such as DNS resolutions matching a cilium node policy while Agent Events can be any cilium agent events. | ||
Perf Events are bpf related events such as drop, trace, policy verdict, or capture events. | ||
|
||
The cilium plugin will listen on this socket for these events, decode the payload and reconstruct either an Agent Event or a Perf Event. These events are then decoded using a lightweight cilium parser. Once these events are decoded into a flow object, it is then passed to the external channel. The retina daemon listens for these events and send it to our monitor agent. Our hubble observer will consume these events and process the flows using our own custom [parsers](https://github.com/microsoft/retina/tree/main/pkg/hubble/parser). | ||
|
||
### Code locations | ||
|
||
- Plugin and eBPF code: *pkg/plugin/ciliumeventobserver/* | ||
|
||
## Metrics | ||
|
||
The metrics will be dependent on our custom parsers. For now, we have L34 parser and L7 parser for dns and http. | ||
We currently do not support Agent or Access Log events from cilium itself. | ||
This [metrics reference](https://docs.cilium.io/en/stable/observability/metrics/#metrics-reference) from cilium can give an idea of what metrics can be added. | ||
|
||
At the moment, we can see metrics such as: | ||
|
||
| Name | Description | Extra Labels | | ||
| ----------------------- | ----------------------- | ------------- | | ||
| `hubble_drop_total` | Number of drops | destination, protocol, reason, source | | ||
| `hubble_tcp_flags_total` | TCP flag occurrences | destination, family, flag, source | | ||
| `hubble_metrics_http_handler_request_duration_seconds` | A histogram of latencies of Hubble metrics handler. | code, le | | ||
| `hubble_flows_processed_total` | Total number of flows processed | destination, protocol, subtype, type, verdict | | ||
| `hubble_metrics_http_handler_requests_total` | A counter for requests to Hubble metrics handler. | code | | ||
|
||
## Architecture | ||
|
||
Cilium collects events and sends these events through the cilium monitor1_2 socket. These events can be categorized as Event Sample or Lost Record. Event samples can be broken down into different categories: Agent events or Perf Events. | ||
Access Log events are events such as DNS resolutions matching a cilium node policy while Agent Events can be any cilium agent events. | ||
Perf Events are bpf related events such as drop, trace, policy verdict, or capture events. | ||
|
||
The cilium plugin will listen on this socket for these events, decode the payload and reconstruct either an Agent Event or a Perf Event. These events are then decoded using a lightweight cilium parser. Once these events are decoded into a flow object, it is then passed to the external channel. The retina daemon listens for these events and send it to our monitor agent. Our hubble observer will consume these events and process the flows using our own custom [parsers](https://github.com/microsoft/retina/tree/main/pkg/hubble/parser). | ||
|
||
### Code locations | ||
|
||
- Plugin and eBPF code: *pkg/plugin/ciliumeventobserver/* |
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
12 changes: 6 additions & 6 deletions
12
docs/03-Metrics/plugins/dropreason.md → docs/03-Metrics/plugins/Linux/dropreason.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# `packetforward` | ||
|
||
Counts number of packets/bytes passing through the `eth0` interface of a Node, along with the direction of the packets. | ||
|
||
## Architecture | ||
|
||
`packetforward` uses an eBPF socket filter program on the host's primary interface to capture packets and generate basic metrics from the captured data. | ||
|
||
### Code locations | ||
|
||
- Plugin and eBPF code: *pkg/plugin/packetforward/* | ||
|
||
## Metrics | ||
|
||
See metrics for [Basic Mode](../../modes/basic.md#plugin-packetforward-linux) (Advanced modes have identical metrics). | ||
|
||
:::note | ||
|
||
`adv_forward_count` and `adv_forward_bytes` metrics are NOT associated with `packetforward` plugin despite similarities in name. | ||
These metrics are associated with [`packetparser`](./packetparser.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,48 @@ | ||
# `packetparser` | ||
|
||
Captures TCP and UDP packets traveling to and from pods and nodes. | ||
|
||
## Architecture | ||
|
||
`packetparser` attached a [`qdisc` (Queuing Discipline)](https://www.man7.org/linux/man-pages/man8/tc.8.html) of type `clsact` to each pod's virtual interface (`veth`) and the host's default interface (`device`). This setup enabled the attachment of eBPF filter programs for both ingress and egress directions, allowing `packetparser` to capture individual packets traveling to and from the interfaces. | ||
|
||
`packetparser` does not produce Basic metrics. In Advanced mode (refer to [Metric Modes](../../modes/modes.md)), the plugin transforms an eBPF result into an enriched `Flow` by adding Pod information based on IP. It then sends the `Flow` to an external channel, enabling *several modules* to generate Pod-Level metrics. | ||
|
||
### Code locations | ||
|
||
- Plugin and eBPF code: *pkg/plugin/packetparser/* | ||
- Modules for extra Advanced metrics: see section below. | ||
|
||
## Metrics | ||
|
||
See metrics for [Advanced Mode](../../modes/advanced.md#plugin-packetparser-linux). For module information, see [below](#modules). | ||
|
||
### Modules | ||
|
||
#### Module: forward | ||
|
||
Code path: *pkg/module/metrics/forward.go* | ||
|
||
Metrics produced: | ||
|
||
- `adv_forward_count` | ||
- `adv_forward_bytes` | ||
|
||
#### Module: tcpflags | ||
|
||
Code path: *pkg/module/metrics/tcpflags.go* | ||
|
||
Metrics produced: | ||
|
||
- `adv_forward_count` | ||
- `adv_forward_bytes` | ||
|
||
#### Module: latency (API Server) | ||
|
||
Code path: *pkg/module/metrics/latency.go* | ||
|
||
Metrics produced: | ||
|
||
- `adv_node_apiserver_latency` | ||
- `adv_node_apiserver_no_response` | ||
- `adv_node_apiserver_tcp_handshake_latency` |
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,18 @@ | ||
# `tcpretrans` | ||
|
||
Measures retransmitted TCP packets. | ||
|
||
## Architecture | ||
|
||
The plugin utilizes eBPF to gather data. | ||
The plugin does not generate Basic metrics. | ||
In Advanced mode (see [Metric Modes](../../modes/modes.md)), the plugin turns an eBPF result into an enriched `Flow` (adding Pod information based on IP), then sends the `Flow` to an external channel so that a tcpretrans module can create Pod-Level metrics. | ||
|
||
### Code locations | ||
|
||
- Plugin and eBPF code: *pkg/plugin/tcpretrans/* | ||
- Module for extra Advanced metrics: *pkg/module/metrics/tcpretrans.go* | ||
|
||
## Metrics | ||
|
||
See metrics for [Advanced Mode](../../modes/advanced.md#plugin-tcpretrans-linux). |
10 changes: 5 additions & 5 deletions
10
docs/03-Metrics/plugins/hnsstats.md → docs/03-Metrics/plugins/Windows/hnsstats.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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# `hnsstats` (Windows) | ||
# `hnsstats` | ||
|
||
Gathers TCP statistics and counts number of packets/bytes forwarded or dropped in HNS and VFP. | ||
|
||
## Metrics | ||
|
||
See metrics for [Basic Mode](../modes/basic.md#plugin-hnsstats-windows) (Advanced modes have identical metrics). | ||
|
||
## Architecture | ||
|
||
Interfaces with a Windows Node's HNS (Host Networking System) and VFP (Virtual Filtering Platform). | ||
|
||
### Code Locations | ||
|
||
- Plugin code interfacing with HNS/VFP: *pkg/plugin/windows/hnsstats* | ||
|
||
## Metrics | ||
|
||
See metrics for [Basic Mode](../../modes/basic.md#plugin-hnsstats-windows) (Advanced modes have identical metrics). |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.