How to send e-mail notification when disk space is low

From NetXMS Wiki
Jump to: navigation, search

This tutorial will show step-by-step how to send an e-mail when free space on file system goes below certain limit. You should be already familiar with basic UI concepts of NetXMS. If not, please read Management Console section of the user manual first.


First, go to Configuration, Actions Configuration:

Netxms tutorial01 screen01.png


Action configuration will open. Select New action from context menu or view drop down menu. Action configuration dialog will popup. Fill it as in the following screenshot:

Netxms tutorial01 screen02.png

In this example, we define action that will send e-mail to address admin@company.com, with identical subject and body. You can use different macros here. Text in this example will expand to event severity in square brackets followed by host name and message text. It could look like following:

[MAJOR] host01: File system / is low on free space

Close action configuration view and go to Configuration, Event Configuration:

Netxms tutorial01 screen03.png

Event configuration view will open. Select New event template from context menu or view drop down menu. Event configuration dialog will popup. Fill it as in the following screenshot:

Netxms tutorial01 screen04.png

You can use same macros as in action configuration when define event's message text.

Press OK to save event template and close event configuration view. Now select node object in object browser where you want to monitor free space (we use host named AIX in our example):

Netxms tutorial01 screen05.png


Data collection configuration view will open. Select New parameter from context menu or view drop down menu:

Netxms tutorial01 screen06.png


DCI properties dialog will popup. Press Select button and select FileSystem.FreePerc parameter from the list:

Netxms tutorial01 screen07.png


Press OK. Description, name, and data type fields will be filled automatically. Replace * and {instance} texts with actual name of the file system (we use root file system in our example):

Netxms tutorial01 screen08.png


You can also set desired polling interval and retention time. Then go to Thresholds page and press Add to add new threshold:

Netxms tutorial01 screen09.png


Select DC_FILESYSTEM_LOW_SPACE (our new event created before) as activation event and enter desired function and value. In our example we using condition <= 20, so when free space on root file system falls below 20%, event DC_FILESYSTEM_LOW_SPACE will be generated. Press OK to save the threshold definition. Your Thresholds page should looks like following:

Netxms tutorial01 screen10.png


Enter file system name into the Instance field - it will be shown in message text via %6 macro. Press OK to save new DCI, and close data collection configuration view. Go to Configuration, Event Processing Policy:

Netxms tutorial01 screen11.png


Event processing policy editor will open. Right-click on any rule and select Insert before or Insert after from context menu:

Netxms tutorial01 screen12.png


New empty rule will be inserted. Double click on rule's header or click properties icon in upper right corner of the rule to open rule properties. Go to Events page and add our new event, DC_FILESYSTEM_LOW_SPACE, to the list:

Netxms tutorial01 screen13.png


Then go to Server Actions page and add E-Mail Notification (action created on the first step) to the list:

Netxms tutorial01 screen14.png


You rule should looks like following:

Netxms tutorial01 screen15.png


Save event processing policy and close policy editor. Now you have working configuration which will send notifications to e-mail when free disk space will fall below defined threshold.