TBSM, JazzSM and eDayTrader

Technically today.

The eDayTrader sample application for testing TBSM and JazzSM has been around, from even before JazzSM era, when we did want to demonstrate TBSM, TADDM and ITM/ITCAM capabilities all together. The eDayTrader application was deployed onto WAS and DB2, and thanks to TADDM you could discover its components, import to TBSM and then monitor with ITM. I remember such a TADDM class at least, long time ago, nevertheless, the eDayTrader J2EE application can give you quite a good sense of what BSM methodology might be about when it comes to service modeling.

Today you can download the eDayTrader sample code for TBSM and, without a need to have that application deployed onto your WAS, you can generate a service dependency tree in TBSM and run the predefined data fetchers to fetch the eDayTrader component service instances metric data from a sample DB2 table and present that data right on your JazzSM/DASH dashboards. This is very handful, first, what I find difficult for our users as such is – still, after years – it helps with understanding of how TBSM and BSM products (today it’s NOI – Netcool Operations Insight, TADDM, TBSM, JazzSM and OMNIbus/Monitoring) can be really used, means not only for monitoring applications but also for monitoring some business metrics. It helps to some extent of course, as the eDayTrader templates and fetchers are taken out of context, not sure if even any real, although surely based on some real J2EE application examples. But it is still a good exercise to play around it in TBSM. Secondly, the eDayTrader sample code is handy now, because it familiarizes the users with JazzSM/DASH, the first really new, post-TBSM custom canvas era dashboards editor. So I truly encourage all of the readers who haven’t had a chance to play around that exercise, to try, spend some time and see it. You can download the thing here, from developer works (you’ll need IBM ID to do that):

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=7d5ebce8-2dd8-449c-a58e-4676134e3eb8#fullpageWidgetId=Wea1cb2531f10_4ccd_99d7_6ab0334cb21f&file=b45d5b68-1dbd-4ecd-aa25-57c34f4d812f

The PDF describing what might be done with the contents in JazzSM after you deploy them to TBSM, is here:

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=7d5ebce8-2dd8-449c-a58e-4676134e3eb8#fullpageWidgetId=Wea1cb2531f10_4ccd_99d7_6ab0334cb21f&file=293578da-e095-46be-8f35-594f476400d7

 

I found few minor issues that might be crossed on some readers’ way to complete the exercise.

  1. The database setup on Windows. I do have one of my TBSMs on Windows and I did use that particular one for installation of eDayTrader contents. I perhaps did misread the instructions and did something wrong, but I believe that the case of the administrative user used might have been bit better documented. Namely, you’re supposed to install the eDayTrader database with an administrative user that will be used for accessing the database tables from withing the TBSM data fetchers. On Windows, the default administrative user is db2admin, and on Linux/Unix it is db2inst1. I passed db2admin everywhere but I executed the *.bat script in my administrative DB2 CLI windows, which is something that I open as my another user (I will not unveil its name here). So what happened – the tables were created fine, the schema was set fine, I could see the tables and data via SELECT statements fine, but I couldn’t do same selects in TBSM / Impact queries. The JDBC using db2admin user couldn’t see them. I did receive SQLCODE=-204, SQLSTATE=42704 in my data fetcher View Data dialog, means invalid schema in query. Almost went crazy about it, I found few useful commands to check what’s up with the schema and here I share it:

>db2 “select substr(GRANTEE,1,16),GRANTEETYPE,substr(tabschema || ‘.’ || tabname,1,64), CONTROLAUTH, ALTERAUTH, DELETEAUTH, INDEXAUTH, INSERTAUTH, REFAUTH, SELECTAUTH, UPDATEAUTH from syscat.TABAUTH where tabschema like ‘DAYTRADE'”

should give you something like:

1                GRANTEETYPE 3
CONTROLAUTH ALTERAUTH DELETEAUTH INDEXAUTH INSERTAUTH REFAUTH SELE
CTAUTH UPDATEAUTH
—————- ———– —————————————————
————- ———– ——— ———- ——— ———- ——- —-
—— ———-
DB2ADMIN         U           DAYTRADE.EDAYTRADERDATA
Y           G         G          G         G          G       G
G
DB2ADMIN         U           DAYTRADE.LOST_REVENUE_ALL
Y           G         G          G         G          G       G
G
DB2ADMIN         U           DAYTRADE.LOST_REVENUE_VIP
Y           G         G          G         G          G       G
G

3 record(s) selected.

so DB2ADMIN is the grantee. If you’ve got another user there, use its name in your TBSM JDBC connection setup, or, rerun the DayTrade database creation with this change to create_daytrade_schema.sql:

CONNECT TO DAYTRADE USER db2admin USING <yourpasswordhere>;

So in this case simply drop daytrade database (use FORCE APPLICATION ALL to release all connections if DB2 doesn’t allow you dropping it because of available connections) and rerun your installation script (Dashboards-Sample-Data_v1.1-Artifacts\Step2_TBSMConfiguration>daytrade_configuration.bat).

  1. I had a nasty issue with locked contents of Impact: service list and data source list. As part of the eDayTrader package installation you’ve got to install TBSM/Impact project and if you have any SVN locks on any Impact data like lists, that step will fail. When you run the second step of the installation process, you may see friendly messages like:

[exec] Please make sure no locks exist in “IMPACT_HOME\etc\<servername>_versioncontrol.locks”

which is ok, unless you see:

createImpactAccess:
[echo] Importing using nci_import
[exec] Please make sure no locks exist in “IMPACT_HOME\etc\<servername>_ver
sioncontrol.locks”
[exec] Check impactserver.log for more details
[exec] Final result – Failure : 1

Also, if you’ve got errors and exceptions like:

File etc/TBSM_datasourcelist is locked by user SYSTEM

you’re in trouble.

How to deal with it – not sure what eventually worked, I went to TBSM/Impact UI and unlocked all data sources and services. Then I found an SVN command to use:

C:\Program Files\IBM\tivoli\tbsm\platform\win\svn\bin>svn cleanup “C:\Program Files\IBM\tivoli\tbsm\etc”

but it didn’t help. At the end I went to version control locks file and removed all entries like:

#This file was written by server.
#Sat Feb 28 23:26:45 CET 2015
impact.locks.numlocks=1
impact.locks.1.user=defaultWIMFileBasedRealm/tipadmin
impact.locks.1.file=etc\\TBSM_EDayTraderData.ds

to:

#This file was written by server.
#Sat Feb 28 23:26:45 CET 2015

and nothing else.

It didn’t help either, so I restarted TBSM WAS profile and that did help. So probably the combination of the server restart and releasing the locks from the file or SVN command did work out.

 

So here we go. I did install the eDayTrader package from the DW site fine and can move on to playing around it more and show to my customers if necessary. Nice.

 

Leave a Reply