TCP checks run in the agent and can verify whether or not a TCP service is up or down and responds in a certain time.
Also see the related HTTP Checks.
No installation is required
tcp_check.yaml file in your agent’s
conf.d directory. The following yaml file will check both ports 22 and 443 on 192.168.22.1 with timeouts of 10 seconds. The response time will be available in the metric
init_config: instances: - name: SSH on Server host: 192.168.22.1 port: 22 timeout: 10 collect_response_time: true skip_event: true tags: - demo:matt - name: 443 on Server host: 192.168.22.1 port: 443 timeout: 10 skip_event: true collect_response_time: true tags: - demo:matt
name(Required) - Name of the service. This will be included as a tag:
host(Required) - Host to be checked. This will be included as a tag:
port(Required) - Port to be checked. This will be included as a tag:
timeout(Optional) - Timeout for the check. Defaults to 10 seconds.
threshold(Optional) - Used in conjunction with
window. An alert will trigger if the check fails
window(Optional) - Refer to ‘threshold’.
collect_response_time(Optional) - Defaults to false. If this is not set to true, no response time metric will be collected. If it is set to true, the metric returned is
skip_event(Optional) - Defaults to false. Set to true to skip creating an event. This option will be removed in a future version and will default to true.
tags(Optional) - Tags to be assigned to the metric.
For more details about configuring this integration refer to the following file(s) on GitHub:
Execute the agent info command and verify that the integration check was successful. The output should contain a section similar to the following:
Checks ====== tcp_check --------- - instance #0 [OK] - instance #1 [OK] - Collected 2 metrics, 0 events & 3 service checks