master
yaml 239 lines 9.45 KB
Raw
1 plugin_name: go.d.plugin
2 modules:
3 - meta:
4 id: collector-go.d.plugin-portcheck
5 plugin_name: go.d.plugin
6 module_name: portcheck
7 monitored_instance:
8 name: TCP/UDP Endpoints
9 link: ""
10 icon_filename: globe.svg
11 categories:
12 - data-collection.synthetic-testing
13 keywords: []
14 related_resources:
15 integrations:
16 list: []
17 info_provided_to_referring_integrations:
18 description: ""
19 overview:
20 data_collection:
21 metrics_description: |
22 Collector for monitoring service availability and response time. It can be used to check if specific ports are open or reachable on a target system.
23
24 It supports both TCP and UDP protocols over IPv4 and IPv6 networks.
25
26 | Protocol | Check Description |
27 |----------|-----------------------------------------------------------------------------------------------------------------------------|
28 | TCP | Attempts to establish a TCP connection to the specified ports on the target system. |
29 | UDP | Sends a 0-byte UDP packet to the specified ports on the target system and analyzes ICMP responses to determine port status. |
30
31 Possible TCP statuses:
32
33 | TCP Status | Description |
34 |------------|-------------------------------------------------------------|
35 | success | Connection established successfully. |
36 | timeout | Connection timed out after waiting for configured duration. |
37 | failed | An error occurred during the connection attempt. |
38
39 Possible UDP statuses:
40
41 | UDP Status | Description |
42 |---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
43 | open/filtered | No response received within the configured timeout. This status indicates the port is either open or filtered, but the exact state cannot be determined definitively. |
44 | closed | Received an ICMP Destination Unreachable message, indicating the port is closed. |
45 method_description: ""
46 supported_platforms:
47 include: []
48 exclude: []
49 multi_instance: true
50 additional_permissions:
51 description: ""
52 default_behavior:
53 auto_detection:
54 description: ""
55 limits:
56 description: ""
57 performance_impact:
58 description: ""
59 setup:
60 prerequisites:
61 list: []
62 configuration:
63 file:
64 name: go.d/portcheck.conf
65 options:
66 description: |
67 The following options can be defined globally: update_every, autodetection_retry.
68 folding:
69 title: Config options
70 enabled: true
71 list:
72 - name: update_every
73 description: Data collection frequency (seconds).
74 default_value: 5
75 required: false
76 group: Collection
77 - name: autodetection_retry
78 description: Autodetection retry interval (seconds). Set 0 to disable.
79 default_value: 0
80 required: false
81 group: Collection
82
83 - name: host
84 description: Remote host address (IPv4, IPv6, or DNS name).
85 default_value: ""
86 required: true
87 group: Target
88 - name: ports
89 description: List of TCP ports to check (numeric format).
90 default_value: "[]"
91 required: false
92 group: Target
93 - name: udp_ports
94 description: List of UDP ports to check (numeric format).
95 default_value: "[]"
96 required: false
97 group: Target
98 - name: timeout
99 description: Port check timeout (seconds).
100 default_value: 2
101 required: false
102 group: Target
103
104 - name: vnode
105 description: Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes).
106 default_value: ""
107 required: false
108 group: Virtual Node
109 examples:
110 folding:
111 title: Config
112 enabled: true
113 list:
114 - name: Check TCP ports (IPv4)
115 description: An example configuration.
116 config: |
117 jobs:
118 - name: local
119 host: 127.0.0.1
120 ports:
121 - 22
122 - 23
123 - name: Check TCP ports (IPv6)
124 description: An example configuration.
125 config: |
126 jobs:
127 - name: local
128 host: "[2001:DB8::1]"
129 ports:
130 - 80
131 - 8080
132 - name: Check UDP ports (IPv4)
133 description: An example configuration.
134 config: |
135 jobs:
136 - name: local
137 host: 127.0.0.1
138 udp_ports:
139 - 3120
140 - 3121
141 - name: Check UDP ports (IPv6)
142 description: An example configuration.
143 config: |
144 jobs:
145 - name: local
146 host: [::1]
147 udp_ports:
148 - 3120
149 - 3121
150 - name: Multi-instance
151 description: |
152 > **Note**: When you define multiple jobs, their names must be unique.
153
154 Multiple instances.
155 config: |
156 jobs:
157 - name: server1
158 host: 127.0.0.1
159 ports:
160 - 22
161 - 23
162
163 - name: server2
164 host: 203.0.113.10
165 ports:
166 - 22
167 - 23
168 troubleshooting:
169 problems:
170 list: []
171 alerts:
172 - name: portcheck_service_reachable
173 metric: portcheck.status
174 info: "TCP host ${label:host} port ${label:port} liveness status"
175 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/portcheck.conf
176 - name: portcheck_connection_timeouts
177 metric: portcheck.status
178 info: "percentage of timed-out TCP connections to host ${label:host} port ${label:port} in the last 5 minutes"
179 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/portcheck.conf
180 - name: portcheck_connection_fails
181 metric: portcheck.status
182 info: "percentage of failed TCP connections to host ${label:host} port ${label:port} in the last 5 minutes"
183 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/portcheck.conf
184 metrics:
185 folding:
186 title: Metrics
187 enabled: false
188 description: ""
189 availability: []
190 scopes:
191 - name: TCP endpoint
192 description: These metrics refer to the TCP endpoint.
193 labels:
194 - name: host
195 description: The hostname or IP address of the target system, as specified in the configuration.
196 - name: port
197 description: The TCP port being monitored, as defined in the 'ports' configuration parameter.
198 metrics:
199 - name: portcheck.status
200 description: TCP Check Status
201 unit: boolean
202 chart_type: line
203 dimensions:
204 - name: success
205 - name: failed
206 - name: timeout
207 - name: portcheck.state_duration
208 description: Current State Duration
209 unit: seconds
210 chart_type: line
211 dimensions:
212 - name: time
213 - name: portcheck.latency
214 description: TCP Connection Latency
215 unit: ms
216 chart_type: line
217 dimensions:
218 - name: time
219 - name: UDP endpoint
220 description: These metrics refer to the UDP endpoint.
221 labels:
222 - name: host
223 description: The hostname or IP address of the target system, as specified in the configuration.
224 - name: port
225 description: The UDP port being monitored, as defined in the 'udp_ports' configuration parameter.
226 metrics:
227 - name: portcheck.udp_port_status
228 description: UDP Port Check Status
229 unit: status
230 chart_type: line
231 dimensions:
232 - name: open/filtered
233 - name: closed
234 - name: portcheck.udp_port_status_duration
235 description: UDP Port Current Status Duration
236 unit: seconds
237 chart_type: line
238 dimensions:
239 - name: time