IBM Support

How to easily pull a list of situations and their details from ITM

Question & Answer


Question

How to easily pull a list of situations and their details from ITM for administrative and tuning purposes?

Cause

The need to list running thresholds and constraints plus their actions in order to optimize environments in an easily readable format without going through the hardship of drilling down through an XML of large proportions.

Answer

There are multiple ways of doing this but in this post I will describe two of them.
1. More TEMS intensive.
You could create a new view, preferably a table view that can use one of the TEMS Situation definitions query, this should produce a view with the situations and then you can export it to CSV by right clicking the table and selecting export.
2. You can use the tacmd commands in a short script to push the situations and their details in a file.
This is just an example, you can use this as a base and work from here but do please note there is no support for the below script.
#!/bin/bash
################################
####
#There is no support for this script, use as an example#
./tacmd login -s localhost -u <user> -p <password>
sleep 3
./tacmd listsit | awk '{print $1}' > /tmp/listsit.txt  #list situation names to be used in tacmd
sleep 3
input="/tmp/listsit.txt"    # loop through each of the names to get the details from tacmd.
while IFS= read -r line
do
./tacmd viewsit -s $line >> /tmp/fullsituationlist.txt        # print situations to file
sleep 1
done < "$input"
After the script exits there should be a file named /tmp/fullsituationlist.txt that contains all the situations and their details.
NOTE: Edit the details in script ./tacmd login -s localhost -u <user> -p <password>  eg: sysadmin ilovit

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSTFXA","label":"Tivoli Monitoring"},"Component":"TEMS","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
11 November 2019

UID

ibm11105533