Submit a ticketCall us

Webinar: Web Help Desk for HR, Facilities and Accounting Departments
This webinar will focus on use cases for HR, Facilities and Accounting.

Having a unified ticketing and asset management system for all the departments in your company can provide end-users with a seamless experience and make things easier for your IT team. Yet, with different business tasks and objectives, many departments don’t fully understand the capabilities of Web Help Desk and how the software can be customized for effective use in their departments.
Register Now.

Home > Success Center > Network Performance Monitor (NPM) > NPM 12.2 Administrator Guide > Manage pollers using Device Studio > Formulas used for transforming Device Studio poller results

Formulas used for transforming Device Studio poller results

Created by Caroline Juszczak, last modified by Magdalena.Markova on Nov 10, 2016

Views: 57 Votes: 1 Revisions: 4
formula description
KiloToByte

Multiplies input by 1024

MegaToByte Multiplies input by 1024 x 1024
GigaToByte

Multiplies input by 1024 x 1024 x 1024

Average Returns the average of values from the input columns

Sum

Returns the sum of values from the input columns
Count Returns the total number of input columns
Condition Creates an if/then statement
Truncate Rounds the input decimal number up or down to an integer
Length Returns the number of characters in the input string
Replace Replaces the content in the string
IndexOf Returns the position in the string
SubString Defines the section of the string of interest

The formulas are divided into three main groups.

type of formula description
Transformations Transform data between different units. For example, transform megabytes to bytes.
Aggregations Transform the values from the input table columns to scalar values. For example, transform the values from the input columns into the average of values.
Conditions Transform values according to a logical formula according to the following syntax:
if(logical formula), (action to perform if formula is true), (action to perform if formula is false)

Example syntax

SubString

The SubString(,,) calculation takes the following syntax:
SubString ([formula],index start,length)

For example, if your input is "test", the output will be "es" if you use the following calculation:
SubString ([UsedMemoryFormula],1,2)

As another example, if your input is "test", the output will be "st" if you use the following calculation:
SubString ([UsedMemoryFormula1],2,2)

Replace

The Replace(,,) calculation takes the following syntax:
Replace([formula],search string,replacement string)

For example, if your input is "test", the output will be "resr" if you use the following calculation:
Replace([UsedMemoryFormula1],"t","r")

Use Regex formulas for transforming poller results

When you define a Regex formula, use the following syntax:
Regex([variable],"regular expression")

Examples of correct formulas include:

  • Regex([description],"^([a-zA-Z]*[^,])*")
  • Regex([description],"(V.[^,]*)")
  • Regex([description],"(T.*)")
  • Regex([description],"(C.[^ ]+)")

Limitations of Regex formulas

When you define a Regex formula, the input string from the test device is interpreted up until the nearest \r (new line) character.

The following methods of defining Regex formulas are not supported:

  • A backslash sequence for special characters such as the following: (,),{,},.
  • Grouping regular functions such as the following: \w, \W, \s, \S.
  • Defining multiple conditions in square brackets such as the following: [^ ,-].
 
Last modified
03:41, 10 Nov 2016

Tags

Classifications

Public