The TCP check is included in the Datadog Agent package. No additional installation is needed on your server.
Many metrics checks are best run on the same host(s) as the monitored service. However, it’s recommended to run this check from hosts that do not run the monitored TCP services to test remote connectivity.
init_config:instances:- name:SSH checkhost:jumphost.example.com# or an IPv4/IPv6 addressport:22collect_response_time:true# to collect network.tcp.response_time. Default is false.
Configuration Options:
name (Required) - Name of the service. This is included as a tag: instance:<name>. Note: Any spaces or dashes are converted to underscores.
host (Required) - Host to be checked. This is included as a tag: url:<host>:<port>.
port (Required) - Port to be checked. This is included as a tag: url:<host>:<port>.
timeout (Optional) - Timeout for the check. Defaults to 10 seconds.
collect_response_time (Optional) - Defaults to false, which means no response time metric is collected. If set to true, the metric returned is network.tcp.response_time.
tags (Optional) - Tags to be assigned to the metric.
Restart the Agent to start sending TCP service checks and response times to Datadog.
tcp.can_connect Returns CRITICAL if the Agent cannot establish an TCP connection to the URL. Returns OK if the connection is successful. Statuses: ok, critical
Note: To set an alert on this service check, create a Network Monitor.