Difference between revisions of "How to send e-mail notification when disk space is low"

Jump to navigation Jump to search
no edit summary
Line 1: Line 1:
This tutorial will show step-by-step how to send an e-mail when free space on file system goes below certain limit.
This tutorial will show step-by-step how to send an e-mail when free space on file system goes below certain limit.
First, go to '''Configuration''', '''Actions Configuration''':


[[File:netxms_tutorial01_screen01.png]]
[[File: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:


[[File:netxms_tutorial01_screen02.png]]
[[File:netxms_tutorial01_screen02.png]]
In this example, we define action that will send e-mail to address [email protected], with identical subject and body. You can use different [[UM:Event_Processing#Macros_for_Event_Processing|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''':


[[File:netxms_tutorial01_screen03.png]]
[[File: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:


[[File:netxms_tutorial01_screen04.png]]
[[File:netxms_tutorial01_screen04.png]]
You can use same [[UM:Event_Processing#Macros_for_Event_Processing|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):


[[File:netxms_tutorial01_screen05.png]]
[[File:netxms_tutorial01_screen05.png]]
Data collection configuration view will open. Select '''New parameter''' from context menu or view drop down menu:


[[File:netxms_tutorial01_screen06.png]]
[[File:netxms_tutorial01_screen06.png]]
[[UM:Basic_Concepts#DCI_.28Data_Collection_Items.29|DCI]] properties dialog will popup. Press '''Select''' button and select '''FileSystem.FreePerc''' parameter from the list:


[[File:netxms_tutorial01_screen07.png]]
[[File: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):


[[File:netxms_tutorial01_screen08.png]]
[[File: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:


[[File:netxms_tutorial01_screen09.png]]
[[File: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:


[[File:netxms_tutorial01_screen10.png]]
[[File: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''':


[[File:netxms_tutorial01_screen11.png]]
[[File: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:


[[File:netxms_tutorial01_screen12.png]]
[[File: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:


[[File:netxms_tutorial01_screen13.png]]
[[File:netxms_tutorial01_screen13.png]]
Then go to '''Server Actions''' page and add '''E-Mail Notification''' (action created on the first step) to the list:


[[File:netxms_tutorial01_screen14.png]]
[[File:netxms_tutorial01_screen14.png]]
You rule should looks like following:


[[File:netxms_tutorial01_screen15.png]]
[[File: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.
683

edits

Navigation menu