Monitoring Available Disk Space
A common system metric to monitor is the available disk space on a given system or host. This guide helps you create a monitor that alerts you when free disk space for a host falls below 10% for any host reporting to Datadog.
To create the monitor for available disk space:
In the navigation menu, click Monitors.
Click New Monitor.
Select Metric as the monitor type.
In the Define the metric section, use system.disk.free
for the metric and select host
for avg by. This is Query a.
Click Add Query. For this metric, use system.disk.total
for the metric and use host
for avg by. This is Query b.
In the formula that appears, replace a + b
with a/b*100
.
Under Evaluation Details, choose your desired evaluation interval.
Under Set alert conditions, select below from the threshold options and enter 10
in Alert threshold field.
In Configure notifications & automations, give your monitor a name, then specify the notification message. Include relevant details and a meaningful message template. For example:
{{#is_alert}} Alert: Free disk space is below {{threshold}}% on {{host.name}}. {{/is_alert}}
{{#is_warning}} Warning: Free disk space is below {{warn_threshold}}% on {{host.name}}. {{/is_warning}}
Disk space available: {{value}}%
Click Create to save the monitor.