Applications Systems
Directory Size monitor does not display correct values in SAM email alerts
This article explains how to configure a component-level alert so that the Directory Size monitor displays the correct directory size value in email notifications in Server & Application Monitor (SAM).
First published date
Last published date
Overview
When using the Directory Size application monitor in SAM to track the size of a directory (for example, on the C drive), the alert email may not show the expected directory size value. Instead, the email either does not include the value or shows an incorrect value. The statistic returned by the Directory Size monitor must be referenced as component statistic data in a component-level alert to display correctly in the email.
Product section
Cause
This issue occurs when the alert is not configured as a component-level alert or when the alert email uses an incorrect token to reference the Directory Size monitor output. The value returned by the Directory Size monitor is stored as component statistic data and must be referenced using the ComponentAlert.StatisticData variable in a component alert.
Resolution
To display the current directory size from the Directory Size monitor in an email notification:
Create a component-level alert and reference the component statistic data token.
-
Verify that the Directory Size monitor returns a value
-
Open the Application Details view for the application that includes the Directory Size monitor.
-
Click Directory Size Monitor to open Application Component Details.
-
Confirm that Statistic Data shows the expected value (for example,
6632949).
-
-
Create a component-level alert for the Directory Size monitor
-
Go to Settings > All Settings > Manage Alerts.
-
Click Add New Alert.
-
In the alert properties, set a name (for example,
Directory Size monitor alert). -
In Trigger Condition, select Component as the alert type and target the Directory Size monitor component.
-
Configure the condition as required (for example, when the component status is Warning or Critical, or when the statistic exceeds the desired threshold).
-
-
Add an email action that includes the Directory Size monitor value
-
In the same alert, go to Trigger Actions and click Add Action > Send an Email/Page.
-
In the email Message body, insert the following variable where you want the directory size to appear:
${N=SwisEntity;M=ComponentAlert.StatisticData} -
Customize the rest of the email content as needed, and save the action.
-
-
Simulate and confirm the alert value
-
In Manage Alerts, select the alert and click Simulate Alert.
-
Run the simulation against the application and component that use the Directory Size monitor.
-
Confirm that the simulated result shows the same statistic value as the Statistic Data on the Application Component Details page.
-
When configured as a component alert and using the ${N=SwisEntity;M=ComponentAlert.StatisticData} variable, the email notification displays the correct current value of the Directory Size monitor.