Amazon Elastic Compute Cloud (Amazon EC2) は、クラウド内でサイズ変更可能なコンピューティング能力を提供する Web サービスです。開発者が Web スケールのコンピューティングを簡単に利用できるように設計されています。
このインテグレーションを有効にすると、すべての EC2 メトリクスと、スケジュール設定されたメンテナンスなどの追加イベントが Datadog に表示されます。
Amazon Web Services インテグレーションをまだセットアップしていない場合は、最初にセットアップします。
AWS インテグレーションタイルで Configuration タブを開き、Limit metric collection by AWS Service で EC2
をオンにします。
Amazon EC2 のメトリクスを収集するために、次のアクセス許可を Datadog IAM ポリシーに追加します。EC2 ポリシーの詳細については、AWS Web サイトのガイドを参照してください。
AWS アクセス許可 | 説明 |
---|---|
ec2:DescribeInstanceStatus | インスタンスの健全性をアサートするために、ELB インテグレーションによって使用されます。すべてのインスタンスの健全性を記述するために、EC2 インテグレーションによって使用されます。 |
ec2:DescribeSecurityGroups | EC2 インスタンスに SecurityGroup 名とカスタムタグを追加します。 |
ec2:DescribeInstances | EC2 インスタンスと EC2 Cloudwatch メトリクスにタグを追加します。 |
Datadog - AWS EC2 インテグレーションをインストールします。
注: Datadog を使用して EC2 インスタンスの一部を監視する場合は、それらの EC2 インスタンスに datadog:true
などの AWS タグを割り当てます。次に、Datadog AWS インテグレーションタイルの Optionally limit metrics collection テキストボックスで、そのタグを指定します。
Datadog は、Cloudwatch API からのホストステータスに基づいて、EC2 インスタンスの手動シャットダウンや AWS オートスケーリングによってトリガーされるインスタンスの停止に関連するモニターを事前にミュートすることができます。オートミュートされた EC2 インスタンスは、[モニターのダウンタイム][6ページで Show automatically muted hosts をオンにするとリストされます。
オートミュートを有効にするには、EC2 インテグレーションをインストールする必要があります。メトリクスの収集が何らかのタグが付いたホストに限られている場合は、それらのタグと一致するインスタンスだけがオートミュートされます。
EC2 インスタンスのシャットダウンが予期される場合にモニターをオフにするには、AWS インテグレーションタイルで EC2 automuting チェックボックスをオンにします。
次の手順に従い、AWS Systems Manager を使用して Datadog Agent を EC2 インスタンスにインストールします。AWS EC2 インスタンスに Agent をインストールするメリットについては、クラウドインスタンスに Datadog Agent をインストールする理由を参照してください。
パラメーターストアで、以下のように指定してパラメーターを作成します。
dd-api-key-for-ssm
安全な文字列
現在のアカウント
Systems Manager で、新しいドキュメントを作成します。
dd-agent-install
コマンドのドキュメント
JSON
Datadog US サイトの場合は、runCommand
をご使用の <AWS リージョン>
(例: us-east-1
) で更新した dd-agent-install-us-site.json ファイルを使用します。Datadog EU サイトの場合は、dd-agent-install-eu-site.json を使用します。
Run Command で、Run command ボタンをクリックし、次の手順に従います。
Run ボタンをクリックすると、ステータスを示す確認ページが表示されます。終了後に、Datadog でインフラストラクチャーリストをチェックします。
Datadog Agent または別のログシッパーを使用して、Datadog にログを送信します。
aws.ec2.cpucredit_balance (gauge) | Number of CPU credits that an instance has accumulated. Shown as unit |
aws.ec2.cpucredit_usage (gauge) | Number of CPU credits consumed. Shown as unit |
aws.ec2.cpusurplus_credit_balance (gauge) | The number of surplus credits that have been spent by an unlimited instance when its CPUCreditBalance value is zero. Shown as unit |
aws.ec2.cpusurplus_credits_charged (gauge) | The number of spent surplus credits that are not paid down by earned CPU credits, and which thus incur an additional charge. Shown as unit |
aws.ec2.cpuutilization (gauge) | Average percentage of allocated EC2 compute units that are currently in use on the instance. Shown as percent |
aws.ec2.cpuutilization.maximum (gauge) | Maximum percentage of allocated EC2 compute units that are currently in use on the instance. Shown as percent |
aws.ec2.disk_read_bytes (gauge) | Bytes read from all ephemeral disks available to the instance. Shown as byte |
aws.ec2.disk_read_ops (gauge) | Completed read operations from all ephemeral disks available to the instance. Shown as operation |
aws.ec2.disk_write_bytes (gauge) | Bytes written to all ephemeral disks available to the instance. Shown as byte |
aws.ec2.disk_write_ops (gauge) | Completed write operations to all ephemeral disks available to the instance. Shown as operation |
aws.ec2.ebsbyte_balance (gauge) | Available only for the smaller instance sizes. Provides information about the percentage of throughput credits remaining in the burst bucket. This metric is available for basic monitoring only. Shown as percent |
aws.ec2.ebsiobalance (gauge) | Available only for the smaller instance sizes. Provides information about the percentage of I/O credits remaining in the burst bucket. This metric is available for basic monitoring only. Shown as percent |
aws.ec2.ebsread_bytes (gauge) | Bytes read from all EBS volumes attached to the instance in a specified period of time. Shown as byte |
aws.ec2.ebsread_ops (count) | Completed read operations from all Amazon EBS volumes attached to the instance in a specified period of time. Shown as operation |
aws.ec2.ebswrite_bytes (gauge) | Bytes written to all EBS volumes attached to the instance in a specified period of time. Shown as byte |
aws.ec2.ebswrite_ops (count) | Completed write operations to all EBS volumes attached to the instance in a specified period of time. Shown as operation |
aws.ec2.host_ok (gauge) | 1 if the instance's system status is ok. |
aws.ec2.instance_age (gauge) | Time since instance launch Shown as second |
aws.ec2.network_in (gauge) | Average number of bytes received on all network interfaces by the instance. Shown as byte |
aws.ec2.network_in.maximum (gauge) | Maximum number of bytes received on all network interfaces by the instance. Shown as byte |
aws.ec2.network_out (gauge) | Average number of bytes sent out on all network interfaces by the instance. Shown as byte |
aws.ec2.network_out.maximum (gauge) | Maximum number of bytes sent out on all network interfaces by the instance. Shown as byte |
aws.ec2.network_packets_in (gauge) | Number of packets received on all network interfaces by the instance Shown as packet |
aws.ec2.network_packets_out (gauge) | Number of packets sent out on all network interfaces by the instance Shown as packet |
aws.ec2.status_check_failed_instance (gauge) | 0 if the instance has passed the EC2 instance status check. |
aws.ec2.status_check_failed_system (gauge) | 0 if the instance has passed the EC2 system status check. |
aws.ec2.status_check_failed (gauge) | 1 if one of the status checks failed. |
AWS から取得される各メトリクスには、ホスト名やセキュリティ グループなど、AWS コンソールに表示されるのと同じタグが割り当てられます。
注: Datadog - EC2 インテグレーションは、デフォルトでは aws.ec2.instance_age
を収集しません。このメトリクスの収集を有効にするには、Datadog のサポートチームまでお問い合わせください。
aws.ec2.host_status
AWS コンソールによって報告された EC2 インスタンスのステータスを返します。インスタンスに問題がある場合は、CRITICAL
を返します。AWS にステータスチェックを実行するのに十分なデータがない場合は、UNKNOWN
を返します。インスタンスが実行中または適切にシャットダウンされている場合は、OK
を返します。
AWS EC2 インテグレーションには、インスタンスの警告と共に、スケジュール設定されたメンテナンスと次回のメンテナンスのイベントが含まれます。以下はイベントの例です。
ご不明な点は、Datadog のサポートチームまでお問合せください。