diff options
author | Ben Kochie <superq@gmail.com> | 2020-06-18 17:12:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 17:12:45 +0200 |
commit | 08ce3c6dd430deb51798826701a395e460620d60 (patch) | |
tree | e1ad2a7a1b9d4813dfc009f52bd5d95e7185f88a | |
parent | e96073cfd563c96f8ddb7751b1330ad8eaa7305d (diff) | |
parent | 204164e4e44cea0d1db041a72f525c90781f823c (diff) | |
download | prometheus_node_collector-08ce3c6dd430deb51798826701a395e460620d60.tar.bz2 prometheus_node_collector-08ce3c6dd430deb51798826701a395e460620d60.tar.xz prometheus_node_collector-08ce3c6dd430deb51798826701a395e460620d60.zip |
Merge pull request #1733 from prometheus/superq/OutRsts
Include TCP OutRsts in netstat metrics
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | collector/fixtures/e2e-64k-page-output.txt | 3 | ||||
-rw-r--r-- | collector/fixtures/e2e-output.txt | 3 | ||||
-rw-r--r-- | collector/netstat_linux.go | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index baef7a5..9d45de4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -3,7 +3,7 @@ | |||
3 | * [CHANGE] Improve filter flag names. | 3 | * [CHANGE] Improve filter flag names. |
4 | * [CHANGE] | 4 | * [CHANGE] |
5 | * [FEATURE] | 5 | * [FEATURE] |
6 | * [ENHANCEMENT] | 6 | * [ENHANCEMENT] Include TCP OutRsts in netstat metrics |
7 | * [BUGFIX] | 7 | * [BUGFIX] |
8 | 8 | ||
9 | ## 1.0.1 / 2020-06-15 | 9 | ## 1.0.1 / 2020-06-15 |
diff --git a/collector/fixtures/e2e-64k-page-output.txt b/collector/fixtures/e2e-64k-page-output.txt index 3e9f6cb..fe32915 100644 --- a/collector/fixtures/e2e-64k-page-output.txt +++ b/collector/fixtures/e2e-64k-page-output.txt | |||
@@ -1886,6 +1886,9 @@ node_netstat_Tcp_InErrs 5 | |||
1886 | # HELP node_netstat_Tcp_InSegs Statistic TcpInSegs. | 1886 | # HELP node_netstat_Tcp_InSegs Statistic TcpInSegs. |
1887 | # TYPE node_netstat_Tcp_InSegs untyped | 1887 | # TYPE node_netstat_Tcp_InSegs untyped |
1888 | node_netstat_Tcp_InSegs 5.7252008e+07 | 1888 | node_netstat_Tcp_InSegs 5.7252008e+07 |
1889 | # HELP node_netstat_Tcp_OutRsts Statistic TcpOutRsts. | ||
1890 | # TYPE node_netstat_Tcp_OutRsts untyped | ||
1891 | node_netstat_Tcp_OutRsts 1003 | ||
1889 | # HELP node_netstat_Tcp_OutSegs Statistic TcpOutSegs. | 1892 | # HELP node_netstat_Tcp_OutSegs Statistic TcpOutSegs. |
1890 | # TYPE node_netstat_Tcp_OutSegs untyped | 1893 | # TYPE node_netstat_Tcp_OutSegs untyped |
1891 | node_netstat_Tcp_OutSegs 5.4915039e+07 | 1894 | node_netstat_Tcp_OutSegs 5.4915039e+07 |
diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index df04679..0edc65b 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt | |||
@@ -1955,6 +1955,9 @@ node_netstat_Tcp_InErrs 5 | |||
1955 | # HELP node_netstat_Tcp_InSegs Statistic TcpInSegs. | 1955 | # HELP node_netstat_Tcp_InSegs Statistic TcpInSegs. |
1956 | # TYPE node_netstat_Tcp_InSegs untyped | 1956 | # TYPE node_netstat_Tcp_InSegs untyped |
1957 | node_netstat_Tcp_InSegs 5.7252008e+07 | 1957 | node_netstat_Tcp_InSegs 5.7252008e+07 |
1958 | # HELP node_netstat_Tcp_OutRsts Statistic TcpOutRsts. | ||
1959 | # TYPE node_netstat_Tcp_OutRsts untyped | ||
1960 | node_netstat_Tcp_OutRsts 1003 | ||
1958 | # HELP node_netstat_Tcp_OutSegs Statistic TcpOutSegs. | 1961 | # HELP node_netstat_Tcp_OutSegs Statistic TcpOutSegs. |
1959 | # TYPE node_netstat_Tcp_OutSegs untyped | 1962 | # TYPE node_netstat_Tcp_OutSegs untyped |
1960 | node_netstat_Tcp_OutSegs 5.4915039e+07 | 1963 | node_netstat_Tcp_OutSegs 5.4915039e+07 |
diff --git a/collector/netstat_linux.go b/collector/netstat_linux.go index 6fac050..98447f8 100644 --- a/collector/netstat_linux.go +++ b/collector/netstat_linux.go | |||
@@ -35,7 +35,7 @@ const ( | |||
35 | ) | 35 | ) |
36 | 36 | ||
37 | var ( | 37 | var ( |
38 | netStatFields = kingpin.Flag("collector.netstat.fields", "Regexp of fields to return for netstat collector.").Default("^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*|TCPSynRetrans)|Tcp_(ActiveOpens|InSegs|OutSegs|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$").String() | 38 | netStatFields = kingpin.Flag("collector.netstat.fields", "Regexp of fields to return for netstat collector.").Default("^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*|TCPSynRetrans)|Tcp_(ActiveOpens|InSegs|OutSegs|OutRsts|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$").String() |
39 | ) | 39 | ) |
40 | 40 | ||
41 | type netStatCollector struct { | 41 | type netStatCollector struct { |