Creating IBM Tivoli Monitoring agent fixlets in BigFix

Hi All,

I just went through the process of creating ITM agent packages for deployment through BigFix and thought I would share it. Right now I do not have Lifecycle, so some steps are a bit manual. I did the same steps for Linux, AIX and Solaris.

I had done this in the past (http://blog.gulfsoft.com/2014/01/creating-itm-deployment-packages-for.html) but I find this method to be much better.

Creating the ITM 6.3.0.3 package for Linux (lz) in BigFix

First create the bundle for Linux. The “-os” parameter will export for all supported linux versions. It does make the bundle a bit bigger, but way easier to build.
Couple notes:

  • The export folder has to already exist.
  • When extracting the tar.gz, use 7-Zip, not WinZip. I had a big issue with the “^M” character in the extracted files and this took a while to determine how this occurred.

tacmd exportBundles -i . -os LINUX -o LOCAL -v 063003000 -e E:\Data\itm_agents\BigFix\LINUX -t lz

KUICEB023I: Are you sure you want to export the following bundles to the E:\Data\itm_agents\BigFix\LINUX directory?

Product Code : lz
Deployable : True
Version : 063003000
Description : Monitoring Agent for Linux OS
Host Type : li6263
Host Version : li6263,li6266
Prerequisites: ci:063003000 ax:063003000 ui:063003000 gs:080050020 jr:070700000 la:010001000

Product Code : lz
Deployable : True
Version : 063003000
Description : Monitoring Agent for Linux OS
Host Type : lpp266
Host Version : lpp266
Prerequisites: ci:063003000 ax:063003000 ui:063003000 gs:080050020 jr:070700000 la:010001000

Product Code : lz
Deployable : True
Version : 063003000
Description : Monitoring Agent for Linux OS
Host Type : lx8266
Host Version : lx8266
Prerequisites: ci:063003000 ax:063003000 ui:063003000 gs:080050020 jr:070700000 la:010001000

KUICEB024I: Enter Y for yes or N for no: y

KUICEB020I: Exporting bundles to the E:\Data\itm_agents\BigFix\LINUX directory. The time required to complete this operation depends on the number and size of the exported bundles.

KUICEB022I: The following bundles were successfully exported to the E:\Data\itm_agents\BigFix\LINUX directory:

Product Code : lz
Deployable : True
Version : 063003000
Description : Monitoring Agent for Linux OS
Host Type : li6263
Host Version : li6263,li6266
Prerequisites: ci:063003000 ax:063003000 ui:063003000 gs:080050020 jr:070700000 la:010001000

Product Code : lz
Deployable : True
Version : 063003000
Description : Monitoring Agent for Linux OS
Host Type : lpp266
Host Version : lpp266
Prerequisites: ci:063003000 ax:063003000 ui:063003000 gs:080050020 jr:070700000 la:010001000

Product Code : lz
Deployable : True
Version : 063003000
Description : Monitoring Agent for Linux OS
Host Type : lx8266
Host Version : lx8266
Prerequisites: ci:063003000 ax:063003000 ui:063003000 gs:080050020 jr:070700000 la:010001000

KUICEB027I: You cannot interactively install the exported agent bundle using install.sh as many interactive elements have been optimized for remote transmission and silent execution using software distribution technologies.

Install cmds :
Unix : /silentInstall.sh
Windows : \silentInstall.bat

Create the BF Archive File
BFArchive.exe -a E:\Data\itm_agents\BigFix\LINUX\lz_063003000_LINUX E:\Data\itm_agents\BigFix\LINUX\lz_063003000_LINUX.bfa

Get the sha1 value
sha1.exe -r E:\Data\itm_agents\BigFix\LINUX\lz_063003000_LINUX.bfa

prefetch lz_063003000_LINUX.bfa sha1:ac8b834893744279423ac87ff8652d3f4b4f3808 size:419393097 http://EXAMPLEURL/REPLACEME.exe

This file will have to be copied up to the BES server in the wwwroot\Uploads folder. I created the folder with the name of the BFA file.

Once copied, the URL for the “prefetch” statement can be tested (us Chrome) to verify the URL is correct. If the file starts downloading, the URL is correct, if a 404 error is received, the URL is incorrect.

Build Fixlet

Action Script
prefetch lz_063003000_LINUX.bfa sha1:ac8b834893744279423ac87ff8652d3f4b4f3808 size:419393097 http://:52311/Uploads/lz_063003000_LINUX/lz_063003000_LINUX.bfa

extract lz_063003000_LINUX.bfa

wait sh -c chown -R root:root __Download/

wait mkdir /tmp/ITM

wait mv __Download/* /tmp/ITM

Wait chmod -R -f 775 /tmp/ITM

delete __appendfile
appendfile NETWORKPROTOCOL=ip.pipe
appendfile HOSTNAME=<itm_primary_server>
appendfile IPPIPEPORTNUMBER=1918
appendfile MIRROR=<itmbackup_server>
appendfile KDC_PARTITIONNAME=
appendfile LOGMODE=LOGMODE
appendfile SO=so
appendfile CLUSTER=NO
appendfile CMSCONNECT=YES
appendfile CLUSTERFLAG=#
appendfile HSNETWORKPROTOCOL=ip.pipe
appendfile HSLOGMODE=LOGMODE
appendfile BK5HSNETWORKPROTOCOL=none
appendfile HSIPPIPEPORTNUMBER=1918
appendfile IPPIPEPORTNUMBER=1918
appendfile PRIMARYIP=none
appendfile HSIPSPIPEPORTNUMBER=3660
appendfile IP6PORTNUMBER=1918
appendfile BK3HSNETWORKPROTOCOL=none
appendfile IPSPIPEPORTNUMBER=3660
appendfile HSLUNAME=LUNAME
appendfile NETNAME=CANDLE
appendfile CELLNAME=CANDLE
appendfile PORTNUMBER=1918
appendfile HSPORTNUMBER=1918
appendfile BK1HSNETWORKPROTOCOL=none
appendfile BK5NETWORKPROTOCOL=none
appendfile BK4NETWORKPROTOCOL=none
appendfile LUNAME=LUNAME
appendfile HSNETNAME=CANDLE
appendfile BK3NETWORKPROTOCOL=none
appendfile FTO=YES
appendfile IP6PIPEPORTNUMBER=1918
appendfile BK2NETWORKPROTOCOL=none
appendfile BK1NETWORKPROTOCOL=none
appendfile IP6MIRROR=<itmbackup_server>
appendfile BK4HSNETWORKPROTOCOL=none
appendfile IP6HOSTNAME=<itm_primary_server>
appendfile IP6SPIPEPORTNUMBER=3660
appendfile BK2HSNETWORKPROTOCOL=none
appendfile CANDLE_ENCRIPTION_KEY=<ITM key (IBMTivoliMonitoringEncryptionKey by default)>

delete "/tmp/ITM/Silent_Install.txt"
copy __appendfile “/tmp/ITM/Silent_Install.txt”

wait chmod -R -f 775 /tmp/ITM

//Commenting out for now to verify the previous steps are successful
//First run the installation
wait sh -c /tmp/ITM/silentInstall.sh

//Then run the configuration
wait sh -c opt/IBM/ITM/bin/CandleConfig -A -h /opt/IBM/ITM -p /tmp/ITM/Silent_Config.txt lz

Relevance

(name of it contains “Linux”) of operating system

if (exists file “/opt/IBM/ITM/config/lz.config”) then (not exists file ("/opt/IBM/ITM/" & parenthesized part 1 of match (regex “^.’(.)’$”) of (lines whose (it as string contains “ITM_BINARCH”) of file “/opt/IBM/ITM/config/lz.config”) & “/lz/bin/klzagent”)) else (true)