I want to create PRTG libraries to get my own, individual views of the device tree in PRTG. Do you have any tips and tricks on how to use libraries? Is there a best practice to help me getting the most out of the libraries feature?
This article applies to PRTG Network Monitor 17.x.34 or later
Best Practice for PRTG Libraries
Libraries in PRTG give you the opportunity to create a personalized device tree structure. How you structure it is completely up to you, but you can use the following filter to make it easier for you:
- Sensor type, for example, Ping
- Sensor status, for example, down
- Sensor tag, for example, pingsensor
- Sensor priority, rated from 1 to 5
Once you created a library that selects sensors by a certain criterion, this library will automatically add new sensors that match the filter, which makes it very dynamic. Of course, it is also possible to add sensors by hand to a library, but a manually added node can only contain one sensor. Overall, a library node can contain of up to 1,000 sensors.
The library feature of PRTG does not only let you create a device view, but it is especially useful if you want to set the same notification type for a group of sensors.
Adding Sensors via the Management Tab (enlarge)
Libraries that are created through filtering for a certain criterion work especially well for state triggers!
For example, you want to receive a notification if any sensor is down for longer than 60 seconds.
- Create a library based on Filter by Status: Down.
- Set a notification on your library by navigating to the Notifications tab
- Set a state trigger for the status down and the time of 60 seconds and choose how you want to be notified, for example, by email.
There are some functional limitations to the filtering within the library. It is difficult to find a common threshold for different sensor types, therefore it does not make sense to mix them, unless you only want to be alarmed when their state changes, like shown in the above example.
Creating a Notification with a State Trigger (enlarge)
Libraries and Maps
You cannot only use libraries to simplify the creation of notifications, but you can also integrate them in maps, using custom map objects. This might be useful because the library represents the device tree structure as it is required by you. Here is an example for a library that could be turned into a map:
You could create a library based on the priority of a sensor and a status. So, for example, the library would only contain sensors that have a 5-star priority (mission-critical) and where the status is down.
To integrate libraries into maps you need to create a custom map object. See this article, for example, for details about what content needs to be included in the custom map object.
Library based on Priority (enlarge)
Libraries Simplify Your Day
Libraries can help you to simplify your day: If you are a storage admin, for example, you could create a library with all the relevant sensors for you, set up alerts for this library, and be up to date on all storage relevant issues without having to look through the whole device tree.
Another use case where libraries can simplify your day, is if you are an MSP. When creating templates for devices, you can add corresponding tags for your Service Level Agreements (SLA).
Let’s say you have three different levels, bronze, silver and gold, where gold SLAs have the highest priority. Now you create a template of your most common devices for each service level. Once you get a new customer, you run an auto-discovery with the templates for their SLA, for example, gold. If you have added an "SLA-gold" tag to your template, each new device will automatically be added to a library with the corresponding tags. Because of this, you won’t have to set the notifications manually, because you already have set the them for the library.
Concluding, libraries are useful if you are monitoring a lot of similar sensors, like, for example, HTTP sensors for websites or CPU sensors, on different probes and want to view them all together, or if you are managing a large installation and want to create more detailed views for some users.