This tip was courtesy of Chet Luther one of our services team.
Normally when you create a threshold, you have to choose the upper and/or lower limits. Sometimes you want these limits to vary considerably for different devices. It can be a lot of work to create many copies of the same template just so you can define different threshold values. However, there is a better way to solve this problem!
For this example we’ll create a property-driven threshold for the standard FileSystem template. This will allow us to setup a single threshold on the FileSystem template in the /Server device class and use a custom property at the device or even device class level to control its behavior.
First Step: Create the custom property
- Go to /Devices
- Click on the menu and choose More -> Custom Schema
- Add a property:
- Label = Maximum file system utilization
- Name = cThreshMaxFileSystem
- Type = int
- Default = 90
- Visible = True
Second Step: Create the property-driven threshold
- Go to /Devices/Server
- Click on the Templates tab
- Click into the FileSystem template
- Delete the existing Free Space 90 Percent threshold
- Add a new threshold named nearly full:
- Select usedBlocks_usedBlocks from the data points
- Set the max value to:
(here.totalBlocks) * (here.cThreshMaxFileSystem / 100.0)
Now you can go to the custom properties/schema of any device class or device and set what the percentage at which your file system threshold will trigger just by overriding the cThreshMaxFileSystem property.