Here is an example SQL statement you can use in a query to pull real-time NT Logical Disk data from all of the agents that have been added to the "MYWIN" Managed System List:
SELECT ORIGINNODE,TIMESTAMP,INSTCNAME,PCUSED FROM KNT.WTLOGCLDSK AT ("HUB_ITMSERVER") WHERE SYSTEM.PARMA("NODELIST", "MYWIN",5 )
In this statement, "HUB_ITMSERVER" is the label (not the hostname) of the TEMS the agents are connected to, "MYWIN" is the MSL name, and the "5" is simply the length of the string "MYWIN".
To find other available table names, the easiest way is to look in the agent application support SQL files on the TEMS.
ITM Event Synchronization (aka SUF, Situation Update Forwarder, SitForwarder) with Omnibus is mainly straightforward, but there are a couple of things to look out for.
Setting the logLevel
The 3 available logging levels in C:\IBM\SitForwarder\etc\situpdate.conf are:
low med verbose
Where the Logfile is Created
The default log file is in the Omnibus log directory, HOWEVER, the tracing log file is in:
C:\tmp\itmsynch\logs
This is where you'll see more information if you increase the logging level - NOT in the default log.
What to Look for in the Log
If event updates are correctly being sent back to ITM (for example, when you acknowledge an ITM event from the AEL in Omnibus), the following is an example of what you should see in the log file (with logLevel=verbose):
2009.06.03 16:24:09.703-04:00 com.tivoli.candlenet.SituationUpdateForwarder formatEvent IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP Entry, parm 1 = op=a,sn=NT_Invalid_Logon_Attempt,sh=webappprod,sv=itmserver.gulfsoft.com:,et=,di=SYSTEM
2009.06.03 16:24:09.703-04:00 com.tivoli.candlenet.SituationUpdateForwarder formatEvent IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP Number of tokens is 6
2009.06.03 16:24:09.703-04:00 com.tivoli.candlenet.SituationUpdateForwarder formatEvent IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP Display item token is SYSTEM
2009.06.03 16:24:09.703-04:00 com.tivoli.candlenet.SituationUpdateForwarder formatEvent IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP SOAP string: sysadminxxxxxNT_Invalid_Logon_Attemptwebappprod
2009.06.03 16:24:09.703-04:00 com.tivoli.candlenet.SituationUpdateForwarder formatEvent IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP Exit, return value = sysadminxxxxxNT_Invalid_Logon_Attemptwebappprod
2009.06.03 16:24:09.703-04:00 com.tivoli.candlenet.SituationUpdateForwarder getServerUrlConnection IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP Entry, parm 1 = op=a,sn=NT_Invalid_Logon_Attempt,sh=webappprod,sv=itmserver.gulfsoft.com:,et=,di=SYSTEM
2009.06.03 16:24:09.703-04:00 com.tivoli.candlenet.SituationUpdateForwarder getServerUrlConnection IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP Default port 3661 is being used by Web Services.
2009.06.03 16:24:09.703-04:00 com.tivoli.candlenet.SituationUpdateForwarder sendEvent IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP Entry
Additionally, you should have no lines data in the C:\IBM\SitForwarder\persistence\situpdate_* file.
What it Looks like When Things are Wrong
In my case, I was acknowledging an event that was sent from ITM to Omnibus BEFORE I got the SUF configured, so the correct EIF Probe rules were not in place. These lines were in the persistence file:
Here's an example of the lines in the log file when I had this problem:
2009.06.03 16:22:49.376-04:00 com.tivoli.candlenet.SituationUpdateForwarder formatEvent IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP SOAP string: sysadminxxxxxNT_Invalid_Logon_Attemptwebappprod
2009.06.03 16:22:49.376-04:00 com.tivoli.candlenet.SituationUpdateForwarder pollCacheFile IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP Exception while processing cache file: null
2009.06.03 16:22:49.376-04:00 com.tivoli.candlenet.SituationUpdateForwarder pollCacheFile IBM Tivoli Monitoring TEC Synchronization netcoolserver.gulfsoft.com IP java.lang.NullPointerException at com.tivoli.candlenet.SituationUpdateForwarder.sendEvent(Unknown Source) at com.tivoli.candlenet.SituationUpdateForwarder.pollCacheFile(Unknown Source) at com.tivoli.candlenet.SituationUpdateForwarder.poll(Unknown Source) at com.tivoli.candlenet.SituationUpdateForwarder.main(Unknown Source) at com.tivoli.candlenet.W32Service$SUFRunnable.run(Unknown Source) at java.lang.Thread.run(Thread.java:568)
Notice that there are no lines stating that the event is being sent.
BIRT Report library is a place where you can store report elements such as Datasource information, datasets, parameters and styles and use them across multiple reports. When you change the information in the libraries, the changes are automatically reflected in the reports.
Why Libraries are so useful?
Say for example, you have about 10 reports using information from Tivoli data warehouse and suddenly the database password changes. Without the library, you will need to update the userid/password in the datasources defined in the 10 reports. Instead if you created the datasource at the library and shared it across the 10 reports, then you just need to update the userid/password in the library. Which one do you like?
How can I create and use libraries?
In BIRT, you can create a library using File->New->Library. Creating any report component in library is the same as creating them in a normal report design. To use the library, goto your report design file, goto library explorer and right click the newly created .rptlibrary file and select Use Library. This option will be available only if the library is not already in use (See the picture above).
Now, all the resoures created in the library are available for your report design. Just drag and drop necessary elements from library explorer to your data explorer.
How do I create a same look-and-feel for all my reports?
Create a master page in the library and share it across your reports. Also define styles in the library using your own custom theme and use the theme across your reports. To use the library master page in your reports, go to the XML Source for the report design. Look for the line containing something like the following.
Assuming your library master page is named GBSMasterPage and your library is named GBS, replace the above line with the following.
simple-master-page name="Simple MasterPage" id="2" extends="GBS.GBSMasterPage" Now, your report design uses the same look-and-feel defined in the library.
I hope this article gives you enough information to get started on the BIRT report libraries. If you have any questions, please feel free to post your comments.
I get a few people that I know asking about backup solutions for home, so I thought I would put document what I use and works well for me.
What I needed was a solution that would allow for the following: 1. backup multiple iterations 2. allow for centralized backup for multiple computers 3. simple to use (I am a simple person)
Now I know you all are going, "of course you went with a Tivoli product", but I downloaded the trial and was quite pleased with how it worked and did the tasks I needed it to do.
Here are some screen shots
This is the Start page for TCDP. I have meshed together the flyouts for the My Files, Local Storage and Remote Storage to show some more info.
The General Settings (Accessed from My Files flyout > Settings) allow for some configuration options such as where to backup locally, how many iterations and how much space to use.
In the Files to Protect settings, you can set the files/directories to include and exclude.
Email protection will allow for some various email programs for backup.
Remote Storage allows for TCDP to backup files to a remote storage device. In my case it is the DLINK NAS as listed above.
Advanced Settings allow further configuration to tune TCDP
As files are modified, TCDP will back them up locally and remotely (if available). Below is the Report feature that shows the image files I used for this blog being backed up. The popup in the screen occurs when you click on the Date/Time for the row that you want to see to provide more detail.
I really have not noticed any performance impact, but you also have to look at what is being backed up. I made sure to exclude any of the VMWare extensions and a few others that I know I do not want backed up. This is just like setting exclusions for Antivirus software :)
The restore is also quite simple and will allow for selection either from the local or remote source. When restoring, you have the option of restoring to the original location or to a new location. I would put screen shots for the restore steps, but this one is getting long enough already.
The backup and restore does work, and works well, I tested it out recently after someone had their drive crash with all their pictures. I wanted to make sure this worked!
Now the only issue I have with it is that there is not currently a linux client, which may or may not be a problem for you. It is not a big deal for me as anything linux I have does not really require a backup solution.
For the longest time, I have been visiting the IBM FTP site looking for patches that have recently become available. This is especially true when I am waiting for one to come out that I am expecting. If anyone else has done this, then you know how much fun that is. I am on the various emails that let you know when patches are released, but these seem to have no rhyme or reason on when they are run or what they report on. The best source seems to be the FTP site.
Recently I decided to do something I have been meaning to do for the longest time and that is write a simple script that would connect to the ftp site and find any recently released patches. In order to use this script there are a couple modifications that will need to be done. I have kept all the variables in the Initialize subroutine in order to make these modifications easier.
Variables: SMTP Server - This will need to be modified to supply any smtp server. $gMailDomain = "";
Sender address - Whatever the address you want the "From" field to use $gSenderAddr = "\@";
Recipient - Address to send the listing to $gToAddr = "\@";
Note: to send to multiple addresses, just comma delimit: $gToAddr = "name1\@domain.com, name2\@domain";
Also there is a variable to specify the number of days to look back for patch updates. Just set the global variable $gDayDiff to the number of days you want to look back for updates.
When the script is executed, it will create a file called updates.html (name can be modified by changing the global variable $gHtmlFile). This file is then used as input into the email.
This script does have a requirement for the Mail::Sender module. If you do not want to receive the emails, then comment out the following lines use Mail::Sender SendMail(); The entire SendMail subroutine
The last file states the encryption used, which tells you which ncw_*_crypt command to run (this stanza is directly above the ObjectServer hostname):
< !-- ! Login information to access the datasource specified in ! . ! - encrypted : If true, the password is encrypted (using nco_g_crypt) ! - algorithm (optional) : [AES|FIPS] ! If set to AES and encrypted attribute is set to true, ! the password is encrypted (using ncw_aes_crypt). ! If set to FIPS and encrypted attribute is set to true, ! the password is encrypted (using ncw_fips_crypt). !-->
At Pulse 2009 IV Blankenship gave a short session on Integration Impact with ITM via Web Services. I recorded the video and have posted it to youtube.com.
If you have been using the "tacmd createnode" to deploy agents in the past, you are in for a pleasant surprise in ITM 6.2.1! IBM added few welcome changes to the above command. These new features not only makes the deployment easier, they enable you keep track of agent deployment like you'd do in sophisticated products like ITCM. This article discusses the new features in detail.
Background Execution
If you invoke the tacmd createnode with the usual parameters (remote system name, user and password), it will NOT hang until the agent deployed as it was before. Instead, it will give you a transaction ID and return back control. Kinda similar to "winstsp" command in ITCM. Are you already seeing some ITCM like behavior? Wait there is more! To get the status of the deployment, use the new tacmd subcommand, "tacmd getdeploystatus". It lists all the distributions you have done so far and their status. A sample output is shown below.
Transaction ID : 12292212812729130001281138021
Command : INSTALL
Status : SUCCESS
Retries : 0
TEMS Name : VSITM621WIN
Target Hostname: 192.168.162.169
Platform : WINNT
Product : NT
Version : 062100000
Error Message : KDY2065I: The node creation operation was a success.
Batch Deployment
ITM 6.2.1 "tacmd createnode" supports batch deployment of agents. For example, you can create a deployment group named AppServers, add all appservers to that group and send deployment to them using single tacmd createnode command. There are new additions to subcommands viz. tacmd creategroup, tacmd addgroupmember and tacmd deletegroupmember to manage groups and its members.
Workspaces
To keep track of all your agent deployments, ITM 6.2.1 adds new workspaces to TEPS at the Enterprise level. The workspace provides a summary of all your deployments including number of agents Succeeded, Failed, Progress, etc, similar to MDist2 Console. There is also another workspace called "Deployment Status Summary By Transaction" providing status of deployments by Transaction ID. A sample Workspace view is shown below.
Remote Execution
One other subtle difference documented is that you can execute "tacmd createnode" from anywhere and you don't have to be logged on to TEMS server.
These feature additions are steps in the right direction for managing agent deployment and I hope you will find the features helpful.
I also had to do something similar in Windows, which turns out to be much simpler by using the VMWare Converter. Unfortunately this is not supported for Linux. The one thing that got me thinking though is that Windows can increase from a single drive and not have to use a separate drive. So why could I not do this in Linux?
The reason I needed to do this was for the new version of TPM (7.1). I originally had my VM set up with 20GB allocated, but the new version now requires approximately 50Gb to install, so the steps below are what I used to increase the LVM for my TPM install.
Here is my setup: VM Ware: VMWare Server 2.0.0 Host OS: Windows 2003 SE SP2 x64 Guest OS: Red Hat ES4 U5
Increase VM Disk Size Use the VMWare tool vmware-vdiskmanager.exe to increase the size
C:\Program Files (x86)\VMware\VMware Server>vmware-vdiskmanager.exe -x 50GB "f:\ VM_Images\VM TPM7.1 RH\rhes4srv01\Red Hat Enterprise Linux 4.vmdk" Disk expansion completed successfully.
Use fdisk to create new partition Even though the previous step reports that more disk was added, it still is not recognized by the OS.
Current file system: df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 19448516 1964128 16496436 11% / /dev/sda1 101086 13232 82635 14% /boot none 257208 0 257208 0% /dev/shm
1. Enter the FDISK utility fdisk /dev/sda
2. Print the existing partition table Command (m for help): p
Disk /dev/sda: 53.6 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2610 20860402+ 8e Linux LVM
3. Create new partition. This will be a Primary partition and is the 3rd partition. For the cylimder values, press enter to accept the defaults
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (2611-6527, default 2611): Using default value 2611 Last cylinder or +size or +sizeM or +sizeK (2611-6527, default 6527): Using default value 6527
4. Set the Partition type to Linux LVM (hex 8e) Command (m for help): t Partition number (1-4): 3 Hex code (type L to list codes): 8e Changed system type of partition 3 to 8e (Linux LVM)
5. Print the Partition table again to see the new partition Command (m for help): p
Disk /dev/sda: 53.6 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 2610 20860402+ 8e Linux LVM /dev/sda3 2611 6527 31463302+ 8e Linux LVM
6. Write the new partition information Command (m for help): w The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks.
7. Reboot
Create the Logical Volume Now that the partition is created, the physical and logical volume needs to be created
1. Create the Physical Volume - use the new partition information from the df command. In this case the new partition is /dev/sda3 pvcreate /dev/sda3 Physical volume "/dev/sda3" successfully created
2. Add the new Physical Volume to the Logical Volume vgextend VolGroup00 /dev/sda3 Volume group "VolGroup00" successfully extended
3. Extend the Logical Volume.
vgdisplay --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 2 Act PV 2 VG Size 49.88 GB PE Size 32.00 MB Total PE 1596 Alloc PE / Size 635 / 19.84 GB Free PE / Size 961 / 30.03 GB VG UUID bzOq45-o5yO-ruYY-Ffx1-DxCx-2e2j-ardXtu
lvextend -L +30.03G /dev/VolGroup00/LogVol00 Rounding up size to full physical extent 30.03 GB Extending logical volume LogVol00 to 48.88 GB Logical volume LogVol00 successfully resized
Note: The lvextend can either use the value of the Free PE from the vgdisplay command or the command lvextend -l +100%FREE /dev/VolGroup00/LogVol00. I found out about the %FREE after, so I did not test this.
4. Extend the filesystem The resize2fs does not work for this situation. The command ext2online will allow for the disk to be resized while disk is still mounted. ext2online /dev/VolGroup00/LogVol00
5. View the new file system df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 50444996 1972848 45911716 5% / /dev/sda1 101086 13232 82635 14% /boot none 1825828 0 1825828 0% /dev/shm
And there is a system with a nice large drive. Hope this helps you.
After checking out TPM 7.1 for a little while, I thought I would post some of my observations on this new version.
Downloads Get ready for another big download. To download the media for Windows, it was approximately 15GB. I also downloaded the Linux media, but really they do share a bunch between the various OS installs, so this was only another 5GB. The IBM document for downloading is located at http://www-01.ibm.com/support/docview.wss?uid=swg24020532
Installation For now, I have only done the Windows based install as I was more interested in the actual product usage rather than fighting with an install at this time. Little did I know that the install would be a bit of a fight.
I decided to go with the default install for now just to get it up and running. So I brought up my trusty Windows 2003 SP2 VM image and started to prep it for the installation. Since the disk requirements were more than I allocated to my C drive, I created a new drive and allocated 50GB for an E drive. I then extracted the images to the E drive and started installing. After a few pages of entering information, I started to get failures. After checking around and asking IBM support, it turns out the default install is only supported on one volume (this is in the documentation, but not really clear as I was installing everything on one “volume”, the E drive). So I had to increase the C drive space (thanks to VMware Converter) and start again. After that the install went fine. It took about 5 hours to complete.
Start Up Starting TPM is not much different than it was in the 5.x versions. There is a nice little icon to start and stop TPM. The only issue I had is that the TDS (Tivoli Directory Server) does not start automatically. This means that you cannot log in! You have to manually start the TDS service. I am sure that this has something to do with startup prereqs, but have not investigated right now.
New User Interface Because I have used TSRM (Tivoli Service Request Manager), the interface was not that foreign to me, but still way different than the 5.x interface. I find that it is not as fluid as the old interface but is way more powerful and flexible. With a proper layout, I am sure that it can be way easier to navigate than 5.x.
One thing that does bug me is that Internet Explorer is the only supported browser. I have been using Firefox and everything seems to work fine except for the reports (could be just my setup)
The new interface has tabs which are called Start Center Templates. These start Centers can be setup to provide shortcuts into the application that are specific to the function of the user. So if you have someone that is an inventory specialist, you can create a layout that will provide quick access to everything they need to perform their job rather than displaying what they do not need like workflows and security. A user/group can also be assigned multiple Start Center templates. This is useful for using existing templates created for various job functions and providing them to a user whose role spreads multiple areas.
Start Center - Default Provisioning Administrator
Discovery There is something new called a Discovery Wizard. These wizards can perform multiple functions for discovery rather than the one step discovery (RXA discovery or inventory). For example, one wizard is called Computer Discovery, Common Agent Installation and Inventory Discovery. This discovery does exactly what it says. The first step will be to discover the computer using the RXA discovery, then once that is completed, install the TCA on the discovered systems, and then do an inventory scan of the systems. Worked pretty nice. The only issue I had is that the default setting for the TCA is to enable the SDI-SAP. This means that in order to perform the inventory scan, the SDI environment needs to be configured first. Either that, or change the global variable TCA.Create.EO.SAP to false.
Computer General Information
Computer Hardware Information (CPU)
Computer Software Information
Reporting Reporting for 7.1 is WAY different than 5.x. TPM now uses BIRT to provide reporting instead of the DB2 Alphablox. Now there is good and bad with this new reporting method. The bad thing is that it is quite a bit more complex than the 5.x reports. The 5.x was pretty simple to use and create a report. The good thing is that BIRT is quite a bit more flexible and is being standardized across the various Tivoli products (Tivoli Common Reporting is BIRT with WebSphere) so the experience from one product can be shared across all.
Another note is that reports are no longer used for the dynamic groups. Dynamic groups use something called a query (I think I will follow-up on this in a future blog).
Sample Report – What Hardware is installed on what server
General Comments
The new version of TPM is looking very promising. The interface is very flexible/customizable, which is something that the old interface was not. The old interface did seem to flow a bit better by allowing the opening of new windows and tabs by right clicking on an object. This is not something that can be done in the new interface. The old one was specifically designed for the job it had to do, but really could not do much more, where the new interface will allow for the ability to expand beyond just TPM functions. This new interface is the same one shared by TSRM, TAMIT, TADDM and many other Maximo products.
Now we just need to see what will happen with the new version of TPMfSW (possibly named TDM or Tivoli Desktop Manager) to see what the full direction will be. One other thing that I know is on the list is the new TCA. This was something that I was hoping would be squeaked in (it was not promised for this release) but hopefully the 7.1.1 release will.
If you have any comments or questions, please fire them off and I will see what I can do to answer them.
This question keeps coming up in the TME10 list so I thought I would go through a couple methods that I have used. You can determine which one you want to use for your environment.
Note: This is mainly looking from a Windows endpoint perspective, but easy enough to apply to any OS.
Using wadminep By making use of the wadminep command, you can issue a sequence of commands to delete the lcf.dat file and restart the endpoint with new configuration settings. The two arguments to use are remove_file and reexec_lcfd. These can be wrapped in a script (sh, perl) and executed against one or many targets. This method is easiest to implement, but is probably slower as it processes on endpoint at a time.
The basic steps are wadminep remove_file lcf.dat wadminep reexec_lcfd -g "<gateway_name>+<gateway_port>"
You can either hard code the gateway name and port, or make these variables.
Using a software package It is possible to create a software package that can be distributed to the targets to perform the same basic functions of the wadminep commands. The good thing with the software distribution method is that you can hit more targets at the same time and also use the MDIST2 features to help with the distribution (result info, timeouts, bandwidth, etc).
The only issue with using a software package is that you cannot just run a script that stops and starts the endpoint. If you run a script that stops the endpoint, it will also stop the script from executing and it will result in either an interrupted or failed state. To work around this issue, the package will need to execute a script that will spawn a new script and release. Since the spawned script will execute right away, a delay is needed, which is where the sleep command comes in handy.
This package will consist of 2 batch files and the sleep command. The sleep command may need to be included as this is not available on all Windows systems.
Batch File 1 - start_mig_ep.bat This script will remove the old dat file from the endpoint and then spawn the restart_ep.bat script
===================================================================== @echo off
call "%SYSTEMROOT%\Tivoli\lcf\1\lcf_env.cmd"
REM Create backup directory in case the endpoitn needs to be moved back to the old TMR if not exist "%LCF_DATDIR%\mig_bak" mkdir "%LCF_DATDIR%\mig_bak"
REM move the LCF files if exist "%LCF_DATDIR%\lcf.dat" move /y "%LCF_DATDIR%\lcf.dat" "%LCF_DATDIR%\mig_bak\lcf.dat" if exist "%LCF_DATDIR%\lcfd.log" move /y "%LCF_DATDIR%\lcfd.log" "%LCF_DATDIR%\mig_bak\lcfd.log"
REM Delete the bak/bk files. In some newer versions of endpoint, these files are created del /f/q "%LCF_DATDIR%\*.bk" del /f/q "%LCF_DATDIR%\*.bak"
Batch File 2 - restart_ep.bat This file will use sleep to give some time for the endpoint to report that it is completed and then continue with the endpoint restart. When the endpoint is restarted, the gateway parameter will be passed with a gateway from the new TMR.
===================================================================== @echo off
echo setting sleep for 30 seconds > "$(target_dir)\restart_ep.log"
REM Stop the lcfd call net stop lcfd >> "$(target_dir)\restart_ep.log"
REM Start the lcfd call net start lcfd "/g$(gw_name)+9494" "/d3" >> "$(target_dir)\restart_ep.log" =====================================================================
Once the scripts are created, the software package can be created to send the files to the target and then execute the start_mig_ep.bat script. Some notes on the software package that will be required: 1. Variables will be required for the scripts - target_dir: used as the destination for where the files will be sent and the script executed from. I have set this to be a subdirectory of the Tivoli endpoint install location. This is done using the environment variable LCF_DATDIR (case sensitive if on UNIX). The value I used is $(LCF_DATDIR)\..\..\..\temp (if installed in C:\Tivoli\lcf\dat\1, this would be C:\Tivoli\temp)
- gw_name: used to define the gateway to be used in the distribution. This will allow for different distributions to be sent to different gateways. This could be the ip address, short name or FQDN.
2. Use of the substitute variables. Each of the scripts have the Tivoli variables in them. In order for the scripts to be updated, the Substitute Variables checkbox needs to be checked. This is in the advanced file properties for the files.
package name = migrate_ep title = "No title" version = 1.0 web_view_mode = hidden undoable = o committable = o history_reset = n save_default_variables = n creation_time = "2009-01-14 10:00:00" last_modification_time = "2009-01-14 10:00:00"
default_variables target_dir = $(LCF_DATDIR)\..\..\..\temp gw_name = gateway_name end
move_removing_host = y no_check_source_host = y lenient_distribution = y default_operation = install server_mode = all,force operation_mode = not_transactional post_notice = n before_as_uid = 0 skip_non_zero = n after_as_uid = 0 no_chk_on_rm = y versioning_type = swd package_type = refresh sharing_control = none stop_on_failure = y
add_directory stop_on_failure = y add = y replace_if_existing = y replace_if_newer = n remove_if_modified = n location = C:\CID\SRC name = migrate_ep translate = n destination = $(target_dir) descend_dirs = n remove_empty_dirs = y is_shared = n remove_extraneous = n substitute_variables = y unix_owner = root unix_user_id = 0 unix_group_id = 0 preserve_unix = n create_dirs = y remote = n compute_crc = n verify_crc = n delta_compressible = d temporary = n is_signature = n compression_method = deflated rename_if_locked = y
add_file replace_if_existing = y replace_if_newer = n remove_if_modified = n name = sleep.exe translate = n destination = sleep.exe remove_empty_dirs = y is_shared = n remove_extraneous = n substitute_variables = y unix_owner = root unix_user_id = 0 unix_group_id = 0 preserve_unix = n create_dirs = y remote = n compute_crc = n verify_crc = n delta_compressible = d temporary = n is_signature = n compression_method = deflated rename_if_locked = y end
add_file replace_if_existing = y replace_if_newer = n remove_if_modified = n name = restart_ep.bat translate = n destination = restart_ep.bat remove_empty_dirs = y is_shared = n remove_extraneous = n substitute_variables = y unix_owner = root unix_user_id = 0 unix_group_id = 0 preserve_unix = n create_dirs = y remote = n compute_crc = n verify_crc = n delta_compressible = d temporary = n is_signature = n compression_method = deflated rename_if_locked = y end
add_file replace_if_existing = y replace_if_newer = n remove_if_modified = n name = start_mig_ep.bat translate = n destination = start_mig_ep.bat remove_empty_dirs = y is_shared = n remove_extraneous = n substitute_variables = y unix_owner = root unix_user_id = 0 unix_group_id = 0 preserve_unix = n create_dirs = y remote = n compute_crc = n verify_crc = n delta_compressible = d temporary = n is_signature = n compression_method = deflated rename_if_locked = y end
end
execute_user_program caption = "Execute migrate batch file" transactional = n
during_install path = $(target_dir)\start_mig_ep.bat inhibit_parsing = n timeout = 300 unix_user_id = 0 unix_group_id = 0 user_input_required = n output_file = $(target_dir)\start_mig_ep_out.log error_file = $(target_dir)\start_mig_ep_err.log output_file_append = n error_file_append = n reporting_stdout_on_server = n reporting_stderr_on_server = n max_stdout_size = 10000 max_stderr_size = 10000 bootable = n retry = 1
ITM provides system uptime monitoring out-of-the box. You just have to select the uptime attribute and you can use the attribute in situation formula. It is that simple. Okay, what if you want to monitor the system downtime? It may sound like little difficult but with Universal Agent it is possible to guage this value with a simple MDL and script combination. This article explains how to do it. It also provides an example how to use some of the Time functions of UA.
How does it work?
To calculate downtime, we need to write a simple script that outputs the current date and time and the previous value of the date and time. We use the UA to get the capture these values. So, how do we get the previous value? UA provides this feature out-of-the box and it is documented! Just use the environment variable $PREV_VALUE in your script. Unfortunately this value is not persistent across UA restarts, so your script should store the last time it ran in a file somewhere. You can also use the UA functions to convert the script output to ITM timestamp. So after this, you will get Current Time, the previous time the script ran as attributes in the portal. You can write a simple situation that uses Time Delta function to calculate the difference between the two times and alert.
MDL
A Simple MDL listing is given below. It is given as an example only. Perform your own testing to ensure its working.
Here is a sample shell script that retrieves current and prev time stamp values.
#!/bin/sh
# Latest Timestamp
current_value=`date "+%m/%d/%Y %H:%M:%S"`
# If the PREV_VALUE exists, displays current and prev values,
# else retrieve PREV_VALUE from persistent file
if [ "x$PREV_VALUE" != 'x' ]
then
echo $current_value $PREV_VALUE
else
prev_value=`cat /tmp/downtime.txt`
echo $current_value $prev_value
fi
# finally, store the current timestamp in persistent file
echo $current_value > /tmp/downtime.txt
Drawbacks
Does this solution provide accurate downtime estimate? No, it doesn't. For example you may get potential false alerts if the UA goes down for some reason. Also, it provides the time difference between the script last ran and script's latest run not exactly the time between system reboots. But these are minor drawbacks to live with!
Questions, comments? Please feel free to post them.
Well it is finally available. The custom inventory scan is one of the features that existing Tivoli Configuration Manager (TCM) customers required in TPM before they could move to using TPM completely (yes there are still more, but this was pretty important)
A while back, I created a blog entry on creating custom inventory scans with TCM (see http://blog.gulfsoft.com/2008/03/custom-inv-scan.html) that I thought I would look at moving to TPM. This is a basic VBS script that will read in a registry key and record to the values to a MIF file. This MIF file is then imported into the DCM and can be used in a query from the Reports section of the TPM UI.
The steps involved are: 1. Define the requirements for the data to determine table columns 2. Create the table 3. Create the pre and post scripts to create the output file (can be MIF or XML) 4. Create the inventory extension properties file and import 5. Deploy the scripts to the target 6. Run the custom discovery created by the import in step 3 7. Run the custom report created by the import in step 3
Define Requirements For this sample, the requirements for the data to be inserted are the Registry Hive, Key(s) and Value.
Create the Table The table will be made up of the requirements defined above and columns to uniquely identify the computer and discovery id. Also the fix pack documentation recommends adding foreign keys for cascade deletes. For this example, I set the various fields to VARCHAR and defined a possible length for them. I also assigned it to the tablespace IBM8KSPACE, well, just because I felt like it ;)
Table Creation Syntax for DB2 create table db2admin.registrydata1(REG_PATH VARCHAR(256), REG_VALUE VARCHAR(32), REG_DATA VARCHAR(128)) in IBM8KSPACE; alter table db2admin.registrydata add column SERVER_ID BIGINT; alter table db2admin.registrydata add column DISCOVERY_ID BIGINT; alter table db2admin.registrydata add foreign key (SERVER_ID) references db2admin.SERVER(SERVER_ID) on DELETE CASCADE; alter table db2admin.registrydata add foreign key (DISCOVERY_ID) references db2admin.DISCOVERY(DISCOVERY_ID) on DELETE CASCADE;
Create the pre and post scripts One of the possible issues is around passing arguments to the scripts, but then again, this was not that easy in TCM. The examples in the FP docs do not talk about passing arguments in the extension properties file (discussed in the next step). From the limited testing I did, this does not seem possible.
The pre script will be used to generate the MIF file to be retrieved. One issue I have with the pre script is that it does not accept arguments. So this means that to execute the VBS script that I want to use, I have to create a wrapper BAT file to pass the arguments.
The post script does not really need to do anything. It could be as simple as just an exit 0.
postscript.windows.bat ============================================== echo Running post script ==============================================
regdata.windows.mif (sample output) ============================================== START COMPONENT NAME = "REGISTRY VALUE DATA" DESCRIPTION = "List registry value and data entries" START GROUP NAME = "REGISTRYDATA" ID = 1 CLASS = "DMTF|REGISTRYDATA|1.0" START ATTRIBUTE NAME = "REG_PATH" ID = 1 ACCESS = READ-ONLY TYPE = STRING(256) VALUE = "" END ATTRIBUTE START ATTRIBUTE NAME = "REG_VALUE" ID = 2 ACCESS = READ-ONLY TYPE = STRING(32) VALUE = "" END ATTRIBUTE START ATTRIBUTE NAME = "REG_DATA" ID = 3 ACCESS = READ-ONLY TYPE = STRING(128) VALUE = "" END ATTRIBUTE KEY = 1,2,3 END GROUP START TABLE NAME = "REGISTRYDATA" ID = 1 CLASS = "DMTF|REGISTRYDATA|1.0" {"Software\\Martin","test","test"} {"Software\\Martin","test1","test1"} END TABLE END COMPONENT ==============================================
Create the inventory extension properties file The extension file is used to define the table that is used to define various properties required to populate TPM with the definition, tables, scripts and output file to be used in the discovery process. The properties file for this example is as follows:
============================================== #name the extension extName=REGISTRYDATA
#Description of the extension extDescription=GBS Collect Registry data
#Custom Table Names TABLE_1.NAME=REGISTRYDATA
#file for Windows platform WINDOWS=yes pre_windows=C:\\test\\prescript.windows.bat out_windows=c:\\test\\regdata.windows.mif post_windows=c:\\test\\postscript.windows.bat ==============================================
extName is used to define the DCM object name for the new extension. extDescription is used in the description field for the discovery configuration and report (if created)
Multiple table names can be used by using sequential numbers after the TABLE_. For the purposes of this demo, only one table is used
Operating system flags – This can be defined for WINDOWS, AIX, HPUX, SOLARIS and LINUX
Pre/Post scripts and Output files – are used for each operating system. Used the prefixes pre_, out_ and post_ with the OS definitions of windows, aix, hpux, solaris and/or linux
Save the file as whatever naming convention is desired. For the purposes of this example the file was created in C:\IBM\tivoli\custom\inventory\registrydata\registrydata.properties
Import the properties file To import the properties, use the command %TIO_HOME%\tools\inventoryExtension.cmd. This command can be used to create, delete and list inventory extensions. The syntax used for this example was:
The “p” parameter defines the file to be used and the “-r yes” is used to tell the import to also create the custom report for the inventory extension.
Command Output: ========================================= C:\IBM\tivoli\tpm\tools>inventoryExtension.cmd create -p C:\IBM\tivoli\custom\inventory\registrydata\registrydata.properties -r yes 2008-12-30 09:59:03,890 INFO log4j configureAndWatch is started with configura ion file: C:\ibm\tivoli\tpm/config/log4j-util.prop 2008-12-30 09:59:04,062 INFO COPINV006I Parsing the command line arguments ... 2008-12-30 09:59:04,796 INFO COPINV007I ... command line arguments parsed. 2008-12-30 09:59:04,796 INFO COPINV008I Start processing ... 2008-12-30 09:59:04,812 INFO Start parsing property file 2008-12-30 09:59:08,780 INFO Finished parsing property file 2008-12-30 09:59:08,874 INFO COPINV021I The specified extension: REGISTRYDATA has been successfully registered. 2008-12-30 09:59:08,874 INFO Creating discovery configuration... 2008-12-30 09:59:14,984 INFO Discovery REGISTRYDATA_Discovery successfully created 2008-12-30 09:59:15,390 INFO Report REGISTRYDATA_Report succesfully created 2008-12-30 09:59:15,484 INFO COPINV009I ... end processing. 2008-12-30 09:59:15,484 INFO COPINV005I The command has been executed with return code: 0 . =========================================
Note the names of the Discovery Configuration and the Report created. TPM does not need to be restarted for this to take effect.
Deploy the scripts to the target The next step is to deploy the script(s) to the target(s). In TCM, this was done by creating a dependency on the inventory object. Currently this is not something that is documented, but could be done with a software package, a workflow or possibly modifying the CIT package (not sure if this would be advisable). I am going to leave this out for now as I think this will need to be investigated further. So for now, this was just a manual copy of the files to the remote target. Copy the files to C:\TEST as defined in the properties file.
Run the custom discovery Once the import is completed, a new discovery configuration is created. This discovery configuration will be labeled according to the extName field in the properties file and suffixed with “_Discovery”.
One of the main differences between a normal inventory discovery and the custom is on the Parameters tab of the discovery. There is a new field called Inventory Extension.
Run the custom report (if created) Once the scan is completed, execute the custom report. This will display the results for the data collected. The report is created under the Discovery section.
In the results the data for the scanned registry section for each computer will be displayed.
Other Random Notes
There are also 3 tables (that I found so far). The names are INVENTORY_EXTENSION, INVENTORY_EXTENSION_FILE and INVENTORY_EXTENSION_TABLE. The table INVENTORY_EXTENSION_FILE contains the pre, post and output files. I was able to modify the entries to use a different file on the target without having to re-import the properties file.
If you have been using MS Offline Situations in ITM 6.x so far, you know the drawbacks of such monitoring. For example, You will get hundreds of such situations when a RTEMS goes offline even if the agent itself running. You can use process monitoring situations (for the process kntcma.exe), but it has its own drawbacks. ITM 6.2.1 introduces a new approach to this problem and this article explains the new solution.
In ITM 6.2.1, we can use the Tivoli Proxy Agent Services to monitor the availability of the agents. For example, if a Windows OS agent goes down, the Tivoli Proxy Agent Services can restart it. In case the OS agent went down too many times, you can easily monitor the condition using a situation. Just use the Alert Message attribute in the Alerts Table attribute group and check if the agent exceeded restarted count. Here are few other conditions that you can monitor with the Alerts Message attribute.
Agent Over utilizing CPU
Agent Over Utilizing Memory
Agent Start Failed
Agent Restart Failed
Agent Crashed (abnormal stop)
Agent Status Check Script Failed
Managed/Unmanaged agent removed from the system
With the combination Tivoli Proxy Agent Services auto restart feature and set of situations to monitor the above exceptions, you can devise an effective agent availability monitoring solution with fewer and only relevant alerts reaching the console. Do you have questions about the above solution? Please feel free to write back.
The Eclipse development environment is very powerful, so I figured I would create a simple SOAP client in it from a given WSDL file. As it turns out, it's a little painful, so I wanted to write up the steps I had to go through.
I started with an empty Java project named "FirstJava".
First import your WSDL file into your project. - Select the "src" folder of your proejct, right-click and select "Import" - Choose General/File System - Select the folder containing your file and click OK - now place a check mark next to your WSDL file and click OK
Now download Tomcat. There is a built-in "J2EE Preview" that works for some things, but not for this.
Now create a new Target Runtime and server associated with Tomcat. - Select the project and select Project->Properties, then select "Targeted Runtimes" on the left of the dialog.
- Click the "New" button - Select Apache->Tomcat 5.5 AND ALSO CHECK "Also create new local server"
- Input the appropriate values as needed.
- Select the newly-create runtime
- Click OK to save the properties.
Create a new Web Services Client - Right-click your WSDL file name and select New->Other..., then in the dialog displayed, select Web Services->Web Service Client).
- Your WSDL file name should be filled in at the top of the dialog
- In this dialog, use the slider underneath "Client Type" to specify "Test client" (move it all the way to the top). - Click Finish. - This will create a bunch of new code in your current project, plus it will create a new project (named "FirstJavaSample" in my case) with the JSPs you'll be able to (hopefully) run to test your client.
- This will give you an error about the JSP not supporting org.apache.axis.message.MessageElement[]. Just click OK several times until the error box goes away. We'll fix that later.
If all went well, you should see something like the following:
Now we have to fix the errors.
Create a JAR file named FirstJava.jar containing the contents of the bin directory of your FirstJava project.
Copy that file to the Tomcat "Common/lib" folder (C:/Apache/Tomcat5.5/Common/lib on my system).
You will additionally need to find these files under the eclipse/plugins directory and copy them to the Tomcat Common/Lib folder:
(If you can't find them on your system, use Google to find and download them. One of them - I don't recall which - was tricky to find for me because it was actually in another JAR file.)
Now stop the Tomcat server by selecting it in the "Servers" view and clicking the stop (red square) button.
Now re-run your application by opening the FirstJavaSample project and finding the file named "TestClient.jsp". Right-click that file and select Run As->Run On Server, select your Tomcat server and click Finish.
You should now see that things are working correctly.
You may need to edit the generated JSP files to add input fields and such, but that's specific to your particular file.
Since TBSM runs on top of Tomcat, you can enable JMX access to TBSM's Tomcat server to give you some insight to how the JVM is doing. To do this, you'll need to edit the $NCHOME/bin/rad_server file to add a line (in the appropriate place, which should be easy to spot once you're in the file):
This specifies that no authentication is needed, which is fine in a test environment, but for a production environment, you would want to enable SSL and/or authentication (Google will find lots of links for you).
You do need to restart TBSM to have the changes take effect. Once it starts back up, you can view the JMX data using the jconsole command that is included with the Java 1.5 (and above) JDK. When you startup jconsole, specify the hostname of your TBSM server and port 8999 (specified above), with no user or password. That will give you a nifty GUI that looks like this:
One of the available tabs is "Memory", which will give you some (possibly) useful information about memory utilization in the JVM.
As you can see, there are other tabs, which you should investigate to see what additional information is available.
At least in VMWare Workstation 6.5 (and probably earlier versions, tho I'm not sure) running on Windows, you can easily access any of your host OS files from any Linux VM. You just need to enable Shared Folders (from VM->Settings, in the Options tab) and specify the folders you want to have accessible from Linux. Once you do this, you should see those folders under /mnt/hgfs in Linux. So it looks just like a regular filesystem from the Linux perspective.
I had a CentOS 5 VM that just didn't have enought disk space, so I wanted to give it some more. I didn't think it would be too hard, and in the end it wasn't, but it sure took me a while to find all the steps to accomplish it. So here are the ones I found useful. YMMV :)
Host OS: Windows Vista x64 SP1
VMWare Software: VMWare Workstation 6.5
Guest OS: Centos 5 (code equivalent to RHEL5)
1. Power off the VM (have to do this to add a new disk)
2. Create a new virtual disk (this is the easy part) a. Go into VM->Settings and in the Hardware tab, click the Add... button. b. Follow the instructions. This is very straightforward. I created a new 8GB disk.
3. Power on the VM and log in as root.
4. I decided to use the LVM subsystem, and that's what these steps address:
a. Create a Physical Volume representing the new disk: pvcreate /dev/sdb b. Extend the default Volume Group to contain the new PV: vgextend VolGroup00 /dev/sdb
c. Extend the default Logical Volume to include the newly-acquired space in the VG: lvextend --size +7.88G /dev/VolGroup00/LogVol00 (The disk is 8GB according to VMWare, but it looks like around 7.88GB to Linux)
d. Extend the device containing the / (root) filesystem to stretch across the entire LV: resize2fs -p /dev/mapper/VolGroup00-LogVol00
And that's it. I took the defaults on installing CentOS, so my / (root) filesystem is of type ext3, which supports this dynamic resizing.
So in this case, this disk is basically tied to this VM. If you wanted to create a disk that could be used by different VMs, you would certainly go about it differently, but that's a different topic.
If you've looked at a database from a vendor lately (Tivoli included; some example products that include databases are CCMDB, TADDM, ITCAM for WAS, ITCAM for RTT to name a few), you'll notice that there are very few (or NO) relationships between the tables. What this means is that you can't get a nice Entity Relationship Diagram from them, and that makes it quite a bit harder to write reports using the data in them.
So why is it this way?
More and more, software developers are using Object-relational mapping (ORM) components to abstract the software from the database. Here is a pretty comprehensive list of object-relational mapping software. What this software does is abstract the data relationships from BOTH the software AND from the database, putting that relationship information into various files that are used by the selected ORM implementation. The impact this has is that it is difficult as a consumer/user of the software to write reports directly against the database - because the first step is having to reverse engineer the usage of the tables in the database.
What can be done about it?
I can think of a couple of approaches:
1. The best solution I can think of is that you need to ask the vendor for ERDs for all databases that will be used to store collected metrics.
2. Since there may be some valid intellectual property-related arguments against no. 1 above, the next best approach would be to ask the vendor for the SQL needed to produce specific reports.
3. If neither of the above works, then reverse engineering is the only approach left. I've had success in this area by turning up the debugging on the software and looking for SQL "SELECT" statements in the log files.
OK, so this isn't a Tivoli-related post, but since a big part of what we all want to do is visualize data, I thought that this post that I found through reddit.com was an exellent description of how to use several free web-based utilities to gather and display data. Here's the link:
So to recap, we have scraped some data from a wikipedia page into a Google spreadsheet using the =importHTML formula, published a handful of rows from the table as CSV, consumed the CSV in a Yahoo pipe and created a geocoded KML feed from it, and then displayed it in a Yahoo map.
I haven't come up with an implementation that gathers Tivoli data, but I can think of one:
The main thing you would need is to get HTML that can be consumed by Google Spreadsheets. One way to do this would be with a JSP (on WAS) or PHP (on IBM HTTP Server) or other server-side language that makes SOAP or direct database calls to retrieve data from TDW and display it in HTML. Once you have that, you could then follow the steps in the article to viualize the data.