Wednesday, August 28, 2013

APM UI - Part 2 - Thresholds and Propagation

As a continuation of my previous post, we'll expand upon our GBS Supermarket Agent Builder data in the APM UI to incorporate thresholds and status propagation.

If you looked closely at the end of part 1, you'll notice that the "Resources" icon next to GBS Supermarket contained a grey question mark.


To resolve this with most APM UI widgets, you simply click on Resources, click on Edit at the upper-right, then click the gear icon on the widget you wish to adjust.


Next click on the [Thresholds] tab.


Unfortunately, our Thresholds tab is blank.  That's because we never defined thresholds within our custom JSON files.

Let's fix that and import a new version of the GBS Supermarket into APM UI.

Click the title or here to read more.



Expanding upon our summary.json from part 1, we will add a thresholds stanza for both the Customers Waiting and Average Wait Time metrics.  Note that the values we use for Normal, Warning and Critical thresholds are defaults and can be overridden within the APM UI.


Adding Thresholds to the JSON


summary.json  (changes in red)

{
    "title": "GBS Supermarket",
    "width": 320,
    "height": 280,
    "datasets": [
        {
            "id": "K71SUPERMA",
            "columns": [
                "LANENAME",
                "AVGPEOPLEW",
                "AVGWAITTIM"
            ]
        }
    ],
    "widgets": [
        {
            "class": "ibm.apm.widgets.GridWidget",
            "wid": "w1",
            "params": {
                "x": 0,
                "y": 0,
                "width": 320,
                "height": 280,
                "labelWidth": 80,
                "meta": [
                    {
                        "id": "K71SUPERMA.LANENAME",
                        "alias": "Lane Name",
                        "align": "left"
                    },
                    {
                        "id": "K71SUPERMA.AVGPEOPLEW",
                        "alias": "Customers Waiting (Avg)",
                        "align": "left",
                        "thresholds": [
                         {
                                "status": "Normal",
                                "start": 0,
                                "name": "Normal"
                         },
                         {
                                "status": "Warning",
                                "start": 10,
                                "name": "Warning"
                         },
                         {
                                "status": "Critical",
                                "start": 20,
                                "name": "Critical"
                         }

                        ]

                    },
                    {
                        "id": "K71SUPERMA.AVGWAITTIM",
                        "alias": "Average Wait Time (sec)",
                        "align": "left",
                        "thresholds": [
                         {
                                "status": "Normal",
                                "start": 0,
                                "name": "Normal"
                         },
                         {
                                "status": "Warning",
                                "start": 300,
                                "name": "Warning"
                         },
                         {
                                "status": "Critical",
                                "start": 400,
                                "name": "Critical"
                         }

                        ]


                    }
                ]
            }
        }
    ]
}


Loading custom JSON files (customBuilder[.sh|.bat])


Now let's load & update the new JSON files.  

# cd 
/opt/IBM/tivoli/tipv2/profiles/TIPProfile/installedApps/TIPCell/isc.ear/apmTIP.war/customCfg

# ./customBuilder.sh -i k71 -u tipadmin -p xxxxx -d /opt/IBM/APM/k71
Notice: id must start with "_" and it is prefixed automatically.
The ID [_k71] already exists.
To continue operation will update existing definition.
1. Update _k71
2. Quit and input a new ID
1
Please input a keyword to query datasources in itm.HTEMS140.172.16.17.143
To list all datasources, press the ENTER key:
GBS
1. GBS Supermarket
98. Input a new keyword
99. Quit
1
 Category Summary Total Added 0,Updated 1,Failed 0
 Datasource Summary Total Added 0,Updated 1,Failed 0
 GroupWidget Summary Total Added 0,Updated 2,Failed 0
 Page Summary Total Added 0,Updated 2,Failed 0
 Application Template Summary Total Added 0,Updated 1,Failed 0


Refresh the page and take a look at our GBS Supermarket widget.


Now you clearly see visual indicators of Normal, Warning, and Critical status based on numeric threshold.

However, if you go back to the main Application Overview page, you'll see that our Resources icon still has a grey question mark.



In order to reflect Normal/Warning/Critical status on the Application Overview, you must specify one or more thresholds to be propagated up.  

So if we repeat our steps of going into GBS Supermarket - Resource Dashboard, clicking Edit, then clicking the gear icon and the [Thresholds] tab.  This time we'll see our thresholds.


Notice that the Propagate check-marks are not checked.  If we check one or both of them, the status of each respective threshold will bubble up to the main dashboard.


Resulting in this.



Final Thoughts


Some notes about APM UI, thresholds and propagation.
  • This isn't TBSM (Tivoli Business Service Manager).  The status propagation within APM UI is both simple (easy to use) and simplistic (not many customization capabilities).  
    • The status propagation within APM UI is roughly equivalent of TBSM's "worst child".
    • For example, you have an application comprised of 4 WebSphere servers and 2 DB2 servers.  You only want the Resources icon to turn Warning if 2 out of 4 WebSpheres are in a Warning state.  This would be beyond the current capabilities of APM UI (but well within the abilities of TBSM).
  • These "thresholds" are purely for visualization, there are no hooks into alerting or notification (eg. Omnibus).  If you require alerts/notification, you'll need to jump over to ITM, create monitoring Situations which generate events, etc.  Also note, that those ITM situation events will show up under the Events icon.


No comments: