Oracle Cloud Infrastructure (OCI) File Storage service customers often want to monitor the health and performance of their storage service. OCI offers various ways to do so, including through metrics and charts available on the Oracle Cloud Console. However, continuously monitoring these charts can be tedious and only allows only reactive monitoring. Customers prefer monitoring proactively to receive notifications about critical parameters of File Storage before issues escalate. This way, they can take preventive or corrective actions and better understand their storage performance.
For those unfamiliar with the service, OCI File Storage is a secure, scalable, and durable network file system. Many customers use it for critical production workloads and important enterprise applications. File Storage emits various metrics through its various components, such as the file system, mount targets, replication, and Kerberos.
This blog offers a solution for customers who want to stay notified about OCI File Storage metrics by receiving proactive notifications and prevent any potential issues. People with similar needs can follow the blog to create a basic or advanced monitoring notifications.
To prevent any unforeseen costs, you might want to get regular updates on your file system usage by email. You can check the total utilization of your file system in three ways. You can go to the OCI web console, or log in to the network file system (NFS) client where your file system is mounted, or use CLI or API methods. But if you configure notifications, you can receive notifications about your file system usage straight to your inbox or mobile device.
To receive notifications regarding file system usage, you need to create a topic and then a subscription. You can select from various subscription methods, including SMS or email. If you choose email as your preferred method, you receive a confirmation email that you must confirm to activate your subscription.
Next, you can create an alarm definition based on your preferred File Storage metrics, such as FileSystemUsage. This way, an alarm triggers whenever the specified condition is met. Let’s look at the Create Alarm page, focusing on the Metric Description, Metric dimensions, and Trigger Rule sections.
1. Choose the metric namespace "oci_filestorage" to get the metrics from OCI File Storage.
2. Select the metric that you want to monitor from the menu.
3. Choose the appropriate resource type, such as file system or mount target.
In the Trigger rule section, set a threshold usage of your preferred value, such as 1 MB, to trigger the alarm. In the Destination section, choose the topic that you created in the previous steps from the menu and select other options as necessary to create the alarm.
After successfully creating the alarm and notifications, you receive an email notification when the file system usage crosses 1 MB, as shown in the following image. You can also opt for other subscription methods, like receiving notifications through SMS on your mobile device.
You can also get notified about the health of the mount target by using the metric, MountTargetHealth. As the following configuration shows, if the mount target’s health drops below 95%, an email notification is sent.
Similarly, MountTargetConnections is another useful metric in measuring the number of active NFS connections in a specific mount target. You can configure the trigger rule to notify you when the number of NFS connections exceeded to plan for another mount target or when the number of NFS connections drop below a certain threshold to investigate the reason for the drop.
To monitor only a specific resource, on the Create Alarm page, click Additional dimension and select “resourceid” as the dimension name from the menu.
For example, the following example shows how to monitor only a specific resource by OCID.
You can also create the alarm directly by navigating to the Metrics charts available under the File system page in the Oracle Cloud Console. But first, create the corresponding topic for receiving notifications.
Under Resources in the side menu, click Metrics. In the Options menu, click Create and alarm on this query.
OCI File Storage metrics provide valuable information for proactive monitoring of File Storage performance. We have discussed a solution that assists customers with proactive monitoring of their File Storage metrics because monitoring through the Console allows only reactive monitoring. Additionally, we have discussed several File Storage metrics and their usefulness in proactive monitoring. If you need to monitor important key performance indicators (KPIs), you can develop complex queries using the Query Editor. You can also customize the alarm message for each notification to make it more meaningful.