| 1 | <!--startmeta |
| 2 | custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/freebsd.plugin/integrations/net.inet.tcp.stats.md" |
| 3 | meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/freebsd.plugin/metadata.yaml" |
| 4 | sidebar_label: "net.inet.tcp.stats" |
| 5 | learn_status: "Published" |
| 6 | learn_rel_path: "Collecting Metrics/Collectors/Networking" |
| 7 | message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" |
| 8 | endmeta--> |
| 9 | |
| 10 | # net.inet.tcp.stats |
| 11 | |
| 12 | |
| 13 | <img src="https://netdata.cloud/img/network.svg" width="150"/> |
| 14 | |
| 15 | |
| 16 | Plugin: freebsd.plugin |
| 17 | Module: net.inet.tcp.stats |
| 18 | |
| 19 | <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> |
| 20 | |
| 21 | ## Overview |
| 22 | |
| 23 | Collect overall information about TCP connections. |
| 24 | |
| 25 | The plugin calls `sysctl` function to collect necessary data. |
| 26 | |
| 27 | This collector is supported on all platforms. |
| 28 | |
| 29 | This collector supports collecting metrics from multiple instances of this integration, including remote instances. |
| 30 | |
| 31 | |
| 32 | ### Default Behavior |
| 33 | |
| 34 | #### Auto-Detection |
| 35 | |
| 36 | This integration doesn't support auto-detection. |
| 37 | |
| 38 | #### Limits |
| 39 | |
| 40 | The default configuration for this integration does not impose any limits on data collection. |
| 41 | |
| 42 | #### Performance Impact |
| 43 | |
| 44 | The default configuration for this integration is not expected to impose a significant performance impact on the system. |
| 45 | |
| 46 | ## Setup |
| 47 | |
| 48 | |
| 49 | ### Prerequisites |
| 50 | |
| 51 | No action required. |
| 52 | |
| 53 | ### Configuration |
| 54 | |
| 55 | #### Options |
| 56 | |
| 57 | |
| 58 | |
| 59 | <details open><summary>Config options</summary> |
| 60 | |
| 61 | |
| 62 | |
| 63 | | Option | Description | Default | Required | |
| 64 | |:-----|:------------|:--------|:---------:| |
| 65 | | ipv4 TCP packets | Enable or disable ipv4 TCP packets metric. | yes | no | |
| 66 | | ipv4 TCP errors | Enable or disable pv4 TCP errors metric. | yes | no | |
| 67 | | ipv4 TCP handshake issues | Enable or disable ipv4 TCP handshake issue metric. | yes | no | |
| 68 | | TCP connection aborts | Enable or disable TCP connection aborts metric. | auto | no | |
| 69 | | TCP out-of-order queue | Enable or disable TCP out-of-order queue metric. | auto | no | |
| 70 | | TCP SYN cookies | Enable or disable TCP SYN cookies metric. | auto | no | |
| 71 | | TCP listen issues | Enable or disable TCP listen issues metric. | auto | no | |
| 72 | | ECN packets | Enable or disable ECN packets metric. | auto | no | |
| 73 | |
| 74 | |
| 75 | </details> |
| 76 | |
| 77 | |
| 78 | |
| 79 | #### via File |
| 80 | |
| 81 | The configuration file name for this integration is `netdata.conf`. |
| 82 | Configuration for this specific integration is located in the `[plugin:freebsd:net.inet.tcp.stats]` section within that file. |
| 83 | |
| 84 | The file format is a modified INI syntax. The general structure is: |
| 85 | |
| 86 | ```ini |
| 87 | [section1] |
| 88 | option1 = some value |
| 89 | option2 = some other value |
| 90 | |
| 91 | [section2] |
| 92 | option3 = some third value |
| 93 | ``` |
| 94 | You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the |
| 95 | Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory). |
| 96 | |
| 97 | ```bash |
| 98 | cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata |
| 99 | sudo ./edit-config netdata.conf |
| 100 | ``` |
| 101 | |
| 102 | ##### Examples |
| 103 | There are no configuration examples. |
| 104 | |
| 105 | |
| 106 | |
| 107 | ## Alerts |
| 108 | |
| 109 | |
| 110 | The following alerts are available: |
| 111 | |
| 112 | | Alert name | On metric | Description | |
| 113 | |:------------|:----------|:------------| |
| 114 | | [ 1m_ipv4_tcp_resets_sent ](https://github.com/netdata/netdata/blob/master/src/health/health.d/tcp_resets.conf) | ipv4.tcphandshake | average number of sent TCP RESETS over the last minute | |
| 115 | | [ 10s_ipv4_tcp_resets_sent ](https://github.com/netdata/netdata/blob/master/src/health/health.d/tcp_resets.conf) | ipv4.tcphandshake | average number of sent TCP RESETS over the last 10 seconds. This can indicate a port scan, or that a service running on this host has crashed. Netdata will not send a clear notification for this alarm. | |
| 116 | | [ 1m_ipv4_tcp_resets_received ](https://github.com/netdata/netdata/blob/master/src/health/health.d/tcp_resets.conf) | ipv4.tcphandshake | average number of received TCP RESETS over the last minute | |
| 117 | | [ 10s_ipv4_tcp_resets_received ](https://github.com/netdata/netdata/blob/master/src/health/health.d/tcp_resets.conf) | ipv4.tcphandshake | average number of received TCP RESETS over the last 10 seconds. This can be an indication that a service this host needs has crashed. Netdata will not send a clear notification for this alarm. | |
| 118 | |
| 119 | |
| 120 | ## Metrics |
| 121 | |
| 122 | Metrics grouped by *scope*. |
| 123 | |
| 124 | The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. |
| 125 | |
| 126 | |
| 127 | |
| 128 | ### Per net.inet.tcp.stats instance |
| 129 | |
| 130 | These metrics show TCP connections statistics. |
| 131 | |
| 132 | This scope has no labels. |
| 133 | |
| 134 | Metrics: |
| 135 | |
| 136 | | Metric | Dimensions | Unit | |
| 137 | |:------|:----------|:----| |
| 138 | | ipv4.tcppackets | received, sent | packets/s | |
| 139 | | ipv4.tcperrors | InErrs, InCsumErrors, RetransSegs | packets/s | |
| 140 | | ipv4.tcphandshake | EstabResets, ActiveOpens, PassiveOpens, AttemptFails | events/s | |
| 141 | | ipv4.tcpconnaborts | baddata, userclosed, nomemory, timeout, linger | connections/s | |
| 142 | | ipv4.tcpofo | inqueue | packets/s | |
| 143 | | ipv4.tcpsyncookies | received, sent, failed | packets/s | |
| 144 | | ipv4.tcplistenissues | overflows | packets/s | |
| 145 | | ipv4.ecnpkts | InCEPkts, InECT0Pkts, InECT1Pkts, OutECT0Pkts, OutECT1Pkts | packets/s | |
| 146 | |
| 147 |