github.com/netdata/go.d.plugin@v0.58.1/modules/portcheck/integrations/tcp_endpoints.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/portcheck/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/portcheck/metadata.yaml" 4 sidebar_label: "TCP Endpoints" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/Synthetic Checks" 7 most_popular: False 8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" 9 endmeta--> 10 11 # TCP Endpoints 12 13 14 <img src="https://netdata.cloud/img/globe.svg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: portcheck 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 This collector monitors TCP services availability and response time. 25 26 27 28 29 This collector is supported on all platforms. 30 31 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 32 33 34 ### Default Behavior 35 36 #### Auto-Detection 37 38 This integration doesn't support auto-detection. 39 40 #### Limits 41 42 The default configuration for this integration does not impose any limits on data collection. 43 44 #### Performance Impact 45 46 The default configuration for this integration is not expected to impose a significant performance impact on the system. 47 48 49 ## Metrics 50 51 Metrics grouped by *scope*. 52 53 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 54 55 56 57 ### Per tcp endpoint 58 59 These metrics refer to the TCP endpoint. 60 61 Labels: 62 63 | Label | Description | 64 |:-----------|:----------------| 65 | host | host | 66 | port | port | 67 68 Metrics: 69 70 | Metric | Dimensions | Unit | 71 |:------|:----------|:----| 72 | portcheck.status | success, failed, timeout | boolean | 73 | portcheck.state_duration | time | seconds | 74 | portcheck.latency | time | ms | 75 76 77 78 ## Alerts 79 80 81 The following alerts are available: 82 83 | Alert name | On metric | Description | 84 |:------------|:----------|:------------| 85 | [ portcheck_service_reachable ](https://github.com/netdata/netdata/blob/master/health/health.d/portcheck.conf) | portcheck.status | TCP host ${label:host} port ${label:port} liveness status | 86 | [ portcheck_connection_timeouts ](https://github.com/netdata/netdata/blob/master/health/health.d/portcheck.conf) | portcheck.status | percentage of timed-out TCP connections to host ${label:host} port ${label:port} in the last 5 minutes | 87 | [ portcheck_connection_fails ](https://github.com/netdata/netdata/blob/master/health/health.d/portcheck.conf) | portcheck.status | percentage of failed TCP connections to host ${label:host} port ${label:port} in the last 5 minutes | 88 89 90 ## Setup 91 92 ### Prerequisites 93 94 No action required. 95 96 ### Configuration 97 98 #### File 99 100 The configuration file name for this integration is `go.d/portcheck.conf`. 101 102 103 You can edit the configuration file using the `edit-config` script from the 104 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 105 106 ```bash 107 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 108 sudo ./edit-config go.d/portcheck.conf 109 ``` 110 #### Options 111 112 The following options can be defined globally: update_every, autodetection_retry. 113 114 115 <details><summary>Config options</summary> 116 117 | Name | Description | Default | Required | 118 |:----|:-----------|:-------|:--------:| 119 | update_every | Data collection frequency. | 5 | no | 120 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 121 | host | Remote host address in IPv4, IPv6 format, or DNS name. | | yes | 122 | ports | Remote host ports. Must be specified in numeric format. | | yes | 123 | timeout | HTTP request timeout. | 2 | no | 124 125 </details> 126 127 #### Examples 128 129 ##### Check SSH and telnet 130 131 An example configuration. 132 133 <details><summary>Config</summary> 134 135 ```yaml 136 jobs: 137 - name: server1 138 host: 127.0.0.1 139 ports: 140 - 22 141 - 23 142 143 ``` 144 </details> 145 146 ##### Check webserver with IPv6 address 147 148 An example configuration. 149 150 <details><summary>Config</summary> 151 152 ```yaml 153 jobs: 154 - name: server2 155 host: "[2001:DB8::1]" 156 ports: 157 - 80 158 - 8080 159 160 ``` 161 </details> 162 163 ##### Multi-instance 164 165 > **Note**: When you define multiple jobs, their names must be unique. 166 167 Multiple instances. 168 169 170 <details><summary>Config</summary> 171 172 ```yaml 173 jobs: 174 - name: server1 175 host: 127.0.0.1 176 ports: 177 - 22 178 - 23 179 180 - name: server2 181 host: 203.0.113.10 182 ports: 183 - 22 184 - 23 185 186 ``` 187 </details> 188 189 190 191 ## Troubleshooting 192 193 ### Debug Mode 194 195 To troubleshoot issues with the `portcheck` collector, run the `go.d.plugin` with the debug option enabled. The output 196 should give you clues as to why the collector isn't working. 197 198 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 199 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 200 201 ```bash 202 cd /usr/libexec/netdata/plugins.d/ 203 ``` 204 205 - Switch to the `netdata` user. 206 207 ```bash 208 sudo -u netdata -s 209 ``` 210 211 - Run the `go.d.plugin` to debug the collector: 212 213 ```bash 214 ./go.d.plugin -d -m portcheck 215 ``` 216 217