EC2 Instances uptime

0

Looking to generate a report for the uptime of all the EC2 instances running on aws. What is the best way to get this report?

profile pictureAWS
質問済み 1年前1463ビュー
2回答
2

Open CloudShell, type pwsh then press the Enter key to start a PowerShell session, then run the following to calculate the running time of each EC2 instance in every region:

foreach($region in (Get-EC2Region).RegionName) { Get-EC2Instance -Region $region | ForEach-Object { [pscustomobject]@{InstanceId = $_.Instances.InstanceId; UptimeInDays = ((Get-Date) - $_.Instances.UsageOperationUpdateTime).Days; Region = $region }}}

The output should look something like this:

InstanceId          UptimeInDays Region
----------          ------------ ------
i-1234567890abcdef0          554 eu-west-1
i-1234567890abcdef1          501 eu-west-2
AWS
Trent
回答済み 1年前
0

Hi, for a quick start and short feedback loop from your customer, you may want to start with 3rd-party packaged services running as SaaS.

See https://www.comparitech.com/net-admin/aws-monitoring-services/

profile pictureAWS
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ