PRTG Manual: Setting up Notifications Based on Sensor Limits: Example
This documentation refers to the PRTG System Administrator user accessing the Ajax 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 exemplarily 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 sensor types.
You have to take several steps to set up notifications based on limits:
- Step 1: Provide necessary information about the delivery of notifications (SMTP and SMS).
- Step 2: Specify recipients for notifications for each user account of 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 evoke 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 those notifications are delivered to your email account, mobile phone, or pager. To do so, choose Setup | System Administration | Notification Delivery from the PRTG 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 receive notifications. Recipients can be email addresses, phone numbers (PRTG on premises only), or push devices (Android or iOS devices with the corresponding PRTG smartphone app). You can define as many recipients for each user account in your PRTG installation as you want. 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 setup of notifications. Later on, when you see how it works, 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 then 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. Choose Setup | Account Settings | Notifications from PRTG's main menu bar, hover over and select Add New Notification from the menu. Give the notification an explanatory name; in our 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) such 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 basic information, select the delivery method. In our case, we choose Send Email for this notification by marking the corresponding checkbox. Specify who will receive the notification (select a specific user, for example, and PRTG sends the notification to all contacts of this user 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 Account Settings—Notifications.
Once you set up the notification completely, click Save. 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 Channels Settings of single sensors.
- You can achieve both with Multi-Edit.
You can set limits for sensors monitoring multiple disks directly via the Settings tab on a sensor's details page. Multi-Edit for existing sensors is also possible. Open the settings of the selected sensor(s) and go to section Set limits checked against ALL disks. There, for example, enable Percentage Limit Check. In the field Lower Warning Limit, enter the percentage suitable to your needs. In our example, this would be 20. Alternatively, you can use bytes to define a limit. However, we recommend using 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 in 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 will be 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 sensor types that monitor only one (logical) disk, for example, the SNMP Disk Free Sensor. For these sensor types, you can use Multi-Edit if you want to apply the same limits for each of these sensors automatically.
- To see all sensors of this type at a glance, just filter for it: From PRTG's main menu bar, choose Sensors | By Type | SNMP Disk Free.
- Mark the checkboxes of the sensors you want to add a limit for.
- Click the wrench symbol in the menu.
- Open the Channel Settings tab.
- Select the channel you want to add a limit for; in this case it would be most likely the channel Free Space.
- Then Enable Limits at the bottom of the dialog 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 will go into a Warning (or Error) status. Now you can create the according triggers. The 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 on any level in your device tree. For example, open a group containing the device(s) representing your disks.
- Open the Notifications tab.
- Hover over and select a trigger from the menu.
- Set the trigger to "When sensor is Warning" and choose the notification you created before ("Disk Free Limit Notification" or a more general one) from the dropdown list.
- Adjust the other notification settings to your needs and save this new object trigger.
Now you receive a notification immediately 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 trigger this notification for test purposes immediately:
- From the main menu bar, choose Setup | Account Settings | Notifications.
- For the respective notification, 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, choose 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.
- Notification Settings:
You can create schedules to activate notifications only at specific times, for example, only on weekdays. In section Notification Summarization you can choose between various options to avoid message floodings. Furthermore, define which user groups will have access to edit this notification. For details about notification settings, refer to section Account Settings—Notifications.
- Content of Emails:
You can individually adjust the subject, header, and footer of emails to your needs. See section Account Settings—Notifications for details about editing the subject. The article How can I include my own logo into HTML emails? in the Knowledge Base explains how to edit the header and footer of emails: https://kb.paessler.com/en/topic/65782
- Other Triggers:
An alternative to the state trigger would be to add a Threshold Trigger; then you would 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 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 by threshold might not work as expected for sensors of the "percentage" type. You can find all available triggers in section Notifications.
- Add a Threshold Trigger to a sensor directly:
Go on a sensor's detail page and select the Notifications tab. Click on Add Threshold Trigger, select the desired channel, and provide the condition when this notification will be 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 PRTG library for your disks. Choose Libraries | All diskspace sensors from the main menu bar, go on the Notifications tab, and add a state trigger as described above.
Not all disk free sensor types 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 this way. 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