Commit b626554
Vamsi Kalapala
feat: add a script to watch for drops (#1671)
# Description
This PR introduces a comprehensive script, designed to monitor network
packet drop counters in Kubernetes clusters. It automates the detection
of either Retina or Cilium network monitoring agents, retrieves relevant
metrics, and presents a clear, actionable summary of changes over time.
## Usage
<node_name>: The name of the Kubernetes node to monitor.
[interval]: The polling interval in seconds (default: 30).
--debug: Enables debug output.
## Technical Details
Agent Detection: Uses kubectl to identify Retina or Cilium pods based on
labels.
Metrics Retrieval: Employs curl to fetch metrics from agent and Hubble
endpoints.
Change Analysis: Compares metrics using associative arrays and awk for
numeric calculations.
Port Forwarding: Leverages kubectl port-forward to access metrics
endpoints.
## Dependencies
kubectl
curl
grep
sort
lsof (optional)
<img width="788" alt="image"
src="https://github.com/user-attachments/assets/476b9b3a-4d55-4984-90a7-26322de87c6a"
/>
---------
Signed-off-by: Vamsi Kalapala <vakr@microsoft.com>1 parent b76bbcd commit b626554
1 file changed
Lines changed: 752 additions & 0 deletions
0 commit comments