Submit a ticketCall us

AnnouncementsAre You “Flying Blind?”

When it comes to your complex IT infrastructure, you want to ensure you have a good grasp of what’s going on to avoid any fire drills that result from guesswork. Read our white paper to learn how proactively monitoring your IT environment can help your organization while giving you peace of mind.

Get your free white paper.

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


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.


  • SAM, all versions


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.



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.


  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.


  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:




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.


  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.



    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.



    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:




    Here is what the email looks like for output above:


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




Last modified