To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.
To initiate an exception request to enable this integration for your organization, email [email protected].

概要
任意のホストおよびポートの TCP 接続と応答時間を監視します。
セットアップ
インストール
TCP チェックは Datadog Agent パッケージに含まれています。サーバーに追加でインストールする必要はありません。
多くのメトリクスチェックは、監視するサービスと同じホストで実行するのが最適です。しかし、このチェックの場合は、リモート接続をテストするために、監視する TCP サービスを実行していないホストから実行することをお勧めします。
構成
ホスト
ホストで実行中の Agent に対してこのチェックを構成するには
Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの tcp_check.d/conf.yaml ファイルを編集します。使用可能なすべてのコンフィギュレーションオプションの詳細については、サンプル tcp_check.d/conf.yaml を参照してください。
init_config:
instances:
- name: SSH check
host: jumphost.example.com # または IPv4/IPv6 アドレス
port: 22
collect_response_time: true # network.tcp.response_time を収集します。デフォルトは false です。
構成オプション
name (必須) - サービスの名前。これは、タグ instance:<name> で指定します。注: すべてのスペースまたはダッシュはアンダースコアに変換されます。host (必須) - チェックするホスト。これは、タグ url:<host>:<port> で指定します。port (必須) - チェックするポート。これは、タグ url:<host>:<port> で指定します。timeout (オプション) - チェックのタイムアウト。デフォルトは 10 秒です。collect_response_time (オプション) - デフォルトは false で、この場合、応答時間メトリクスは収集されません。これを true に設定した場合は、メトリクス network.tcp.response_time が返されます。tags (オプション) - メトリクスに割り当てるタグ。
Agent を再起動すると、Datadog への TCP サービスチェックと応答時間の送信が開始されます。
コンテナ化
コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。
| パラメーター | 値 |
|---|
<INTEGRATION_NAME> | tcp_check |
<INIT_CONFIG> | 空白または {} |
<INSTANCE_CONFIG> | {"name": "<TCP_CHECK_INSTANCE_NAME>", "host":"%%host%%", "port":"%%port%%"} |
検証
Agent の status サブコマンドを実行し、Checks セクションで tcp_check を探します。
収集データ
メトリクス
| |
|---|
network.tcp.response_time (gauge) | The response time of a given host and TCP port, tagged with url, e.g. ‘url:192.168.1.100:22’. Shown as second |
network.tcp.can_connect (gauge) | Value of 1 if the agent can successfully establish a connection to the URL, 0 otherwise |
イベント
TCP チェックには、イベントは含まれません。
サービスチェック
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.
注: このサービスチェックにアラートを設定するには、ネットワークモニターを作成します。
トラブルシューティング
ご不明な点は、Datadog のサポートチームまでお問い合わせください。