Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/03-Metrics/02-hubble_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The table below outlines the different metrics generated.
| **networkobservability_drop_count** | Total dropped packet count | `direction`, `reason` | ✅ | ✅ |
| **networkobservability_drop_bytes** | Total dropped byte count | `direction`, `reason` | ✅ | ❌ |
| **networkobservability_tcp_state** | TCP currently active socket count by TCP state. | `state` | ✅ | ❌ |
| **networkobservability_tcp_connection_remote** | TCP currently active socket count by remote address. | `address` (IP:port) | ✅ | ❌ |
| **networkobservability_tcp_connection_remote** | TCP currently active socket count against remote addresses, aggregated across all of them. | `address` (always `AllIPs`) | ✅ | ❌ |
| **networkobservability_tcp_connection_stats** | TCP connection statistics. (ex: Delayed ACKs, TCPKeepAlive, TCPSackFailures) | `statistic_name` | ✅ | ✅ |
| **networkobservability_tcp_flag_gauges** | TCP packets count by flag. | `direction`, `flag` | ❌ | ✅ |
| **networkobservability_ip_connection_stats** | IP connection statistics. | `statistic_name` | ✅ | ❌ |
Expand Down
4 changes: 3 additions & 1 deletion docs/03-Metrics/modes/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ Metrics enabled when `linuxutil` plugin is enabled (see [Metrics Configuration](
| Metric Name | Description | Extra Labels |
| ----------------------- | ------------------------------------------------------------------------------- | ---------------------------------- |
| `tcp_state` | TCP currently active socket count by TCP state (from `netstats` utility) | `state` |
| `tcp_connection_remote` | TCP currently active socket count by remote address (from `netstats` utility) | `address` (IP:port) |
| `tcp_connection_remote` | TCP currently active socket count against remote addresses, aggregated (from `netstats` utility) | `address` (always `AllIPs`) |
| `tcp_connection_stats` | TCP connection statistics (from `netstats` utility) | `statistic_name` |
| `ip_connection_stats` | IP connection statistics (from `netstats` utility) | `statistic_name` |
| `udp_connection_stats` | UDP connection statistics (from `netstats` utility) | `statistic_name` |
| `interface_stats` | interface statistics (from `ethtool` utility) | `interface_name`, `statistic_name` |

#### Label Values

The `address` label of `tcp_connection_remote` is always `AllIPs`. Individual remote IP/port pairs are not exported, since that would make the metric's cardinality grow with the number of remote endpoints a node talks to.

Possible values for TCP `state`:

- `UNKNOWN`
Expand Down
6 changes: 2 additions & 4 deletions docs/06-Troubleshooting/basic-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ retina_ip_connection_stats{statistic_name="InECT0Pkts"} 34713
retina_ip_connection_stats{statistic_name="InNoECTPkts"} 3.8893357e+07
retina_ip_connection_stats{statistic_name="InOctets"} 1.6718610902e+10
retina_ip_connection_stats{statistic_name="OutOctets"} 2.7768258214e+10
# HELP retina_tcp_connection_remote number of active TCP connections by remote address
# HELP retina_tcp_connection_remote number of active TCP connections against remote addresses
# TYPE retina_tcp_connection_remote gauge
retina_tcp_connection_remote{address="0.0.0.0",port="0"} 8
retina_tcp_connection_remote{address="10.0.0.1",port="443"} 1
retina_tcp_connection_remote{address="10.224.0.105",port="7070"} 1
retina_tcp_connection_remote{address="AllIPs"} 10
# HELP retina_tcp_connection_stats TCP connections Statistics
# TYPE retina_tcp_connection_stats gauge
retina_tcp_connection_stats{statistic_name="DelayedACKLocked"} 107
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
nodeConnectivityStatusGaugeDescription = "The last observed status of both ICMP and HTTP connectivity between the current Cilium agent and other Cilium nodes"
nodeConnectivityLatencySecondsGaugeDescription = "The last observed latency between the current Cilium agent and other Cilium nodes in seconds"
tcpStateGaugeDescription = "Number of active TCP connections by state"
tcpConnectionRemoteGaugeDescription = "Number of active TCP connections by remote address"
tcpConnectionRemoteGaugeDescription = "Number of active TCP connections against remote addresses, aggregated across all of them"
tcpConnectionStatsGaugeDescription = "TCP connections statistics"
tcpFlagGaugeDescription = "TCP gauges by flag"
ipConnectionStatsGaugeDescription = "IP connections statistics"
Expand Down
6 changes: 4 additions & 2 deletions pkg/plugin/linuxutil/netstat_stats_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ import (
)

const (
pathNetNetstat = "/proc/net/netstat"
pathNetSnmp = "/proc/net/snmp"
pathNetNetstat = "/proc/net/netstat"
pathNetSnmp = "/proc/net/snmp"
// Remote sockets are aggregated under a single label value on purpose - exporting one
// series per remote IP/port makes the cardinality of this metric unbounded.
addrDefaultTCPRemote = "AllIPs"
)

Expand Down