= Monitor Performance
:toc:
:icons:
:linkattrs:
:imagesdir: ../resources/images


== Summary

This section will help you monitor the performance of the *MAZ* Amazon FSx for Windows File Server.


== Duration

NOTE: It will take approximately 15 minutes to complete this section.


== Step-by-step Guide

=== CloudWatch

IMPORTANT: Read through all steps below and watch the quick video.

image::monitor-performance.gif[align="left", width=600]

. From the link:https://console.aws.amazon.com/fsx/[Amazon FSx] console, *_click_* the link to the *MAZ* file system and *_click_* the *Monitoring* tab.
+
TIP: *_Context-click (right-click)_* the link above and open the link in a new tab or window to make it easy to navigate between this github workshop and AWS console.
+
. *_Review_* the values in the three available Amazon CloudWatch widgets - *Free storage capacity*, *Total throughput (bytes/sec)*. *Total IOPS (operations/sec)*.
. What's the free storage capacity?
. What total throughput values did the file system achieve during the performance tests?
. What total IOPS did the file system achieve during the performance tests?
. *_Move_* the cursor over the *Total throughput (bytes/sec)* widget and select the *_click_* the image:widgets-action.png[align="left",width=20] shortcut then the *View in metrics* link.
. *_Zoom_* in on the metric by *_clicking_* and *_dragging_* over a period of time.
. *_Reset_* zoom by *_clicking_* the blue magnifying glass in the top right of the metric.
. *_Move_* the cursor over the metric and observe the different throughput values. These values are in bytes/second. The Y (vertical) axis displays in millions of bytes per second or (MB/s).

=== CloudWatch alarm

IMPORTANT: Read through all steps below and watch the quick video before *_creating_* the alarm.

image::create-cloudwatch-alarm.gif[align="left", width=600]

. From the *Total throughput (bytes/sec)* metric from the Amazon CloudWatch console, *_click_* the image:create-alarm.png[align="left",width=20] *Create alarm* link on the *Total throughput* line item.
. *_Scroll_* down to the *Conditions* section. *_Accept_* the default *Threshold type* and *Greater* alarm condition and in the *Define the threshold value* field *_enter_* 200000000. This will set an alarm condition that will trigger if the *Total Data Throughput (B/s)* is greater than 200 MB/s.
. *_Click_* *Next*.
. In the *Notification* box under the *Select an SNS topic* sesion, *_click_* *Create new topic*.
. In the *Create new topic...* field, *_enter_* *High_Throughput_* then *_paste_* the file system id.
. In the *Email endpoints that will receive the notification...* field, *_enter_* an email address you have access to right now.
. *_Click_* *Create topic*.
. *_Click_* *Next*.
. Give the alarm a name like *High_Throughput_* then *_paste_* the file system id.
. *_Click_* *Next*.
. *_Scroll_* to the bottom and *_click_* *Create alarm*.
. The email address you entered earlier will receive an *AWS Notification - Subscription Confirmation* email. *_Open_* the email and *_click_* *Confirm subscription*.
. *_Wait_* a few minutes for the alarm state to transition from *Insufficient data* to *OK*.
. *_Return_* to the previous workshop section *Test performance* and run a few more read and write performance tests against the file system. Make sure the duration of the test is at least 2 minutes.
* Did your *High throughput alarm* get triggered?
* Did your email address receive an alarm notification?

== Next section

Click the button below to go to the next section.

image::enable-data-dedupe.png[link=../10-enable-data-dedupe/, align="left",width=420]




