Instal CloudWatch agen di perangkat - Amazon Kinesis Video Streams

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Instal CloudWatch agen di perangkat

catatan

Waspadai CloudWatchkuota.

Ikuti prosedur ini untuk menginstal dan mengonfigurasi CloudWatch agen agar secara otomatis mengunggah log yang dihasilkan oleh Agen Edge Amazon Kinesis Video Streams ke. CloudWatch Ini adalah langkah opsional.

Untuk prosedur menginstal CloudWatch agen di perangkat Anda, lihat Panduan CloudWatch Pengguna Amazon.

Ketika diminta untuk konfigurasi, pilih salah satu konfigurasi berikut.

penting

file_pathDalam konfigurasi berikut mengasumsikan bahwa lokasi output logging default digunakan.

Jalur file yang digunakan mengasumsikan bahwa Anda menjalankan Agen Tepi Amazon Kinesis Video Streams dari lokasi:. download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version

  • Untuk mengonfigurasi CloudWatch agen untuk mengunggah log dan memposting perangkat RAM dan CPU metrik, tempelkan berikut ini ke dalam file konfigurasi.

    { "agent": { "run_as_user": "ubuntu", "metrics_collection_interval": 60 }, "metrics": { "metrics_collected": { "mem": { "measurement": [ "mem_used_percent" ], "append_dimensions": { "IotThing": "YourIotThingName" } }, "cpu": { "resources": [ "*" ], "measurement": [ "usage_active" ], "totalcpu": true, "append_dimensions": { "IotThing": "YourIotThingName" } } } }, "logs": { "logs_collected": { "files": { "collect_list": [ { "file_path": "download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version/log/java_kvs.log", "log_group_name": "/aws/kinesisvideo/EdgeRuntimeAgent", "log_stream_name": "YourIotThingName-java_kvs.log" }, { "file_path": "download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version/log/cpp_kvs_edge.log*", "log_group_name": "/aws/kinesisvideo/EdgeRuntimeAgent", "log_stream_name": "YourIotThingName-cpp_kvs_edge.log" }, { "file_path": "download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version/log/cpp_kvs_streams.log*", "log_group_name": "/aws/kinesisvideo/EdgeRuntimeAgent", "log_stream_name": "YourIotThingName-cpp_kvs_streams.log" }, { "file_path": "download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version/log/cpp_kvssink.log*", "log_group_name": "/aws/kinesisvideo/EdgeRuntimeAgent", "log_stream_name": "YourIotThingName-cpp_kvssink.log" } ] } } } }
  • Untuk mengunggah hanya log dan tidak mengumpulkan perangkat RAM danCPU, gunakan konfigurasi berikut:

    { "logs": { "logs_collected": { "files": { "collect_list": [ { "file_path": "download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version/log/java_kvs.log", "log_group_name": "/aws/kinesisvideo/EdgeRuntimeAgent", "log_stream_name": "YourIotThingName-java_kvs.log" }, { "file_path": "download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version/log/cpp_kvs_edge.log*", "log_group_name": "/aws/kinesisvideo/EdgeRuntimeAgent", "log_stream_name": "YourIotThingName-cpp_kvs_edge.log" }, { "file_path": "download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version/log/cpp_kvs_streams.log*", "log_group_name": "/aws/kinesisvideo/EdgeRuntimeAgent", "log_stream_name": "YourIotThingName-cpp_kvs_streams.log" }, { "file_path": "download-location/kvs-edge-agent/KvsEdgeComponent/artifacts/aws.kinesisvideo.KvsEdgeComponent/version/log/cpp_kvssink.log*", "log_group_name": "/aws/kinesisvideo/EdgeRuntimeAgent", "log_stream_name": "YourIotThingName-cpp_kvssink.log" } ] } } } }