IBM Support

ITM Nuggets: SPUFI Use Case 2: Retrieve LIVE information on which situations are started, stopped, deleted, etc CLI

Technical Blog Post


Abstract

ITM Nuggets: SPUFI Use Case 2: Retrieve LIVE information on which situations are started, stopped, deleted, etc CLI

Body

 

 

image

 

On the third installment of the SPUFI series, we look at our second "use case". This blog will show you how to extract key information via the

command line from your TEMS relating to which situations are started, stopped, deleted or in error in you ITM infrastructure.  This is a very

powerful way to obtain great information from your TEMS outside the GUI.

 

If you missed part one on how to use the tool here is a quick link: ---> Link to blog one in the SPUFI series

 

Overall Goal

The goal is to be able to pull information on which situations are started and stopped in your environment, from across the entire monitoring
infrastructure, straight from the HUB TEMS itself.  There are many reasons why you would use this method, here are a few:
 
  • You can use this method to sanity check which situations are active/evaluating and therefore you can get events from.
  • You can check how many situations you have running on each HUB and RTEMS from a loading point of view.
  • You can see if you have situations running on RTEMS that have no agents of that type connecting to them, or the reverse. You have agents    connected to an RTEMS but situations that should be running have not be started there.
Generally the less load on the HUB the better. You may wish to consider moving agents connected to the HUB to RTEMS to help reduce load and 
remove the HUB from distribution of some situations.

 

You can use this method in combination with use case one in the blog series to check which situations have started and then which situations have events
raised, acknowledged, closed, etc (this can be completed all with one SQL statement)
 

 

Understanding the process

 
Today we will be using the KDSTSNS tool with some SQL to query the situation status table on the HUB TEMS, specifically the ISITSTSH table.
As in the first blog of the series explained how to query the TEMS, the below information explains how to interpret the output of the SQL, so you can                       utilise the information for you own means. I will start by breaking down what each column means in the table we are querying and they go through a
basic example of how the TEMS processes the start/stop records. This will give you the basics to go away and try it for yourself!
 
Each of the rows in the below table represents is a column in the ISITSTSH table on the TEMS and its meaning. You will need to query this table
on the TEMS using SQL provided to retrieve the required data.

 

Name of Column

Information held in that column

DELTASTAT

Delta stat is a single letter that represents the status of that row (full table below)

GBLTMSTMP

Time that the record was written

NODE

This will be an endpoint name associated with that record

ORIGINNODE

Name of the TEMS the agent directly reports  to (also known as throughnode)

SITNAME

Situation name that created the event

FULLNAME

Situation full name if it has been given one (6.21 and beyond)

 

The key to understanding the output is again the "Deltastat" column, it will have a single letter in it and this shows you the status of that situation.

 

DELTASTAT Column Value

Meaning of the letter

S - Situation Started

The situation with the name on the same line has been started 

P - Situation Stopped

The situation with the name on the same line has been stopped

D - Situation Deleted

The situation with the name on the same line has been deleted 

X Error

The situation with the name on the same line has an error

 

 

Now you know how to read the data, you need to understand the processing of the TEMS. Any action performed with a situation will insert a corresponding row to the TEMS ISITSTSH table.

Example scenario:
1)       You start a situation on the HUB TEMS. A "S" record appears in the DELTASTAT column to show the situation has started.
2)       You then stop a situation on the HUB TEMS. A "P" record appears in the DELTASTAT column to show the situation has stopped.
3)       You then notice an "X" record appears in the DELTASTAT column. This shows there has been an error with this situation (maybe it
           cannot start)
4)       You then decide to delete that situation as it had an issue whilst you investigate the cause. A "D" record appears in the DELTASTAT
column to show the situation has been deleted.
From the output below, you can see an example of each of the above Deltastat types:

 

image

 

How to retrieve the key information

For the method of how to retrieve the data and where to put the files. This was covered in post one in the series:   Link - Blog 1 

 

You will need to execute this SQL:

 

SELECT DELTASTAT,                                                       
GBLTMSTMP,                                                              
NODE,                                                                   
ORIGINNODE,                                                             
SITNAME,                                                                
FULLNAME                                                                
FROM O4SRV.ISITSTSH
WHERE DELTASTAT = 'S';
 

Note: Replace the 'S' with any delta stat letter you wish to pull information on. The example above will show you all situations that are started as its an 'S'

in the WHERE clause.

 

 

Result

Here is an example output from my test system:

 

I have pulled multiple criteria on this SQL call. This shows all the started and stopped situations in my environment. ('S' and 'P')

 

SELECT DELTASTAT,                                                       
GBLTMSTMP,                                                              
NODE,                                                                   
ORIGINNODE,                                                             
SITNAME,                                                                
FULLNAME                                                                
FROM O4SRV.ISITSTSH 
WHERE DELTASTAT = 'S' OR DELTASTAT = 'P';
 

image

 

 

What next?

 

You now have the methodology and the SQL to get the data you need. You could perform health check, test events, etc.  You could also open up the                         resulting file in a spreadsheet editor. A quick text to columns and you can filter away on a single TEMS, situation, DELTASTAT type to really refine masses                                   of information down to concise quality checks.
 
Hope this has been of use to you. If you have any questions or you would like me to build a test case to find a specific piece of information, please post                      below and I will respond to you.

 

 

 

 



 

 

 

 

 

 

 

 

image

 

Check out all our other posts and updates:

Academy Blogs:                   
 http://ibm.co/1sPj9E8  
Academy Videos:                  http://bit.ly/1wFKveY
Academy Google+:               http://bit.ly/1sR5QTV
Academy Twitter Handle:     http://bit.ly/1CknfoF    

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm11082697