Network Management

How to round up percentage to whole numbers in a volume alert message in NPM

By default, the variable returning volume percent used returns five decimal places. To round the percent usage of a volume, use the variable in the newer format and add the % character.

First published date

5/25/2020 7:02 AM

Last published date

5/25/2020 7:02 AM

Overview

To round the value for the percentage of used space on a volume in an an alert action message (instead of displaying the value with five decimal spaces), change the variable in the alert action message.

Product section

Orion Platform

Resolution

  1. On the Orion Web Console, click Alerts&Activity > Alerts, and then click Manage Alerts in the upper right corner of the screen.
  2. Select the alert, click Edit Alert, and go to the Trigger Actions tab. See Define what happens when an alert is triggered in the Orion Platform.
  3. Click Edit the alert action and expand the Message section.
  4. Replace the variable for volume percent used ${VolumePercentUsed} with its newer format:  ${N=SwisEntity;M=VolumePercentUsed;F=Bytes} %
The percent information in the alert message will be rounded to whole numbers.