I have a windows based i3.large EC2 instance on AWS with the 450GB NVMe drive. I would like to setup monitoring of the NVMe storage so that I can see our utilization without RDPing into the server. CloudWatch doesn't seem to have Disk Utilization as a metric. Is there anyways to do this?
1 Answers
AWS doesn't have access to your instances to collect the disk utilization metric (or the disk free metric) so you need to install the CloudWatch Agent in your instances.
You can install the the CloudWatch Agent manually or with Systems Manager agent. Manually it can be downloaded from:
https://s3.amazonaws.com/amazoncloudwatch-agent/windows/amd64/latest/amazon-cloudwatch-agent.msi
(An instance role needs to be defined and associated to the instance to allow the agent to publish metrics to CloudWatch. Follow the documentation for this).
The CloudWatch Agent documentation about collected metrics on Windows says:
On a server running Windows Server, installing the CloudWatch agent enables you to collect the metrics associated with the counters in Windows Performance Monitor. The CloudWatch metric names for these counters are created by putting a space between the object name and the counter name. For example, the % Interrupt Time counter of the Processor object is given the metric name Processor % Interrupt Time in CloudWatch. For more information about Windows Performance Monitor counters, see the Microsoft Windows Server documentation.
A quick search about Windows Performance Monitors takes us to a TechNet blogpost about disk performance metrics:
% Free Space Display the percentage of the total usable space on the selected logical disk that was free.
In the CloudWatch Agent manual configuration documentation you can find a Windows section where you can see how to define the Performance Monitor counters. I've added a snippet with the DISK_FREE metric:
"metrics": {
"metrics_collected": {
"statsd": {},
"Processor": {
"measurement": [
{"name": "% Idle Time", "rename": "CPU_IDLE", "unit": "Percent"},
"% Interrupt Time",
"% User Time",
"% Processor Time"
],
"resources": [
"*"
],
"append_dimensions": {
"d1": "win_foo",
"d2": "win_bar"
}
},
"LogicalDisk": {
"measurement": [
{"name": "% Idle Time", "unit": "Percent"},
{"name": "% Disk Read Time", "rename": "DISK_READ"},
{"name": "% Free Space", "unit": "Percent", "rename": "DISK_FREE"},
"% Disk Write Time"
],
"resources": [
"*"
]
},
...