Submit a ticketCall us

Solarwinds & Cisco Live! Barcelona
Join us from the 29th of January to the 2nd of February at Cisco Live 2018 in Barcelona, where we will continue to show how monitoring the network with SolarWinds will keep you ahead of the game. At our booth (WEP 1A), we will demonstrate how SolarWinds network solutions can help. As a bonus, we are also hosting a pre-event webinar - Blame the Network, Hybrid IT Edition with our SolarWinds Head Geek™, Patrick Hubbard on January 24th - GMT (UTC+0): 10:00 a.m. to 11:00 a.m. There's still time to RSVP.

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: 429 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

Tags

Classifications

Public