Tuesday, August 20, 2013

Listing AttributeGroups, Creating historical collections on Attributes supported by an agent. ( histcoll.sh)

key:
 tacmd tepslogin -s localhost

 tacmd histlistattributegroups -t pa  // for the Performance Agent.

 tacmd histlistattributegroups -t p3  // For the domain support of the OS Agent.
( p4 = Oracle, p6 = systemP, pu = VMware , p0 = DB2 ... and so on )

 tacmd histlistattributegroups -t lz  // for the Linux OS Agent

$ITMHOME/bin/tacmd histcreatecollection -a IVT_LIN_CPU -t "Linux" -e IVT_LIN_CPU -o "Linux CPU"   -c $COLINT -i $WHINT



How to get the list of all attributes for a certain agent so that it can be configured.

Let's say you want to configure the historical collections for a certain agent in ITM. ( for example for  Linux OS Agent, or the PA Agent itself )

Here you would need the names of the attribute groups so that we can automate creation of the collection groups.

Below is an example of the Linux OS Agent historical collections on that was created using a script.



We can create them manually - by opening the ITM TEPS Historical Collection Configuration panel and entering them one by one as shown below.




Or by using a script and providing the object name with the -o flag.

$ITMHOME/bin/tacmd histcreatecollection -a IVT_LIN_CPU -t "Linux" -e IVT_LIN_CPU -o "Linux CPU"   -c $COLINT -i $WHINT
$ITMHOME/bin/tacmd histstartcollection -a IVT_LIN_CPU          -m *LINUX_SYSTEM

More can be obtained from this link.

http://pic.dhe.ibm.com/infocenter/tivihelp/v15r1/index.jsp?topic=%2Fcom.ibm.itm.doc_6.2.2fp2%2Fhistcreatecollection.htm



Below, I will show how to get the attributes for the Performance Agent, and add them using a script.

This is the TEPS GUI Historical Collections Configuration panel before the collection settings are added.
Note that the Performance Analyzer - does not have the "plus" sign before it.





Open a command prompt to the Linux server and go thru the steps below.



[root@nc9118041057 logs]# tacmd tepslogin -s localhost

 Username?  sysadmin

 Password?
 KUICTL001I Validating user credentials...

KUIC00007I: User sysadmin logged into server on https://localhost:15200.
[root@nc9118041057 logs]# tacmd histlistattributegroups -t pa
KUIHLA006I Validating user credentials...
Group Name                   Status
Generic 64 Arithmetic        Not Configured
Generic 64 LT Fcast          Not Configured
Generic 64 LT Status         Not Configured
Generic Arithmetic           Not Configured
Generic D64 Arithmetic       Not Configured
Generic D64 LT Fcast         Not Configured
Generic D64 LT Status        Not Configured
Generic D Arithmetic         Not Configured
Generic D LT Fcast           Not Configured
Generic D LT Status          Not Configured
Generic LT Fcast             Not Configured
Generic LT Status            Not Configured
KPA GENERIC D32 NLT FCAST    Not Configured
KPA GENERIC D32 NLT STATUS   Not Configured
KPA GENERIC D64 NLT FCAST    Not Configured
KPA GENERIC D64 NLT STATUS   Not Configured
KPA GENERIC I32 NLT FCAST    Not Configured
KPA GENERIC I32 NLT STATUS   Not Configured
KPA GENERIC I64 NLT FCAST    Not Configured
KPA GENERIC I64 NLT STATUS   Not Configured
KPA T MOSWOS AGENT           Not Configured
KPA T MOSWOS DB              Not Configured
KPA T MOSWOS SUB AGENT       Not Configured
KPA T MOSWOS TASK            Not Configured


--


Based on the collections name, I can now create a simple shell script to add these to the History collections as shown

#!/bin/bash

Note: the 2 attribute groups Generic Arithmetic and KPA T MOSWOS Agent being created with the
histcreate




#!/bin/bash

### CREATE AND START COLLECTION FOR ATTRIBUTE GROUPS BELONG TO  LINUX OS TYPE
ITMHOME=/opt/IBM/ITM
# Change default collection interval according to your needs
COLINT=1m
# Change default warehouse interval according to your needs
WHINT=15m

export PATH=$PATH:$ITMHOME/bin:.

# If you want to specify user and password apennd the following parameters after %COMPUTERNAME%:
# -u sysadmin -p password
tacmd tepslogin -s `hostname`

#  <= the PA is the domain code, it can be set to LZ or any other domain.

$ITMHOME/bin/tacmd histcreatecollection -a IVT_GEN_ARITH          -t "PA"   -e IVT_GEN_ARITH          -o "Generic Arithmetic" -c $COLINT -i $WHINT
$ITMHOME/bin/tacmd histcreatecollection -a IVT_KPA_T_MOSWOS_AGENT -t "PA"   -e IVT_KPA_T_MOSWOS_AGENT -o "KPA T MOSWOS AGENT" -c $COLINT -i $WHINT

#Generic D Arithmetic
#Generic D LT Fcast
#Generic D LT Status
#Generic LT Fcast
#Generic LT Status
#KPA T MOSWOS AGENT
#KPA T MOSWOS DB
#KPA T MOSWOS SUB AGENT
#KPA T MOSWOS TASK
$ITMHOME/bin/tacmd histstartcollection -a IVT_GEN_ARITH                   -m *AFT_PERF_ANALYZER_WHSE_AGENT
$ITMHOME/bin/tacmd histstartcollection -a IVT_KPA_T_MOSWOS_AGENT          -m *AFT_PERF_ANALYZER_WHSE_AGENT




This will create some tables in the Database.

































Post Operation - check the groups configured command line.
 
 tacmd histlistattributegroups -t pa

KUIHLA006I Validating user credentials...
Group Name                   Status
Generic 64 Arithmetic        Not Configured
Generic 64 LT Fcast          Not Configured
Generic 64 LT Status         Not Configured
Generic Arithmetic           Configured
Generic D64 Arithmetic       Not Configured
Generic D64 LT Fcast         Not Configured
Generic D64 LT Status        Not Configured
Generic D Arithmetic         Configured
Generic D LT Fcast           Configured
Generic D LT Status          Configured
Generic LT Fcast             Configured
Generic LT Status            Configured
KPA GENERIC D32 NLT FCAST    Not Configured
KPA GENERIC D32 NLT STATUS   Not Configured
KPA GENERIC D64 NLT FCAST    Not Configured
KPA GENERIC D64 NLT STATUS   Not Configured
KPA GENERIC I32 NLT FCAST    Not Configured
KPA GENERIC I32 NLT STATUS   Not Configured
KPA GENERIC I64 NLT FCAST    Not Configured
KPA GENERIC I64 NLT STATUS   Not Configured
KPA T MOSWOS AGENT           Configured
KPA T MOSWOS DB              Not Configured
KPA T MOSWOS SUB AGENT       Not Configured
KPA T MOSWOS TASK            Not Configured



No comments:

Post a Comment