Merge pull request #2369 from KielChan/add-netmetrics

add advanced tcp stats, like netstat -s
This commit is contained in:
David Ashpole 2020-01-07 12:01:24 -08:00 committed by GitHub
commit 0ff17b8d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 988 additions and 37 deletions

View File

@ -77,22 +77,24 @@ var (
// Metrics to be ignored.
// Tcp metrics are ignored by default.
ignoreMetrics metricSetValue = metricSetValue{container.MetricSet{
container.NetworkTcpUsageMetrics: struct{}{},
container.NetworkUdpUsageMetrics: struct{}{},
container.ProcessSchedulerMetrics: struct{}{},
container.ProcessMetrics: struct{}{},
container.NetworkTcpUsageMetrics: struct{}{},
container.NetworkUdpUsageMetrics: struct{}{},
container.NetworkAdvancedTcpUsageMetrics: struct{}{},
container.ProcessSchedulerMetrics: struct{}{},
container.ProcessMetrics: struct{}{},
}}
// List of metrics that can be ignored.
ignoreWhitelist = container.MetricSet{
container.DiskUsageMetrics: struct{}{},
container.DiskIOMetrics: struct{}{},
container.NetworkUsageMetrics: struct{}{},
container.NetworkTcpUsageMetrics: struct{}{},
container.NetworkUdpUsageMetrics: struct{}{},
container.PerCpuUsageMetrics: struct{}{},
container.ProcessSchedulerMetrics: struct{}{},
container.ProcessMetrics: struct{}{},
container.DiskUsageMetrics: struct{}{},
container.DiskIOMetrics: struct{}{},
container.NetworkUsageMetrics: struct{}{},
container.NetworkTcpUsageMetrics: struct{}{},
container.NetworkAdvancedTcpUsageMetrics: struct{}{},
container.NetworkUdpUsageMetrics: struct{}{},
container.PerCpuUsageMetrics: struct{}{},
container.ProcessSchedulerMetrics: struct{}{},
container.ProcessMetrics: struct{}{},
}
)
@ -269,6 +271,7 @@ func toIncludedMetrics(ignoreMetrics container.MetricSet) container.MetricSet {
container.DiskUsageMetrics,
container.NetworkUsageMetrics,
container.NetworkTcpUsageMetrics,
container.NetworkAdvancedTcpUsageMetrics,
container.NetworkUdpUsageMetrics,
container.AcceleratorUsageMetrics,
container.AppMetrics,

View File

@ -28,6 +28,12 @@ func TestTcpMetricsAreDisabledByDefault(t *testing.T) {
assert.True(t, ignoreMetrics.Has(container.NetworkTcpUsageMetrics))
}
func TestAdvancedTcpMetricsAreDisabledByDefault(t *testing.T) {
assert.True(t, ignoreMetrics.Has(container.NetworkAdvancedTcpUsageMetrics))
flag.Parse()
assert.True(t, ignoreMetrics.Has(container.NetworkAdvancedTcpUsageMetrics))
}
func TestUdpMetricsAreDisabledByDefault(t *testing.T) {
assert.True(t, ignoreMetrics.Has(container.NetworkUdpUsageMetrics))
flag.Parse()

View File

@ -43,19 +43,20 @@ type ContainerHandlerFactory interface {
type MetricKind string
const (
CpuUsageMetrics MetricKind = "cpu"
ProcessSchedulerMetrics MetricKind = "sched"
PerCpuUsageMetrics MetricKind = "percpu"
MemoryUsageMetrics MetricKind = "memory"
CpuLoadMetrics MetricKind = "cpuLoad"
DiskIOMetrics MetricKind = "diskIO"
DiskUsageMetrics MetricKind = "disk"
NetworkUsageMetrics MetricKind = "network"
NetworkTcpUsageMetrics MetricKind = "tcp"
NetworkUdpUsageMetrics MetricKind = "udp"
AcceleratorUsageMetrics MetricKind = "accelerator"
AppMetrics MetricKind = "app"
ProcessMetrics MetricKind = "process"
CpuUsageMetrics MetricKind = "cpu"
ProcessSchedulerMetrics MetricKind = "sched"
PerCpuUsageMetrics MetricKind = "percpu"
MemoryUsageMetrics MetricKind = "memory"
CpuLoadMetrics MetricKind = "cpuLoad"
DiskIOMetrics MetricKind = "diskIO"
DiskUsageMetrics MetricKind = "disk"
NetworkUsageMetrics MetricKind = "network"
NetworkTcpUsageMetrics MetricKind = "tcp"
NetworkAdvancedTcpUsageMetrics MetricKind = "advtcp"
NetworkUdpUsageMetrics MetricKind = "udp"
AcceleratorUsageMetrics MetricKind = "accelerator"
AppMetrics MetricKind = "app"
ProcessMetrics MetricKind = "process"
)
func (mk MetricKind) String() string {

View File

@ -16,6 +16,7 @@ package libcontainer
import (
"bufio"
"encoding/json"
"fmt"
"io"
"io/ioutil"
@ -106,6 +107,15 @@ func (h *Handler) GetStats() (*info.ContainerStats, error) {
} else {
stats.Network.Tcp6 = t6
}
}
if h.includedMetrics.Has(container.NetworkAdvancedTcpUsageMetrics) {
ta, err := advancedTcpStatsFromProc(h.rootFs, h.pid, "net/netstat", "net/snmp")
if err != nil {
klog.V(4).Infof("Unable to get advanced tcp stats from pid %d: %v", h.pid, err)
} else {
stats.Network.TcpAdvanced = ta
}
}
if h.includedMetrics.Has(container.NetworkUdpUsageMetrics) {
u, err := udpStatsFromProc(h.rootFs, h.pid, "net/udp")
@ -408,6 +418,80 @@ func tcpStatsFromProc(rootFs string, pid int, file string) (info.TcpStat, error)
return tcpStats, nil
}
func advancedTcpStatsFromProc(rootFs string, pid int, file1, file2 string) (info.TcpAdvancedStat, error) {
var advancedStats info.TcpAdvancedStat
var err error
netstatFile := path.Join(rootFs, "proc", strconv.Itoa(pid), file1)
err = scanAdvancedTcpStats(&advancedStats, netstatFile)
if err != nil {
return advancedStats, err
}
snmpFile := path.Join(rootFs, "proc", strconv.Itoa(pid), file2)
err = scanAdvancedTcpStats(&advancedStats, snmpFile)
if err != nil {
return advancedStats, err
}
return advancedStats, nil
}
func scanAdvancedTcpStats(advancedStats *info.TcpAdvancedStat, advancedTcpStatsFile string) error {
data, err := ioutil.ReadFile(advancedTcpStatsFile)
if err != nil {
return fmt.Errorf("failure opening %s: %v", advancedTcpStatsFile, err)
}
reader := strings.NewReader(string(data))
scanner := bufio.NewScanner(reader)
scanner.Split(bufio.ScanLines)
advancedTcpStats := 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",
advancedTcpStatsFile, 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)
}
advancedTcpStats[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)
}
advancedTcpStats[nameParts[i]] = vUint64
}
}
}
b, err := json.Marshal(advancedTcpStats)
if err != nil {
return err
}
err = json.Unmarshal(b, advancedStats)
if err != nil {
return err
}
return scanner.Err()
}
func scanTcpStats(tcpStatsFile string) (info.TcpStat, error) {
var stats info.TcpStat

View File

@ -416,6 +416,8 @@ type NetworkStats struct {
Udp UdpStat `json:"udp"`
// UDP6 connection stats
Udp6 UdpStat `json:"udp6"`
// TCP advanced stats
TcpAdvanced TcpAdvancedStat `json:"tcp_advanced"`
}
type TcpStat struct {
@ -443,6 +445,245 @@ type TcpStat struct {
Closing uint64
}
type TcpAdvancedStat 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

View File

@ -290,6 +290,8 @@ type NetworkStats struct {
Udp v1.UdpStat `json:"udp"`
// UDP6 connection stats
Udp6 v1.UdpStat `json:"udp6"`
// TCP advanced stats
TcpAdvanced v1.TcpAdvancedStat `json:"tcp_advanced"`
}
// Instantaneous CPU stats

View File

@ -961,6 +961,417 @@ func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetri
},
}...)
}
if includedMetrics.Has(container.NetworkAdvancedTcpUsageMetrics) {
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.TcpAdvanced.RtoAlgorithm),
labels: []string{"rtoalgorithm"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.RtoMin),
labels: []string{"rtomin"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.RtoMax),
labels: []string{"rtomax"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.MaxConn),
labels: []string{"maxconn"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.ActiveOpens),
labels: []string{"activeopens"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.PassiveOpens),
labels: []string{"passiveopens"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.AttemptFails),
labels: []string{"attemptfails"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.EstabResets),
labels: []string{"estabresets"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.CurrEstab),
labels: []string{"currestab"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.InSegs),
labels: []string{"insegs"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.OutSegs),
labels: []string{"outsegs"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.RetransSegs),
labels: []string{"retranssegs"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.InErrs),
labels: []string{"inerrs"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.OutRsts),
labels: []string{"outrsts"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.InCsumErrors),
labels: []string{"incsumerrors"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.EmbryonicRsts),
labels: []string{"embryonicrsts"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.SyncookiesSent),
labels: []string{"syncookiessent"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.SyncookiesRecv),
labels: []string{"syncookiesrecv"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.SyncookiesFailed),
labels: []string{"syncookiesfailed"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.PruneCalled),
labels: []string{"prunecalled"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.RcvPruned),
labels: []string{"rcvpruned"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.OfoPruned),
labels: []string{"ofopruned"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.OutOfWindowIcmps),
labels: []string{"outofwindowicmps"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.LockDroppedIcmps),
labels: []string{"lockdroppedicmps"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TW),
labels: []string{"tw"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TWRecycled),
labels: []string{"twrecycled"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TWKilled),
labels: []string{"twkilled"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPTimeWaitOverflow),
labels: []string{"tcptimewaitoverflow"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPTimeouts),
labels: []string{"tcptimeouts"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSpuriousRTOs),
labels: []string{"tcpspuriousrtos"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPLossProbes),
labels: []string{"tcplossprobes"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPLossProbeRecovery),
labels: []string{"tcplossproberecovery"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPRenoRecoveryFail),
labels: []string{"tcprenorecoveryfail"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSackRecoveryFail),
labels: []string{"tcpsackrecoveryfail"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPRenoFailures),
labels: []string{"tcprenofailures"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSackFailures),
labels: []string{"tcpsackfailures"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPLossFailures),
labels: []string{"tcplossfailures"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.DelayedACKs),
labels: []string{"delayedacks"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.DelayedACKLocked),
labels: []string{"delayedacklocked"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.DelayedACKLost),
labels: []string{"delayedacklost"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.ListenOverflows),
labels: []string{"listenoverflows"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.ListenDrops),
labels: []string{"listendrops"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPHPHits),
labels: []string{"tcphphits"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPPureAcks),
labels: []string{"tcppureacks"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPHPAcks),
labels: []string{"tcphpacks"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPRenoRecovery),
labels: []string{"tcprenorecovery"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSackRecovery),
labels: []string{"tcpsackrecovery"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSACKReneging),
labels: []string{"tcpsackreneging"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFACKReorder),
labels: []string{"tcpfackreorder"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSACKReorder),
labels: []string{"tcpsackreorder"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPRenoReorder),
labels: []string{"tcprenoreorder"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPTSReorder),
labels: []string{"tcptsreorder"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFullUndo),
labels: []string{"tcpfullundo"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPPartialUndo),
labels: []string{"tcppartialundo"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPDSACKUndo),
labels: []string{"tcpdsackundo"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPLossUndo),
labels: []string{"tcplossundo"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFastRetrans),
labels: []string{"tcpfastretrans"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSlowStartRetrans),
labels: []string{"tcpslowstartretrans"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPLostRetransmit),
labels: []string{"tcplostretransmit"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPRetransFail),
labels: []string{"tcpretransfail"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPRcvCollapsed),
labels: []string{"tcprcvcollapsed"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPDSACKOldSent),
labels: []string{"tcpdsackoldsent"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPDSACKOfoSent),
labels: []string{"tcpdsackofosent"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPDSACKRecv),
labels: []string{"tcpdsackrecv"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPDSACKOfoRecv),
labels: []string{"tcpdsackoforecv"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPAbortOnData),
labels: []string{"tcpabortondata"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPAbortOnClose),
labels: []string{"tcpabortonclose"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPAbortOnMemory),
labels: []string{"tcpabortonmemory"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPAbortOnTimeout),
labels: []string{"tcpabortontimeout"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPAbortOnLinger),
labels: []string{"tcpabortonlinger"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPAbortFailed),
labels: []string{"tcpabortfailed"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPMemoryPressures),
labels: []string{"tcpmemorypressures"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPMemoryPressuresChrono),
labels: []string{"tcpmemorypressureschrono"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSACKDiscard),
labels: []string{"tcpsackdiscard"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPDSACKIgnoredOld),
labels: []string{"tcpdsackignoredold"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPDSACKIgnoredNoUndo),
labels: []string{"tcpdsackignorednoundo"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPMD5NotFound),
labels: []string{"tcpmd5notfound"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPMD5Unexpected),
labels: []string{"tcpmd5unexpected"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPMD5Failure),
labels: []string{"tcpmd5failure"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSackShifted),
labels: []string{"tcpsackshifted"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSackMerged),
labels: []string{"tcpsackmerged"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSackShiftFallback),
labels: []string{"tcpsackshiftfallback"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPBacklogDrop),
labels: []string{"tcpbacklogdrop"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.PFMemallocDrop),
labels: []string{"pfmemallocdrop"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPMinTTLDrop),
labels: []string{"tcpminttldrop"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPDeferAcceptDrop),
labels: []string{"tcpdeferacceptdrop"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.IPReversePathFilter),
labels: []string{"ipreversepathfilter"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPReqQFullDoCookies),
labels: []string{"tcpreqqfulldocookies"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPReqQFullDrop),
labels: []string{"tcpreqqfulldrop"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFastOpenActive),
labels: []string{"tcpfastopenactive"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFastOpenActiveFail),
labels: []string{"tcpfastopenactivefail"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFastOpenPassive),
labels: []string{"tcpfastopenpassive"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFastOpenPassiveFail),
labels: []string{"tcpfastopenpassivefail"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFastOpenListenOverflow),
labels: []string{"tcpfastopenlistenoverflow"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPFastOpenCookieReqd),
labels: []string{"tcpfastopencookiereqd"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPSynRetrans),
labels: []string{"tcpsynretrans"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.TCPOrigDataSent),
labels: []string{"tcporigdatasent"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.PAWSActive),
labels: []string{"pawsactive"},
timestamp: s.Timestamp,
}, {
value: float64(s.Network.TcpAdvanced.PAWSEstab),
labels: []string{"pawsestab"},
timestamp: s.Timestamp,
},
}
},
},
}...)
}
if includedMetrics.Has(container.NetworkUdpUsageMetrics) {
c.containerMetrics = append(c.containerMetrics, []containerMetric{
{

View File

@ -49,18 +49,19 @@ func (p testSubcontainersInfoProvider) GetMachineInfo() (*info.MachineInfo, erro
}
var allMetrics = container.MetricSet{
container.CpuUsageMetrics: struct{}{},
container.ProcessSchedulerMetrics: struct{}{},
container.PerCpuUsageMetrics: struct{}{},
container.MemoryUsageMetrics: struct{}{},
container.CpuLoadMetrics: struct{}{},
container.DiskIOMetrics: struct{}{},
container.AcceleratorUsageMetrics: struct{}{},
container.DiskUsageMetrics: struct{}{},
container.NetworkUsageMetrics: struct{}{},
container.NetworkTcpUsageMetrics: struct{}{},
container.NetworkUdpUsageMetrics: struct{}{},
container.ProcessMetrics: struct{}{},
container.CpuUsageMetrics: struct{}{},
container.ProcessSchedulerMetrics: struct{}{},
container.PerCpuUsageMetrics: struct{}{},
container.MemoryUsageMetrics: struct{}{},
container.CpuLoadMetrics: struct{}{},
container.DiskIOMetrics: struct{}{},
container.AcceleratorUsageMetrics: struct{}{},
container.DiskUsageMetrics: struct{}{},
container.NetworkUsageMetrics: struct{}{},
container.NetworkTcpUsageMetrics: struct{}{},
container.NetworkAdvancedTcpUsageMetrics: struct{}{},
container.NetworkUdpUsageMetrics: struct{}{},
container.ProcessMetrics: struct{}{},
}
func (p testSubcontainersInfoProvider) SubcontainersInfo(string, *info.ContainerInfoRequest) ([]*info.ContainerInfo, error) {
@ -185,6 +186,107 @@ func (p testSubcontainersInfoProvider) SubcontainersInfo(string, *info.Container
Listen: 3,
Closing: 0,
},
TcpAdvanced: info.TcpAdvancedStat{
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,

View File

@ -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