From 0a9365b238a804e51bbb91c01f8568e975c649dd Mon Sep 17 00:00:00 2001 From: ChenQingya Date: Fri, 3 Jan 2020 15:25:52 +0800 Subject: [PATCH] add advance tcp stats, like netstat -s --- container/libcontainer/handler.go | 81 ++++++ info/v1/container.go | 241 ++++++++++++++++ info/v2/container.go | 2 + metrics/prometheus.go | 409 ++++++++++++++++++++++++++++ metrics/prometheus_test.go | 101 +++++++ metrics/testdata/prometheus_metrics | 101 +++++++ 6 files changed, 935 insertions(+) diff --git a/container/libcontainer/handler.go b/container/libcontainer/handler.go index d7e6f6f2..6bad002e 100644 --- a/container/libcontainer/handler.go +++ b/container/libcontainer/handler.go @@ -16,6 +16,7 @@ package libcontainer import ( "bufio" + "encoding/json" "fmt" "io" "io/ioutil" @@ -106,6 +107,12 @@ func (h *Handler) GetStats() (*info.ContainerStats, error) { } else { stats.Network.Tcp6 = t6 } + ta, err := advanceTcpStatsFromProc(h.rootFs, h.pid, "net/netstat", "net/snmp") + if err != nil { + klog.V(4).Infof("Unable to get advance tcp stats from pid %d: %v", h.pid, err) + } else { + stats.Network.TcpAdvance = ta + } } if h.includedMetrics.Has(container.NetworkUdpUsageMetrics) { u, err := udpStatsFromProc(h.rootFs, h.pid, "net/udp") @@ -408,6 +415,80 @@ func tcpStatsFromProc(rootFs string, pid int, file string) (info.TcpStat, error) return tcpStats, nil } +func advanceTcpStatsFromProc(rootFs string, pid int, file1, file2 string) (info.TcpAdvanceStat, error) { + var advanceStats info.TcpAdvanceStat + var err error + + netstatFile := path.Join(rootFs, "proc", strconv.Itoa(pid), file1) + err = scanAdvanceTcpStats(&advanceStats, netstatFile) + if err != nil { + return advanceStats, err + } + + snmpFile := path.Join(rootFs, "proc", strconv.Itoa(pid), file2) + err = scanAdvanceTcpStats(&advanceStats, snmpFile) + if err != nil { + return advanceStats, err + } + + return advanceStats, nil +} + +func scanAdvanceTcpStats(advanceStats *info.TcpAdvanceStat, advanceTcpStatsFile string) error { + data, err := ioutil.ReadFile(advanceTcpStatsFile) + if err != nil { + return fmt.Errorf("failure opening %s: %v", advanceTcpStatsFile, err) + } + + reader := strings.NewReader(string(data)) + scanner := bufio.NewScanner(reader) + scanner.Split(bufio.ScanLines) + + advanceTcpStats := make(map[string]interface{}) + for scanner.Scan() { + nameParts := strings.Split(scanner.Text(), " ") + scanner.Scan() + valueParts := strings.Split(scanner.Text(), " ") + // Remove trailing :. and ignore non-tcp + protocol := nameParts[0][:len(nameParts[0])-1] + if protocol != "TcpExt" && protocol != "Tcp" { + continue + } + if len(nameParts) != len(valueParts) { + return fmt.Errorf("mismatch field count mismatch in %s: %s", + advanceTcpStatsFile, protocol) + } + for i := 1; i < len(nameParts); i++ { + if strings.Contains(valueParts[i], "-") { + vInt64, err := strconv.ParseInt(valueParts[i], 10, 64) + if err != nil { + return fmt.Errorf("decode value: %s to int64 error: %s", valueParts[i], err) + } + advanceTcpStats[nameParts[i]] = vInt64 + } else { + vUint64, err := strconv.ParseUint(valueParts[i], 10, 64) + if err != nil { + return fmt.Errorf("decode value: %s to uint64 error: %s", valueParts[i], err) + } + advanceTcpStats[nameParts[i]] = vUint64 + } + } + } + + b, err := json.Marshal(advanceTcpStats) + if err != nil { + return err + } + + err = json.Unmarshal(b, advanceStats) + if err != nil { + return err + } + + return scanner.Err() + +} + func scanTcpStats(tcpStatsFile string) (info.TcpStat, error) { var stats info.TcpStat diff --git a/info/v1/container.go b/info/v1/container.go index 4981f9b8..e0b85630 100644 --- a/info/v1/container.go +++ b/info/v1/container.go @@ -416,6 +416,8 @@ type NetworkStats struct { Udp UdpStat `json:"udp"` // UDP6 connection stats Udp6 UdpStat `json:"udp6"` + // Advance TCP stats + TcpAdvance TcpAdvanceStat `json:"tcp_advance"` } type TcpStat struct { @@ -443,6 +445,245 @@ type TcpStat struct { Closing uint64 } +type TcpAdvanceStat struct { + // The algorithm used to determine the timeout value used for + // retransmitting unacknowledged octets, ref: RFC2698, default 1 + RtoAlgorithm uint64 + // The minimum value permitted by a TCP implementation for the + // retransmission timeout, measured in milliseconds, default 200ms + RtoMin uint64 + // The maximum value permitted by a TCP implementation for the + // retransmission timeout, measured in milliseconds, default 120s + RtoMax uint64 + // The limit on the total number of TCP connections the entity + // can support., default -1, i.e. infinity + MaxConn int64 + + // The number of times TCP connections have made a direct + // transition to the SYN-SENT state from the CLOSED state. + ActiveOpens uint64 + // The number of times TCP connections have made a direct + // transition to the SYN-RCVD state from the LISTEN state. + PassiveOpens uint64 + // The number of times TCP connections have made a direct + // transition to the CLOSED state from either the SYN-SENT + // state or the SYN-RCVD state, plus the number of times TCP + // connections have made a direct transition to the LISTEN + // state from the SYN-RCVD state. + AttemptFails uint64 + // The number of times TCP connections have made a direct + // transition to the CLOSED state from either the ESTABLISHED + // state or the CLOSE-WAIT state. + EstabResets uint64 + // The number of TCP connections for which the current state + // is either ESTABLISHED or CLOSE- WAIT. + CurrEstab uint64 + + // The total number of segments received, including those + // received in error. + InSegs uint64 + // The total number of segments sent, including those on + // current connections but excluding those containing only + // retransmitted octets. + OutSegs uint64 + // The total number of segments retransmitted - that is, the + // number of TCP segments transmitted containing one or more + // previously transmitted octets. + RetransSegs uint64 + // The total number of segments received in error (e.g., bad + // TCP checksums). + InErrs uint64 + // The number of TCP segments sent containing the RST flag. + OutRsts uint64 + // The number of IP Packets with checksum errors + InCsumErrors uint64 + // The number of resets received for embryonic SYN_RECV sockets + EmbryonicRsts uint64 + + // The number of SYN cookies sent + SyncookiesSent uint64 + // The number of SYN cookies received + SyncookiesRecv uint64 + // The number of invalid SYN cookies received + SyncookiesFailed uint64 + + // The number of packets pruned from receive queue because of socket buffer overrun + PruneCalled uint64 + // The number of packets pruned from receive queue + RcvPruned uint64 + // The number of packets dropped from out-of-order queue because of socket buffer overrun + OfoPruned uint64 + // The number of ICMP packets dropped because they were out-of-window + OutOfWindowIcmps uint64 + // The number of ICMP packets dropped because socket was locked + LockDroppedIcmps uint64 + + // The number of TCP sockets finished time wait in fast timer + TW uint64 + // The number of time wait sockets recycled by time stamp + TWRecycled uint64 + // The number of TCP sockets finished time wait in slow timer + TWKilled uint64 + // counter, if no more mem for TIME-WAIT struct, +1 + TCPTimeWaitOverflow uint64 + + // The number of RTO timer first timeout times + TCPTimeouts uint64 + // The number of fake timeouts detected by F-RTO + TCPSpuriousRTOs uint64 + // The number of send Tail Loss Probe (TLP) times by Probe Timeout(PTO) + TCPLossProbes uint64 + // The number of recovery times by TLP + TCPLossProbeRecovery uint64 + // The number of RTO failed times when in Recovery state, and remote end has no sack + TCPRenoRecoveryFail uint64 + // The number of RTO failed times when in Recovery state, and remote end has sack + TCPSackRecoveryFail uint64 + // The number of RTO failed times when in TCP_CA_Disorder state, and remote end has no sack + TCPRenoFailures uint64 + // The number of RTO failed times when in TCP_CA_Disorder state, and remote end has sack + TCPSackFailures uint64 + // The number of RTO failed times when in TCP_CA_Loss state, + TCPLossFailures uint64 + + // The number of delayed acks sent + DelayedACKs uint64 + // The number of delayed acks further delayed because of locked socket + DelayedACKLocked uint64 + // The number of quick ack mode was activated times + DelayedACKLost uint64 + // The number of times the listen queue of a socket overflowed + ListenOverflows uint64 + // The number of SYNs to LISTEN sockets dropped + ListenDrops uint64 + // The number of packet headers predicted + TCPHPHits uint64 + // The number of acknowledgments not containing data payload received + TCPPureAcks uint64 + // The number of predicted acknowledgments + TCPHPAcks uint64 + // The number of times recovered from packet loss due to fast retransmit + TCPRenoRecovery uint64 + // The number of SACK retransmits failed + TCPSackRecovery uint64 + // The number of bad SACK blocks received + TCPSACKReneging uint64 + // The number of detected reordering times using FACK + TCPFACKReorder uint64 + // The number of detected reordering times using SACK + TCPSACKReorder uint64 + // The number of detected reordering times using Reno + TCPRenoReorder uint64 + // The number of detected reordering times using time stamp + TCPTSReorder uint64 + // The number of congestion windows fully recovered without slow start + TCPFullUndo uint64 + // The number of congestion windows partially recovered using Hoe heuristic + TCPPartialUndo uint64 + // The number of congestion windows recovered without slow start by DSACK + TCPDSACKUndo uint64 + // The number of congestion windows recovered without slow start after partial ack + TCPLossUndo uint64 + + // The number of fast retransmits + TCPFastRetrans uint64 + // The number of retransmits in slow start + TCPSlowStartRetrans uint64 + // The number of retransmits lost + TCPLostRetransmit uint64 + // The number of retransmits failed, including FastRetrans, SlowStartRetrans + TCPRetransFail uint64 + + // he number of packets collapsed in receive queue due to low socket buffer + TCPRcvCollapsed uint64 + // The number of DSACKs sent for old packets + TCPDSACKOldSent uint64 + // The number of DSACKs sent for out of order packets + TCPDSACKOfoSent uint64 + // The number of DSACKs received + TCPDSACKRecv uint64 + // The number of DSACKs for out of order packets received + TCPDSACKOfoRecv uint64 + // The number of connections reset due to unexpected data + TCPAbortOnData uint64 + // The number of connections reset due to early user close + TCPAbortOnClose uint64 + // The number of connections aborted due to memory pressure + TCPAbortOnMemory uint64 + // The number of connections aborted due to timeout + TCPAbortOnTimeout uint64 + // The number of connections aborted after user close in linger timeout + TCPAbortOnLinger uint64 + // The number of times unable to send RST due to no memory + TCPAbortFailed uint64 + // The number of TCP ran low on memory times + TCPMemoryPressures uint64 + // The number of TCP cumulative duration of + // memory pressure events, by ms + TCPMemoryPressuresChrono uint64 + // The number of SACKs discard + TCPSACKDiscard uint64 + // The number of DSACKs ignore old + TCPDSACKIgnoredOld uint64 + // The number of DSACKs ignore no undo + TCPDSACKIgnoredNoUndo uint64 + + // The number of MD5 not found + TCPMD5NotFound uint64 + // The number of MD5 unexpected + TCPMD5Unexpected uint64 + // The number of MD5 failed + TCPMD5Failure uint64 + // The number of Sack shifted + TCPSackShifted uint64 + // The number of Sack merged + TCPSackMerged uint64 + // The number of Sack shift fall back + TCPSackShiftFallback uint64 + // The number of Backlog drop + TCPBacklogDrop uint64 + // The number of PFmemalloc drop + PFMemallocDrop uint64 + // The number of memalloc drop + TCPMinTTLDrop uint64 + // The number of DeferAccept drop + TCPDeferAcceptDrop uint64 + // The number of IP reverse path filter + IPReversePathFilter uint64 + + // The number of request full do cookies + TCPReqQFullDoCookies uint64 + // The number of request full drop + TCPReqQFullDrop uint64 + + // number of successful outbound TFO connections + TCPFastOpenActive uint64 + // number of SYN-ACK packets received that did not acknowledge data + // sent in the SYN packet and caused a retransmissions without SYN data. + TCPFastOpenActiveFail uint64 + // number of successful inbound TFO connections + TCPFastOpenPassive uint64 + // number of inbound SYN packets with TFO cookie that was invalid + TCPFastOpenPassiveFail uint64 + // number of inbound SYN packets that will have TFO disabled because + // the socket has exceeded the max queue length + TCPFastOpenListenOverflow uint64 + // number of inbound SYN packets requesting TFO with TFO set but no cookie + TCPFastOpenCookieReqd uint64 + + // number of SYN and SYN/ACK retransmits to break down retransmissions + // into SYN, fast-retransmits, timeout retransmits, etc. + TCPSynRetrans uint64 + // number of outgoing packets with original data + // (excluding retransmission but including data-in-SYN). + TCPOrigDataSent uint64 + + // The number of active connections rejected because of time stamp + PAWSActive uint64 + // The number of packetes rejected in established connections because of timestamp + PAWSEstab uint64 +} + type UdpStat struct { // Count of UDP sockets in state "Listen" Listen uint64 diff --git a/info/v2/container.go b/info/v2/container.go index 43a8c879..71cf08de 100644 --- a/info/v2/container.go +++ b/info/v2/container.go @@ -290,6 +290,8 @@ type NetworkStats struct { Udp v1.UdpStat `json:"udp"` // UDP6 connection stats Udp6 v1.UdpStat `json:"udp6"` + // Advance TCP stats + TcpAdvance v1.TcpAdvanceStat `json:"tcp_advance"` } // Instantaneous CPU stats diff --git a/metrics/prometheus.go b/metrics/prometheus.go index 95a43e82..938dfd2d 100644 --- a/metrics/prometheus.go +++ b/metrics/prometheus.go @@ -960,6 +960,415 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri }, }, }...) + c.containerMetrics = append(c.containerMetrics, []containerMetric{ + { + name: "container_network_advance_tcp_stats_total", + help: "advance tcp connections statistic for container", + valueType: prometheus.GaugeValue, + extraLabels: []string{"tcp_state"}, + getValues: func(s *info.ContainerStats) metricValues { + return metricValues{ + { + value: float64(s.Network.TcpAdvance.RtoAlgorithm), + labels: []string{"rtoalgorithm"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.RtoMin), + labels: []string{"rtomin"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.RtoMax), + labels: []string{"rtomax"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.MaxConn), + labels: []string{"maxconn"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.ActiveOpens), + labels: []string{"activeopens"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.PassiveOpens), + labels: []string{"passiveopens"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.AttemptFails), + labels: []string{"attemptfails"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.EstabResets), + labels: []string{"estabresets"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.CurrEstab), + labels: []string{"currestab"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.InSegs), + labels: []string{"insegs"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.OutSegs), + labels: []string{"outsegs"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.RetransSegs), + labels: []string{"retranssegs"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.InErrs), + labels: []string{"inerrs"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.OutRsts), + labels: []string{"outrsts"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.InCsumErrors), + labels: []string{"incsumerrors"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.EmbryonicRsts), + labels: []string{"embryonicrsts"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.SyncookiesSent), + labels: []string{"syncookiessent"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.SyncookiesRecv), + labels: []string{"syncookiesrecv"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.SyncookiesFailed), + labels: []string{"syncookiesfailed"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.PruneCalled), + labels: []string{"prunecalled"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.RcvPruned), + labels: []string{"rcvpruned"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.OfoPruned), + labels: []string{"ofopruned"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.OutOfWindowIcmps), + labels: []string{"outofwindowicmps"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.LockDroppedIcmps), + labels: []string{"lockdroppedicmps"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TW), + labels: []string{"tw"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TWRecycled), + labels: []string{"twrecycled"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TWKilled), + labels: []string{"twkilled"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPTimeWaitOverflow), + labels: []string{"tcptimewaitoverflow"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPTimeouts), + labels: []string{"tcptimeouts"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSpuriousRTOs), + labels: []string{"tcpspuriousrtos"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPLossProbes), + labels: []string{"tcplossprobes"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPLossProbeRecovery), + labels: []string{"tcplossproberecovery"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPRenoRecoveryFail), + labels: []string{"tcprenorecoveryfail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSackRecoveryFail), + labels: []string{"tcpsackrecoveryfail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPRenoFailures), + labels: []string{"tcprenofailures"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSackFailures), + labels: []string{"tcpsackfailures"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPLossFailures), + labels: []string{"tcplossfailures"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.DelayedACKs), + labels: []string{"delayedacks"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.DelayedACKLocked), + labels: []string{"delayedacklocked"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.DelayedACKLost), + labels: []string{"delayedacklost"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.ListenOverflows), + labels: []string{"listenoverflows"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.ListenDrops), + labels: []string{"listendrops"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPHPHits), + labels: []string{"tcphphits"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPPureAcks), + labels: []string{"tcppureacks"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPHPAcks), + labels: []string{"tcphpacks"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPRenoRecovery), + labels: []string{"tcprenorecovery"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSackRecovery), + labels: []string{"tcpsackrecovery"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSACKReneging), + labels: []string{"tcpsackreneging"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFACKReorder), + labels: []string{"tcpfackreorder"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSACKReorder), + labels: []string{"tcpsackreorder"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPRenoReorder), + labels: []string{"tcprenoreorder"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPTSReorder), + labels: []string{"tcptsreorder"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFullUndo), + labels: []string{"tcpfullundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPPartialUndo), + labels: []string{"tcppartialundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPDSACKUndo), + labels: []string{"tcpdsackundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPLossUndo), + labels: []string{"tcplossundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFastRetrans), + labels: []string{"tcpfastretrans"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSlowStartRetrans), + labels: []string{"tcpslowstartretrans"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPLostRetransmit), + labels: []string{"tcplostretransmit"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPRetransFail), + labels: []string{"tcpretransfail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPRcvCollapsed), + labels: []string{"tcprcvcollapsed"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPDSACKOldSent), + labels: []string{"tcpdsackoldsent"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPDSACKOfoSent), + labels: []string{"tcpdsackofosent"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPDSACKRecv), + labels: []string{"tcpdsackrecv"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPDSACKOfoRecv), + labels: []string{"tcpdsackoforecv"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPAbortOnData), + labels: []string{"tcpabortondata"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPAbortOnClose), + labels: []string{"tcpabortonclose"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPAbortOnMemory), + labels: []string{"tcpabortonmemory"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPAbortOnTimeout), + labels: []string{"tcpabortontimeout"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPAbortOnLinger), + labels: []string{"tcpabortonlinger"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPAbortFailed), + labels: []string{"tcpabortfailed"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPMemoryPressures), + labels: []string{"tcpmemorypressures"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPMemoryPressuresChrono), + labels: []string{"tcpmemorypressureschrono"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSACKDiscard), + labels: []string{"tcpsackdiscard"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPDSACKIgnoredOld), + labels: []string{"tcpdsackignoredold"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPDSACKIgnoredNoUndo), + labels: []string{"tcpdsackignorednoundo"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPMD5NotFound), + labels: []string{"tcpmd5notfound"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPMD5Unexpected), + labels: []string{"tcpmd5unexpected"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPMD5Failure), + labels: []string{"tcpmd5failure"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSackShifted), + labels: []string{"tcpsackshifted"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSackMerged), + labels: []string{"tcpsackmerged"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSackShiftFallback), + labels: []string{"tcpsackshiftfallback"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPBacklogDrop), + labels: []string{"tcpbacklogdrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.PFMemallocDrop), + labels: []string{"pfmemallocdrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPMinTTLDrop), + labels: []string{"tcpminttldrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPDeferAcceptDrop), + labels: []string{"tcpdeferacceptdrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.IPReversePathFilter), + labels: []string{"ipreversepathfilter"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPReqQFullDoCookies), + labels: []string{"tcpreqqfulldocookies"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPReqQFullDrop), + labels: []string{"tcpreqqfulldrop"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFastOpenActive), + labels: []string{"tcpfastopenactive"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFastOpenActiveFail), + labels: []string{"tcpfastopenactivefail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFastOpenPassive), + labels: []string{"tcpfastopenpassive"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFastOpenPassiveFail), + labels: []string{"tcpfastopenpassivefail"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFastOpenListenOverflow), + labels: []string{"tcpfastopenlistenoverflow"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPFastOpenCookieReqd), + labels: []string{"tcpfastopencookiereqd"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPSynRetrans), + labels: []string{"tcpsynretrans"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.TCPOrigDataSent), + labels: []string{"tcporigdatasent"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.PAWSActive), + labels: []string{"pawsactive"}, + timestamp: s.Timestamp, + }, { + value: float64(s.Network.TcpAdvance.PAWSEstab), + labels: []string{"pawsestab"}, + timestamp: s.Timestamp, + }, + } + }, + }, + }...) } if includedMetrics.Has(container.NetworkUdpUsageMetrics) { c.containerMetrics = append(c.containerMetrics, []containerMetric{ diff --git a/metrics/prometheus_test.go b/metrics/prometheus_test.go index 23572cec..7d859e27 100644 --- a/metrics/prometheus_test.go +++ b/metrics/prometheus_test.go @@ -185,6 +185,107 @@ func (p testSubcontainersInfoProvider) SubcontainersInfo(string, *info.Container Listen: 3, Closing: 0, }, + TcpAdvance: info.TcpAdvanceStat{ + TCPFullUndo: 2361, + TCPMD5NotFound: 0, + TCPDSACKRecv: 83680, + TCPSackShifted: 2, + TCPSackShiftFallback: 298, + PFMemallocDrop: 0, + EstabResets: 37, + InSegs: 140370590, + TCPPureAcks: 24251339, + TCPDSACKOldSent: 15633, + IPReversePathFilter: 0, + TCPFastOpenPassiveFail: 0, + InCsumErrors: 0, + TCPRenoFailures: 43414, + TCPMemoryPressuresChrono: 0, + TCPDeferAcceptDrop: 0, + TW: 10436427, + TCPSpuriousRTOs: 0, + TCPDSACKIgnoredNoUndo: 71885, + RtoMax: 120000, + ActiveOpens: 11038621, + EmbryonicRsts: 0, + RcvPruned: 0, + TCPLossProbeRecovery: 401, + TCPHPHits: 56096478, + TCPPartialUndo: 3, + TCPAbortOnMemory: 0, + AttemptFails: 48997, + RetransSegs: 462961, + SyncookiesFailed: 0, + OfoPruned: 0, + TCPAbortOnLinger: 0, + TCPAbortFailed: 0, + TCPRenoReorder: 839, + TCPRcvCollapsed: 0, + TCPDSACKIgnoredOld: 0, + TCPReqQFullDrop: 0, + OutOfWindowIcmps: 0, + TWKilled: 0, + TCPLossProbes: 88648, + TCPRenoRecoveryFail: 394, + TCPFastOpenCookieReqd: 0, + TCPHPAcks: 21490641, + TCPSACKReneging: 0, + TCPTSReorder: 3, + TCPSlowStartRetrans: 290832, + MaxConn: -1, + SyncookiesRecv: 0, + TCPSackFailures: 60, + DelayedACKLocked: 90, + TCPDSACKOfoSent: 1, + TCPSynRetrans: 988, + TCPDSACKOfoRecv: 10, + TCPSACKDiscard: 0, + TCPMD5Unexpected: 0, + TCPSackMerged: 6, + RtoMin: 200, + CurrEstab: 22, + TCPTimeWaitOverflow: 0, + ListenOverflows: 0, + DelayedACKs: 503975, + TCPLossUndo: 61374, + TCPOrigDataSent: 130698387, + TCPBacklogDrop: 0, + TCPReqQFullDoCookies: 0, + TCPFastOpenPassive: 0, + PAWSActive: 0, + OutRsts: 91699, + TCPSackRecoveryFail: 2, + DelayedACKLost: 18843, + TCPAbortOnData: 8, + TCPMinTTLDrop: 0, + PruneCalled: 0, + TWRecycled: 0, + ListenDrops: 0, + TCPAbortOnTimeout: 0, + SyncookiesSent: 0, + TCPSACKReorder: 11, + TCPDSACKUndo: 33, + TCPMD5Failure: 0, + TCPLostRetransmit: 0, + TCPAbortOnClose: 7, + TCPFastOpenListenOverflow: 0, + OutSegs: 211580512, + InErrs: 31, + TCPTimeouts: 27422, + TCPLossFailures: 729, + TCPSackRecovery: 159, + RtoAlgorithm: 1, + PassiveOpens: 59, + LockDroppedIcmps: 0, + TCPRenoRecovery: 3519, + TCPFACKReorder: 0, + TCPFastRetrans: 11794, + TCPRetransFail: 0, + TCPMemoryPressures: 0, + TCPFastOpenActive: 0, + TCPFastOpenActiveFail: 0, + PAWSEstab: 0, + }, Udp: info.UdpStat{ Listen: 0, Dropped: 0, diff --git a/metrics/testdata/prometheus_metrics b/metrics/testdata/prometheus_metrics index 39238d4a..863b7020 100644 --- a/metrics/testdata/prometheus_metrics +++ b/metrics/testdata/prometheus_metrics @@ -142,6 +142,107 @@ container_memory_usage_bytes{container_env_foo_env="prod",container_label_foo_la # HELP container_memory_working_set_bytes Current working set in bytes. # TYPE container_memory_working_set_bytes gauge container_memory_working_set_bytes{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",zone_name="hello"} 9 1395066363000 +# HELP container_network_advance_tcp_stats_total advance tcp connections statistic for container +# TYPE container_network_advance_tcp_stats_total gauge +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="activeopens",zone_name="hello"} 1.1038621e+07 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="attemptfails",zone_name="hello"} 48997 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="currestab",zone_name="hello"} 22 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="delayedacklocked",zone_name="hello"} 90 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="delayedacklost",zone_name="hello"} 18843 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="delayedacks",zone_name="hello"} 503975 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="embryonicrsts",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="estabresets",zone_name="hello"} 37 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="incsumerrors",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="inerrs",zone_name="hello"} 31 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="insegs",zone_name="hello"} 1.4037059e+08 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="ipreversepathfilter",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="listendrops",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="listenoverflows",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="lockdroppedicmps",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="maxconn",zone_name="hello"} -1 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="ofopruned",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="outofwindowicmps",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="outrsts",zone_name="hello"} 91699 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="outsegs",zone_name="hello"} 2.11580512e+08 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="passiveopens",zone_name="hello"} 59 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="pawsactive",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="pawsestab",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="pfmemallocdrop",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="prunecalled",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="rcvpruned",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="retranssegs",zone_name="hello"} 462961 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="rtoalgorithm",zone_name="hello"} 1 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="rtomax",zone_name="hello"} 120000 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="rtomin",zone_name="hello"} 200 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="syncookiesfailed",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="syncookiesrecv",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="syncookiessent",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpabortfailed",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpabortonclose",zone_name="hello"} 7 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpabortondata",zone_name="hello"} 8 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpabortonlinger",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpabortonmemory",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpabortontimeout",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpbacklogdrop",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpdeferacceptdrop",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpdsackignorednoundo",zone_name="hello"} 71885 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpdsackignoredold",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpdsackoforecv",zone_name="hello"} 10 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpdsackofosent",zone_name="hello"} 1 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpdsackoldsent",zone_name="hello"} 15633 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpdsackrecv",zone_name="hello"} 83680 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpdsackundo",zone_name="hello"} 33 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfackreorder",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfastopenactive",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfastopenactivefail",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfastopencookiereqd",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfastopenlistenoverflow",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfastopenpassive",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfastopenpassivefail",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfastretrans",zone_name="hello"} 11794 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpfullundo",zone_name="hello"} 2361 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcphpacks",zone_name="hello"} 2.1490641e+07 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcphphits",zone_name="hello"} 5.6096478e+07 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcplossfailures",zone_name="hello"} 729 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcplossproberecovery",zone_name="hello"} 401 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcplossprobes",zone_name="hello"} 88648 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcplossundo",zone_name="hello"} 61374 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcplostretransmit",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpmd5failure",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpmd5notfound",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpmd5unexpected",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpmemorypressures",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpmemorypressureschrono",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpminttldrop",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcporigdatasent",zone_name="hello"} 1.30698387e+08 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcppartialundo",zone_name="hello"} 3 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcppureacks",zone_name="hello"} 2.4251339e+07 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcprcvcollapsed",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcprenofailures",zone_name="hello"} 43414 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcprenorecovery",zone_name="hello"} 3519 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcprenorecoveryfail",zone_name="hello"} 394 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcprenoreorder",zone_name="hello"} 839 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpreqqfulldocookies",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpreqqfulldrop",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpretransfail",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackdiscard",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackfailures",zone_name="hello"} 60 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackmerged",zone_name="hello"} 6 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackrecovery",zone_name="hello"} 159 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackrecoveryfail",zone_name="hello"} 2 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackreneging",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackreorder",zone_name="hello"} 11 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackshifted",zone_name="hello"} 2 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsackshiftfallback",zone_name="hello"} 298 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpslowstartretrans",zone_name="hello"} 290832 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpspuriousrtos",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcpsynretrans",zone_name="hello"} 988 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcptimeouts",zone_name="hello"} 27422 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcptimewaitoverflow",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tcptsreorder",zone_name="hello"} 3 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="tw",zone_name="hello"} 1.0436427e+07 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="twkilled",zone_name="hello"} 0 1395066363000 +container_network_advance_tcp_stats_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",name="testcontaineralias",tcp_state="twrecycled",zone_name="hello"} 0 1395066363000 # HELP container_network_receive_bytes_total Cumulative count of bytes received # TYPE container_network_receive_bytes_total counter container_network_receive_bytes_total{container_env_foo_env="prod",container_label_foo_label="bar",id="testcontainer",image="test",interface="eth0",name="testcontaineralias",zone_name="hello"} 14 1395066363000