IBM SmartCloud Application Performance Management, Version 7.7.0.1

Defining the data source for widgets

You can assign one or multiple data sets in a group widget to define the data source for the widgets. You can define two types of data set in UI group widget definitions; simple and mashup.

Simple data sets
The simple data set fetches data from the IBM® Tivoli® Monitoring data provider directly. The following code is a standard format example of a simple data set definition:
{    
  “id”: “%DATASET_ID%”,
  “column”:[“%COLUMN_1%”,“%COLUMN_2%”,“%COLUMN_3%”, …],
  "scale":{"%COLUMN_1%":2,"%COLUMN_2%":3,"%COLUMN_3%":2,...}
  “query”:{
      “condition”:”%CONDITION%”,
      “sort”:”%SORT%”,
      “count”:%COUNT%,
       …
   }
}
  • id: Used to define the data set unique ID. Values must be the same as the attribute group ID in the object definition interchange (ODI) file of the specific IBM Tivoli Monitoring agent.
  • column: Used to define columns in a data set. Every column is an attribute in the attribute group of the ODI file for the specific IBM Tivoli Monitoring agent. The UI gets the data for these attributes from the IBM Tivoli Monitoring data provider and binds the data to the group widget. The value of the column must be identical to the *COLUMN field that is defined in the ODI file.
  • scale: Used to define the scale of columns in a data set. For example, the scale value of %COLUMN_1%, which is defined in the ODI file, is 2. The %COLUMN_1% attribute is scaled by two powers of 10. The value of the scale must be identical to the *SCALE property that is defined in the ODI file. The value must be identical unless the following conditions are all satisfied:
    1. The *TYPE property in the ODI file declares that the attribute is an integer.
    2. There is a *BEHAVE property in the ODI file with a value of GAUGE.
    3. There is a *RANGE property in the ODI file with a minimum value of 0 and a maximum value of n powers of 10 (n>=2). The value of the scale must be n.
  • query: Used to define filter conditions for getting data from the IBM Tivoli Monitoring data provider. There are three parts in a query:
    • count: When there are multiple rows in one data set, the count parameter specifies the request return data in the range 0 - “%COUNT%” rows of data. If count is not defined, the UI assigns a default value (1000).
    • sort: Sort the data set with this parameter. The format of the sort parameter is SORTED_COLUMN_ID for ascending sort, or -SORTED_COLUMN_ID for descending sort. You can use the count parameter to get the top number of rows in a data set.
    • condition: Filter the data set with this parameter. The condition parameter is a Boolean expression. The request returns rows that make the Boolean expression true. The format of the condition must follow the rule:
      condition_expression := ‘(’condition_expression‘)’
      condition_expression := condition_expression‘ 
      and ’condition_expression | condition_expression‘
      or ’condition_expression | ‘!’condition_expression |
      operand operator operand operand := COLUMN_ID | string | number | boolean operator := ‘>’ | ‘=’ | ‘<’ | ‘>=’ | ‘<=’ | ‘!=’
      Ensure that the condition expression contains parentheses when the condition expression is not a single condition, as in the following example:
      "condition": "(INDOUBT=1)"
      "condition": "(CHLTYPE=8 or CHLTYPE=9)"
      "condition": "CHTYPE=254"
Mashup data sets
A mashup data set is calculated from an existing data set, which can include mashup data sets and simple data sets. The following code is a standard format example of a mashup data set definition:
{    
     “id”: “%MASHUP_DATASET_ID%”,
     “type”:”MASHUP”,
     “column”:[“%COLUMN_1%”,“%COLUMN_2%”,“%COLUMN_3%”, …],
     “atom”:[{
           “colname”:”%COLUMN_1%”,
           “formula”:”%SIMPLE_DATASET_ID%.%SIMPLE_COLUMN_n%”
          },{
           “colname”:”%COLUMN_2%”,
           “formula”:”%SIMPLE_DATASET_ID%.%SIMPLE_COLUMN_m%”
          }
          …
          ]
     “formula”:[{
           “colname”:”%COLUMN_x%”,
           “formula”:”%FORMULA%”},
             …
     ]
}
The key items in mashup data set definitions are columns, atoms, and formulas:
  • column: The column parameter defines the returned columns of this data set. It is a universal set of atom columns and formula columns.
  • atom: The atom parameter defines the columns that are not defined in the formula. These columns are returned from the source data set along with the filter or sort conditions in the formula.
  • formula: The formula parameter defines one or more formulas. Each formula returns one column after a series of calculations according to the formula parameter. Each formula is an array and each item in the array defines one complete formula:
    • colname: The column that is returned by formula calculations has a column name.
    • formula: The formula parameter is an expression that returns one column that is calculated from one or more columns. The following table lists the supported formula in UI with examples:
      Table 1. Formula
      Formula Expression Description
      + - * / ( )
      Expr := Expr '+' Expr
      Expr := Expr '-' Expr
      Expr := Expr '*' Expr
      Expr := Expr '/' Expr
      Expr := '(' Expr ')'
      Support the plus sign (+), the minus sign (-), asterisk (*), forward slash (/) and parentheses ( ) to change computation priority in a single data set or constant.


Feedback