PRTG Manual: Setting up Notifications Based on Sensor Limits: Example
This documentation refers to the PRTG System Administrator user accessing the PRTG web interface on a master node. If you use other user accounts, interfaces, or nodes, you might not see all of the options in the way described here. If you use a cluster installation, note that failover nodes are read-only by default.
This section shows you an example of how to set up a notification for exceeded disk free limits. We provide the approach for this specific use case step by step so you can adapt it to define limits and corresponding notifications for other sensors.
You have to take several steps to set up notifications based on limits:
- Step 1: Provide necessary information about the delivery of notifications (Simple Mail Transfer Protocol (SMTP) and SMS).
- Step 2: Specify recipients for notifications for each user account in your PRTG installation.
- Step 3: Create notifications, specifying the type of notification and its content.
- Step 4: Define thresholds that change a sensor's status (this is not necessary for every kind of notification).
- Step 5: Add suitable triggers to objects that trigger notifications if something is going wrong in your network.
- Step 6: Test if the created notification is triggered and delivered correctly.
When you set up your own notifications, you do not necessarily need to go through all the steps we describe here. In this section, our main goal is to give you a general idea of the notifications concept.
Before creating your actual notifications, you first have to define how the notifications are delivered to your email account, mobile phone, or pager. To do so, select Setup | System Administration | Notification Delivery from the main menu bar. Specify the mechanism of SMTP delivery, sender email and name, as well as the HELO ident. For SMS delivery, select your service provider and provide the corresponding credentials.
You can find details about notification delivery in section System Administration—Notification Delivery.
This only applies to PRTG on premises instances, not to PRTG hosted by Paessler.
Create notification contacts to define where you want to receive notifications. Recipients can be email addresses, phone numbers (PRTG on premises only), or push devices (Android or iOS devices with the corresponding PRTG mobile app). You can define as many recipients as you want for each user account in your PRTG installation. By default, the recipient Primary Email Address is available—this is the email address you provide in your account settings. This is sufficient for a first notifications setup. Later on, when you see how they work, you can define more contacts. When you add a notification to a device, you just have to select a user or user group as recipient and PRTG uses the according contacts you define here.
For details, see section Account Settings—Notification Contacts.
To get an informative message when a disk is running out of capacity, create a corresponding notification. Select Setup | Account Settings | Notification Templates from the main menu bar, hover over and click Add Notification Template from the menu. Give the notification an explanatory name; in this case you could use Disk Free Limit Notification. However, if you want to trigger this notification on a global level (for example, for a probe or group) so that it would not only apply to breached disk free limits, a general name would be more suitable (like the predefined notification Email to Admin). If you leave the default text of the newly created notification, it already contains all necessary information, for example:
- which sensor is affected
- since when the sensor is affected
- last value of this sensor
See section More for the other options you have here.
After providing this information, select the delivery method. In this case, we select Send Email for this notification by marking the corresponding check box. Specify who receives the notification (select a specific user, for example, and PRTG sends the notification to all of this user's contacts that you specified in step 2), its subject, the format, and its priority. By default, the email notification contains several information parameters about the evoking sensor: its name, status, time, message, location in the device tree, etc.
You can choose any other notification method, of course. For more information, see section Account Settings—Notification Templates.
Once you set up the notification completely, click Create. PRTG opens the notifications overview page again. You can now use this notification for every trigger on every object in your device tree.
Before creating triggers that evoke notifications, first specify the limits that you want to apply to your disks. For example, if you want to get a notification when a disk has exceeded 80% of its capacity, force the sensor into a Warning status at this utilization. You have several options to set limits for disk free sensors:
- Set limits checked against all disks in the settings of multi-drive sensors: WMI Free Disk Space, SNMP Linux Disk Free, SSH Disk Free
- Enable limits in Sensor Channel Settings of single sensors.
You can do both with Multi-Edit.
You can set limits for sensors that monitor multiple disks directly via the sensor's Settings tab. Multi-Edit for existing sensors is also possible. Open the settings of the selected sensors and go to section Set limits checked for ALL disks. There, enable Percentage Limit Check. In the field Lower Warning Limit, enter the percentage that suits your needs. In our example, this is 20. Alternatively, you can use bytes to define a limit. However, we recommend that you use percentage values for more flexibility. This limit applies to all channels of this sensor that represent disks.
This sensor setting is only available for multi-drive sensors. You can omit step 4.1 for all sensors that are not of the type disk free.
To set specific limits for single disks, use the sensor's Channel settings. You can open channel settings via the gear icon below the respective channel gauge or in the channels table. Enable Limits at the bottom of the channel settings dialog and specify your desired limits in the Lower Warning Limit field. This limit only applies to the respective channel.
If you define channel limits when using the sensor's limit setting in the sensor's Settings tab at the same time, the first limit that applies is considered. This way, you can individually define harder limits for single disks in a multi-disk sensor. All defined limits are valid side by side.
You have to take the approach via channel settings for sensors that monitor only one (logical) disk, for example, the SNMP Disk Free sensor. For these sensors, you can use Multi-Edit if you want to automatically apply the same limits to each of these sensors.
- To see all sensors of this type at a glance, just filter for the type: From the main menu bar, select Sensors | By Type | SNMP Disk Free.
- Mark the check boxes of the sensors that you want to add a limit to.
- Click the wrench symbol in the menu.
- Open the Channel Settings tab.
- Select the channel that you want to add a limit to; in this case, it would most likely be the channel Free Space.
- Then Enable Limits and enter the number in the correct field as described above.
When you are done, save these settings—the new limit applies to all channels with this name of the multi-edited sensors.
You specified limits to define when a sensor goes into a Warning (or Error) status. Now you can create the according notification triggers. The notification trigger we use in this example is the State Trigger.
For details about other possible notification triggers, see section More.
- You can set up a State Trigger at any level in your device tree. For example, open a group containing the devices that represent your disks.
- Open the Notification Triggers tab.
- Hover over and select a notification trigger from the menu.
- Set the notification trigger to When sensor state is Warning and choose the notification template you created before (Disk Free Limit Notification or a more general one) from the dropdown list.
- Adjust the other notification trigger settings to your needs and save the notification trigger.
Now you immediately receive a notification when the capacity of one of your disks falls below the defined limit, in this case 20% free disk space.
Finally, test the notification that you created. You can immediately trigger this notification for test purposes:
- From the main menu bar, select Setup | Account Settings | Notification Templates.
- For the respective notification template, click the Edit button and then Send test notification.
Then, check if the notification was triggered and delivered correctly depending on the delivery method you defined before. If you do not get a notification (or a defined action is not executed) at all, check the notification logs: From the main menu bar, select Logs | System Events | Notifications. Look for the triggered notification in the table list (verifying that the notification delivery is set up correctly in general) and consider the corresponding message.
See section Logs for more information.
This section provides information about additional options you have when working with notifications.
You can create schedules to activate notifications only at specific times, for example only on weekdays. In section Notification Summarization, you can choose from various options to avoid message floods. Furthermore, define which user groups have access to edit this notification.
For details about notification settings, see section Account Settings—Notification Templates.
Content of Emails
You can individually adjust the subject and add custom content to emails.
For more information, see section Account Settings—Notification Templates.
An alternative to the state trigger is to add a Threshold Trigger; then you do not need to set up limits explicitly, though this trigger type would only be suitable for disk free sensors when using the trigger for single sensors, one by one. Free disk sensors have free space in percent as primary channel by default, other sensors have primary channels with the units bytes or seconds. However, threshold triggers only apply to the primary or total channel. General notification triggering using thresholds might not work as expected for sensors of the "percentage" type.
For a list of all available triggers, see section Notifications.
Add a Threshold Trigger to a sensor directly
Select a sensor's Notification Triggers tab. Click Add Threshold Trigger, select the desired channel, and provide the condition when this notification is sent. In this example for free disk space, the setting would be When Free Bytes C: (%) channel is Below 20 for at least 60 seconds, perform Disk Free Limit Notification.
Notifications with Libraries
If your disk devices are spread over many groups, we recommend that you use a library for your disks. Select Libraries | All diskspace sensors from the main menu bar, go to the Notification Triggers tab, and add a state trigger as described above.
Not all disk free sensors might appear. You can add them to this library in the settings of the library node. There you can filter by type or tag and add missing sensors. You can also filter by priority and other sensor properties.
- Arrange Objects
- Clone Object
- Create Device Template
- Show Dependencies
- Geo Maps
Other Ajax Web Interface Sections