Submit a ticketCall us

WebinarDatabase Roundtable – Expert Database Professionals Feel Your Pain

In this video broadcast, Head Geek™ Tom LaRock is joined by Karen Lopez, Tim Chapman, and David Klee. They’ve known each other for many years, so this discussion was like four friends getting together to talk data and databases. They discussed diagnostic data collection, common performance root causes, reactive tuning versus proactive, and more. Join us for an engaging discussion on these topics! Plus, Tom LaRock will be available to answer your questions live.

Register now.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Display values from multi-value statistics monitors in SAM alerts

Display values from multi-value statistics monitors in SAM alerts

Updated August 18, 2018

Overview

Many of the SAM custom script monitors allow multiple statistics to be returned from a single iteration of the script.  This article describes how to alert on the values that are returned.

Environment

  • SAM, all versions

Steps

Use the following information to build the component monitor. (Note: SolarWinds does not provide support for building these scripts.) In the following example, we have a single windows PowerShell component monitor that returns 4 statistics. The unique identifiers are LastResult, PPS, CPU and Memory (from the component definition). Notice that the labels are listed in alphabetical order.

 

multi-statisticchart.png

Alert Condition

In this particular alert, we want to alert if output #4, Memory, is greater than 600,000,000 bytes:

 

  1. The "I want to alert on" must be Component.
  2. Under Condition: Drop down "Select field ..."
  3. Select "Browse all Fields..." and a popup window to Select Field/Event opens.
  4. (Optional) Add a condition to look for the component name that contains these statistics. This is useful so that if you have to find these labels later, it will be easier to locate the component at a later date.
    1. Search for "Name".
    2. Select the Database column name of "Component Name".
    3. As the value, enter the name of the component. (Ensure the correctness of the value by using the type-ahead buffer.)
    4. Click the + sign to Add Single Value Comparison.
    5. Drop down "Select field ..."
    6. Select "Browse all Fields..." and a popup window to Select Field/Event opens.
  5. On the left, click Multiple Statistic Data. The possible variables for Multiple Statistic Data are shown.variablepopup.png

  6. Click on Statistic Data Label or Statistic Data Name, whichever is appropriate, to identify which statistic will be used in the condition. Refer to the component definition if you are unsure of which to use. Select the database column and press on the Select box at the bottom of the popup.

    statisticdatalabel.png

  7. In the value field, enter the name of the statistic. (Hint: If the name does not show up in the type-ahead buffer, you have probably chosen an incorrect name or variable.)
  8. Click the + sign to Add Single Value Comparison.
  9. Drop down "Select field ...". ; Select "Browse all fields..."
  10. Choose either Statistic Data (numeric) or Statistic Data Message and finish out the alert condition. In this example, we want to alert on whether memory exceeds 500000000.

    triggercondition.png

  11. Complete the trigger condition.

Alert Actions

In the Alert Action, one typically would like to display the values returned by the script. Unfortunately, most of the variables are geared toward only displaying one of the output values: the first one in alphabetical order.

 

The easier way is just to display all of the data labels and their values as showing in the following example:

 

simulateemail.png

 

To get these variables:

 

  1. Go to the place in the object that you would like to place these variables, and then press INSERT VARIABLE. A popup box for Variables to Insert opens.
  2. Click the dropdown for "Show variables for" and choose Component.
  3. Click the dropdown for "Group by" and choose Variable Category.
  4. Scroll through the categories and click Multiple Statistic Data. Note that the variables listed only return the values for the first output variable.

    multistatisticcategory.png

  5. To get a list of all variables that will show all the output labels and their values, do a search for the string multi.

    searchmulti.png

     

    Hint: To see the output preview for the correct component, ensure "Show Variables For" drop down is Component, then at the bottom of the display, press Change to choose the component that you would like to use for the Output preview.

    outputpreview.png

     

    Hint: If you want to see the variable specification for a selected variable (what will be used in the object that you are creating), look at the bottom:

     

    variablename.png

     

    Here is what the email looks like for output above:

    emailwithvariables.png

  6. After the action is completed, simulate the action to see if you have chosen the correct variables for your message.

 

 

 

Last modified

Tags

Classifications

Public