5 min. Read
Updated – 22/04/2019 – Monitor Azure File Sync with Azure Monitor is GA.
In July 2018, Microsoft announced GA release for Azure File Sync. With Azure File Sync, you can centralize your files in Azure and then install the Storage Sync Agent on Windows Server, whether it’s local or Azure, to provide fast local access to your files. Your servers and Azure files are constantly in sync, so you have one centralized location for your files with access to multiple sites, supported by fast local caching and cloud staging. What Cloud stairs no, it builds a heat map to your disk over time of what files are used, what files are written to, and then when the disks fill up, the files are moved to the cloud and only store logs (namespace) on disks locally, so when the user clicks any tiered file, it loads seamlessly From Azure Files instead of opening directly from local disks. Of course, this is desirable for those files that you don’t use very often, but still want them to be close.
To learn more about Azure File Sync, check out the previous one step-by-step article on getting started with Azure File Sync.
Now you turned on Azure File Sync and everything works fine, but you want to monitor your health. In this article, I’ll show you the monitoring options available to you today to monitor Azure File Sync monitoring, which can help you troubleshoot any issues you may encounter.
The following control options are available today:
Option # 1 – Azure Portal
You can use Azure portal to see Registered server state and Server endpoint condition (synchronize health).
Registered server status
- If Registered Server Status = Online, the server successfully communicates with the storage synchronization service.
- If Registered Server Status = Offline or Appears offline, then you need to confirm Storage Sync Monitor (AzureStorageSyncMonitor.exe) server process is in progress. If the server is behind a firewall or proxy server, see the following documentation configure the firewall and proxy server.
Server endpoint condition
- Server endpoint condition Azure portal based on synchronization events logged locally to the server in Telemetry event logs (ID 9102 and 9302) – check Option 2 Learn more. If a synchronization session fails due to a transient error (e.g., Error Canceled), synchronization may still look good on the portal as long as the current synchronization session progresses (Event ID 9302 is used to specify files).
- If the portal displays a sync error due to a sync failure, check the following documentation for troubleshooting instructions.
Option 2 – Windows Server event logs
You can use the following Telemetry event logs for local monitoring of Azure File Sync on the server Event viewer below (Applications and service logs Microsoft File Sync Agent).
Synchronize your health
- Event ID 9102 is logged when synchronization is complete. This event must be used to determine whether synchronization sessions were successful (HResult = 0) and whether there are site-specific synchronization errors. See the following documents for more information: Synchronize your health & Product specific errors.
- Event ID 9302 is recorded every 5-10 minutes if the synchronization system is active. This event must be used to determine if the current synchronization session is progressing (AppliedItemCount> 0). If synchronization does not progress, the synchronization session should eventually fail and Event ID 9102 recorded with an error. Check the following documentation Learn more about the progress of synchronization.
Registered server status
- Event ID 9301 is logged every 30 seconds when the server requests any jobs from the service. If GetNextJob completes the state = 0, the server is able to communicate with the recording synchronization service. If GetNextJob completes the error, check the following documentation for troubleshooting instructions.
Cloud level health
Handicap: You can monitor server tiering activity and errors by checking the following event logs:
- Event ID 9002 provides ghosting statistics for the server endpoint. For example, TotalGhostedFileCount, SpaceReclaimedMB, etc.
- Event ID 9003 provides error sharing to the server endpoint. For example, Total Error Count, ErrorCode, etc. Note that one event is recorded per error code.
- Event ID 9016 provides ghost images for the result. For example, the percentage of free space is the number of files ghosted in a session, the number of files that failed in a ghost, and so on.
- Event ID 9029 provides ghost image information. For example, the number of files attempted in a session, the number of files phased in a session, the number of files already phased, and so on.
Recall: To track recovery activity and errors, check the following event logs:
- Event ID 9005 provides server terminal transaction reliability. For example, the total number of unique files used, the total number of unique files for failed accesses, and so on.
- Event ID 9006 provides the distribution of recovery errors to the server endpoint. For example, the total number of failed requests, ErrorCode, etc. Note that one event is logged per error code.
- Event ID 9007 provides server endpoint recovery power. For example, TotalRecallIOSize, TotalRecallTimeTaken, etc.
Since I just turned on Azure File Sync, I don’t yet have an event ID logged for recovery.
Option 3 – Azure File Sync Performance Counters
You can also monitor synchronization activity locally on the server with Azure File Sync built-in performance counters.
Open Perfmon.msc and add the following performance counters:
AFS bytes moved
- Loaded bytes / s
- Total bytes / s
- Loaded bytes / s
AFS synchronization functions
- Downloaded sync files / s
- Total number of sync files / s
- Downloaded sync files / s
Option # 4 – Azure Portal – Azure Monitor
Last but not least, you can use Azure Monitor. Azure Monitor As you write this article, you can view the following information about Azure File Sync in Azure Monitor by selecting Storage Sync service.
- Bytes synchronized the metric shows the size of the transferred data (download and upload).
- Restoration of cloud stairs the metric indicates the size of the data retrieved.
- Files are not synced the metric shows the number of files that failed to sync.
- Synced files the metric shows the number of files transferred (upload and download).
- Online status of the server the metric shows the number of heartbeats received from the server.
- Sync session result the metric shows the result of the sync session (1 = successful sync session; 0 = failed sync session).
You can expect a lot of improvements to be added to Azure Monitor in the near future.
As you can see, we have several options to monitor Azure File Sync status and activity status. Personally, I see the integration with Azure Monitor that looks really promising. Microsoft is fine instructions for troubleshooting instructions, check it if you run into problems.
Azure File Sync extends local file servers to Azure, providing cloud benefits while maintaining performance and compatibility. Azure File Sync offers:
- Multi-site access – grant write access to the same data through Windows servers and Azure Files.
- Cloud Stairs – Store only recently used data on local servers.
- Integrated with Azure Backup, so you don’t have to back up your data on-site.
- Quick Emergency Recovery – recover file metadata immediately and retrieve the data as needed.
We hope you find this guide useful.
Thanks for locking my blog.
If you have any questions or feedback, please leave a comment.