{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/1104","repository_url":"https://api.github.com/repos/influxdata/telegraf","labels_url":"https://api.github.com/repos/influxdata/telegraf/issues/1104/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/telegraf/issues/1104/comments","events_url":"https://api.github.com/repos/influxdata/telegraf/issues/1104/events","html_url":"https://github.com/influxdata/telegraf/issues/1104","id":151384551,"number":1104,"title":"[RFC] netstat/nstat plugin","user":{"login":"daviesalex","id":1106249,"avatar_url":"https://avatars.githubusercontent.com/u/1106249?v=3","gravatar_id":"","url":"https://api.github.com/users/daviesalex","html_url":"https://github.com/daviesalex","followers_url":"https://api.github.com/users/daviesalex/followers","following_url":"https://api.github.com/users/daviesalex/following{/other_user}","gists_url":"https://api.github.com/users/daviesalex/gists{/gist_id}","starred_url":"https://api.github.com/users/daviesalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviesalex/subscriptions","organizations_url":"https://api.github.com/users/daviesalex/orgs","repos_url":"https://api.github.com/users/daviesalex/repos","events_url":"https://api.github.com/users/daviesalex/events{/privacy}","received_events_url":"https://api.github.com/users/daviesalex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-27T13:24:55Z","updated_at":"2016-04-27T17:21:26Z","closed_at":null,"body":"We plan to add the metrics that are available via nstat to telegraf. This is effectively everything in netstat, with a few more[1]. Example output below.\r\n\r\nIdeally we will figure out an elegant way to list the available metrics dynamically, and access them directly via /proc/ (we have not dug into this).\r\n\r\nBefore we spend time looking at this, comments welcome from others. \r\n\r\n```\r\n[root@hostname memory]# nstat\r\n#kernel\r\nIpInReceives                    510275104          0.0\r\nIpInDelivers                    510270183          0.0\r\nIpOutRequests                   509595531          0.0\r\nIpOutDiscards                   2570               0.0\r\nIpOutNoRoutes                   39                 0.0\r\nIcmpInErrors                    51828              0.0\r\nIcmpInCsumErrors                8                  0.0\r\nIcmpInTimeExcds                 25040              0.0\r\nIcmpInEchoReps                  26313              0.0\r\nIcmpInTimestamps                466                0.0\r\nIcmpInTimestampReps             6                  0.0\r\nIcmpInAddrMaskReps              3                  0.0\r\nIcmpOutErrors                   27604              0.0\r\nIcmpOutTimeExcds                819                0.0\r\nIcmpOutEchoReps                 466                0.0\r\nIcmpOutTimestamps               26313              0.0\r\nIcmpOutAddrMasks                6                  0.0\r\nIcmpMsgInType0                  466                0.0\r\nIcmpMsgInType3                  25040              0.0\r\nIcmpMsgInType8                  26313              0.0\r\nIcmpMsgInType13                 6                  0.0\r\nIcmpMsgInType17                 3                  0.0\r\nIcmpMsgOutType0                 26313              0.0\r\nIcmpMsgOutType3                 819                0.0\r\nIcmpMsgOutType8                 466                0.0\r\nIcmpMsgOutType14                6                  0.0\r\nTcpActiveOpens                  2274662            0.0\r\nTcpPassiveOpens                 342602             0.0\r\nTcpAttemptFails                 719677             0.0\r\nTcpEstabResets                  222007             0.0\r\nTcpInSegs                       503521447          0.0\r\nTcpOutSegs                      515627372          0.0\r\nTcpRetransSegs                  40593              0.0\r\nTcpInErrs                       720                0.0\r\nTcpOutRsts                      961218             0.0\r\nUdpInDatagrams                  1458988            0.0\r\nUdpNoPorts                      1476               0.0\r\nUdpInErrors                     5150740            0.0\r\nUdpOutDatagrams                 22976178           0.0\r\nUdpSndbufErrors                 1                  0.0\r\nTcpExtSyncookiesFailed          138                0.0\r\nTcpExtEmbryonicRsts             45                 0.0\r\nTcpExtPruneCalled               13                 0.0\r\nTcpExtTW                        1316165            0.0\r\nTcpExtDelayedACKs               16883624           0.0\r\nTcpExtDelayedACKLocked          1127               0.0\r\nTcpExtDelayedACKLost            8428               0.0\r\nTcpExtTCPHPHits                 320148707          0.0\r\nTcpExtTCPPureAcks               18670050           0.0\r\nTcpExtTCPHPAcks                 158731034          0.0\r\nTcpExtTCPRenoRecovery           96                 0.0\r\nTcpExtTCPSackRecovery           580                0.0\r\nTcpExtTCPFACKReorder            12                 0.0\r\nTcpExtTCPRenoReorder            3                  0.0\r\nTcpExtTCPTSReorder              85                 0.0\r\nTcpExtTCPFullUndo               178                0.0\r\nTcpExtTCPPartialUndo            727                0.0\r\nTcpExtTCPDSACKUndo              200                0.0\r\nTcpExtTCPLossUndo               4282               0.0\r\nTcpExtTCPLostRetransmit         34                 0.0\r\nTcpExtTCPRenoFailures           13                 0.0\r\nTcpExtTCPSackFailures           13                 0.0\r\nTcpExtTCPLossFailures           267                0.0\r\nTcpExtTCPFastRetrans            1410               0.0\r\nTcpExtTCPForwardRetrans         51                 0.0\r\nTcpExtTCPSlowStartRetrans       290                0.0\r\nTcpExtTCPTimeouts               14295              0.0\r\nTcpExtTCPLossProbes             26721              0.0\r\nTcpExtTCPLossProbeRecovery      22526              0.0\r\nTcpExtTCPRenoRecoveryFail       19                 0.0\r\nTcpExtTCPSackRecoveryFail       53                 0.0\r\nTcpExtTCPRcvCollapsed           39                 0.0\r\nTcpExtTCPDSACKOldSent           6761               0.0\r\nTcpExtTCPDSACKOfoSent           5                  0.0\r\nTcpExtTCPDSACKRecv              23536              0.0\r\nTcpExtTCPAbortOnData            228658             0.0\r\nTcpExtTCPAbortOnClose           60                 0.0\r\nTcpExtTCPAbortOnTimeout         85                 0.0\r\nTcpExtTCPDSACKIgnoredNoUndo     21808              0.0\r\nTcpExtTCPSpuriousRTOs           64                 0.0\r\nTcpExtTCPSackShifted            280                0.0\r\nTcpExtTCPSackMerged             300                0.0\r\nTcpExtTCPSackShiftFallback      2252               0.0\r\nTcpExtTCPRetransFail            66                 0.0\r\nTcpExtTCPRcvCoalesce            73223366           0.0\r\nTcpExtTCPOFOQueue               342045             0.0\r\nTcpExtTCPOFOMerge               5                  0.0\r\nTcpExtTCPChallengeACK           850                0.0\r\nTcpExtTCPSYNChallenge           847                0.0\r\nTcpExtTCPSpuriousRtxHostQueues  11862              0.0\r\nIpExtInBcastPkts                5236425            0.0\r\nIpExtInOctets                   1700936538759      0.0\r\nIpExtOutOctets                  154586125605       0.0\r\nIpExtInBcastOctets              1403487865         0.0\r\n```\r\n\r\n[1] http://loicpefferkorn.net/2016/03/linux-network-metrics-why-you-should-use-nstat-instead-of-netstat/"},"comment":{"url":"https://api.github.com/repos/influxdata/telegraf/issues/comments/215157530","html_url":"https://github.com/influxdata/telegraf/issues/1104#issuecomment-215157530","issue_url":"https://api.github.com/repos/influxdata/telegraf/issues/1104","id":215157530,"user":{"login":"sparrc","id":7155926,"avatar_url":"https://avatars.githubusercontent.com/u/7155926?v=3","gravatar_id":"","url":"https://api.github.com/users/sparrc","html_url":"https://github.com/sparrc","followers_url":"https://api.github.com/users/sparrc/followers","following_url":"https://api.github.com/users/sparrc/following{/other_user}","gists_url":"https://api.github.com/users/sparrc/gists{/gist_id}","starred_url":"https://api.github.com/users/sparrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparrc/subscriptions","organizations_url":"https://api.github.com/users/sparrc/orgs","repos_url":"https://api.github.com/users/sparrc/repos","events_url":"https://api.github.com/users/sparrc/events{/privacy}","received_events_url":"https://api.github.com/users/sparrc/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T17:21:26Z","updated_at":"2016-04-27T17:21:26Z","body":"from https://github.com/shemminger/iproute2/blob/master/misc/nstat.c it looks like it's just the counters available in /proc/net/netstat, /proc/net/snmp and /proc/net/snmp6,\r\n\r\nwould be a fun project to make a Go clone of the above C code :-)"}}