Configuring for asynchronous discovery

To run an asynchronous discovery, you must first configure the discovery.

To configure for asynchronous discovery, you must generate a discovery script package, copy the package to the target system, and run the script on the target system. The output of the discovery script is an archive file that contains the discovery results. You must then move this archive file to the TADDM server.

Note: If you configured the discovery to run in the asynchronous mode and then upgraded TADDM, you must generate a discovery script package again because the sensor plug-in ID might change.
  1. To generate a discovery script package, enter one of the following commands from the $COLLATION_HOME/bin directory:
    • Regular method
      makeASDScriptPackage OUTPUT_DIR UNAME [IPADDRESS] [PACKING_METHOD]
      OUTPUT_DIR
      The directory path for the script package.
      UNAME
      The operating system of the target system, on which the script is to be run. The valid values are AIX, Linux, SunOS, FreeBSD, Windows, or NONSTOP_KERNEL.
      IPADDRESS (optional)
      The IP address of the target system on which the script is to be run.
      The scripts that are used for asynchronous discovery use information from TADDM server properties that are defined in the collation.properties file, and some of these properties might be scoped.
      scoped property
      A property to which you can append either an IP address or the name of a scope set. The IP address or the scope set name makes the property dependent on the host that is being discovered. You can use only scope set names that do not contain spaces, apostrophes ('), periods (.), and forward slashes (/).

      If you have customized any of the TADDM server properties so that they are scoped, you should include the IPADDRESS option in the makeASDScriptPackage command.

      PACKING_METHOD (optional)
      The method to use to package the files. The valid values are tar or zip.

      If no method is specified, the method is determined by the operating system. For example, for operating systems such as Linux®, the tar method is used.

      By default, the system path is searched for the archive utility. If necessary, add the com.ibm.cdb.tarpath property to the collation.properties file, and specify an alternative path for the archive utility.

      On Solaris operating systems, because of a limitation in the length of file names, you must use the gtar archive utility, and you must specify the path to the utility.

      The following example shows how to specify the path of the tar command on the TADDM server for the AIX® operating system:
      com.ibm.cdb.tarpath=tar
      The following examples show how to specify the path of the tar command on the target system, depending on the operating system:
      For AIX
      com.ibm.cdb.targettarpath.AIX=tar
      For Solaris
      com.ibm.cdb.targettarpath.SunOS=/usr/sfw/bin/gtar
      For example, to generate a discovery script package for the AIX operating system, enter the following command:
      ./makeASDScriptPackage /tmp AIX
      This command creates the following AIX script package in the tmp directory: /tmp/taddm_AIX.tar.
    • Extended method
      makeASDScriptPackage --outputDir OUTPUT_DIR --uname UNAME [--ipAddress IP_ADDRESS] [--packingMethod PACKING_METHOD] [--sensors SENSOR]
      --outputDir OUTPUT_DIR
      See the description of the OUTPUT_DIR parameter of the regular method.
      --uname UNAME
      See the description of the UNAME parameter of the regular method.
      [--ipAddress IP_ADDRESS] (optional)
      See the description of the IPADDRESS parameter of the regular method.
      [--packingMethod PACKING_METHOD] (optional)
      See the description of the PACKING_METHOD parameter of the regular method.
      [--sensors SENSOR] (optional)
      The name of the sensor that you want to include in your package. The following table contains the sensor names that must be used in this command.
      Table 1. Sensor names used in the makeASDScriptPackage command.
      Sensor Name used in the command
      Apache sensor apacheserver
      Citrix XenServer sensor xenserver
      FreeBSD computer system sensor computersystem
      Generic server sensor genericserver
      HP NonStop computer system sensor computersystem
      IBM AIX computer system sensor computersystem
      IBM DB2 sensor db2
      IBM Lotus Domino server sensor dominoserverinitial
      IBM Tivoli Utilization sensor utilization
      IBM WebSphere MQ Server sensor mqserver
      IBM WebSphere sensor webspherescript
      JBoss Application Server 7 sensor jboss7
      Kernel-based virtual machine sensor kvm
      Linux computer system sensor computersystem
      Microsoft Exchange sensor exchange
      Microsoft IIS Web server sensor iisserver
      Oracle sensor oracle
      Solaris computer system sensor computersystem
      WebLogic SSH sensor weblogiclaunchersensor
      Windows computer system sensor computersystem
      The Asynchronous discovery sensor is added to every package by default. All operating system sensors have computersystem name. They are differentiated on the basis of the --uname parameter. For example, if you specify the following parameters:
      [...] --uname Linux --sensors computersystem
      Linux computer system sensor is added to the package.
      For example, to generate a discovery script package for the AIX operating system, enter the following command:
      ./makeASDScriptPackage --outputDir /tmp --uname AIX --sensors computersystem
      This command creates the following AIX script package in the tmp directory: /tmp/taddm_AIX.tar.
  2. Copy the script package from the OUTPUT_DIR to the target system, and extract the script package.
  3. As a root user on UNIX systems, or administrator on Windows system, grant execute privileges to all script files. If the discovery script is run as a non-root, or non-administrator user, some sensor scripts might not complete a successful discovery, or the data that the sensor discovers might be limited.
  4. Run the scriptsRunner.sh script for the UNIX targets, or the scriptsRunner.bat for the Windows target.
  5. Move the resulting archive file (for example, /tmp/taddm${version}/asd/taddmasd-${hostname}-${execution timestamp}.tar) to the TADDM server in the location that is defined by the com.ibm.cdb.discover.asd.AsyncDiscoveryResultsDirectory property in the collation.properties file.
  6. In the collation.properties file, set the value of the com.ibm.cdb.discover.asd.ProcessUnreachableIPs property to true.
  7. Fix Pack
6Ensure that the asynchronous discovery sensors (ASDPingSensor and ASDSensor) are enabled in your discovery profile.
    By default, only the ASDSensor is enabled in the Level 2 and Level 3 discovery profiles.
  8. Create a scope with the IP address of the target system.

Run the discovery. You do not need root authority to run this discovery.

During the discovery, if the ping, port, or session sensor cannot access the target system, the target system is determined to be unreachable. If the value of the com.ibm.cdb.discover.asd.ProcessUnreachableIPs property is set to true, the asynchronous discovery sensor is run to process the discovery archive file for the target system. The archive file is processed only if the IP address from the discovery scope matches the IP address of the system that produced the archive file. Based on the contents of the archive file, sensors will be scheduled to process their script output. After the archive file is processed, it is renamed to tarfilename.tar_DONE so that it is not processed again.

The discovery archive file is processed only once. If a sensor is not enabled to process its script output at the time that the archive file is processed, running a second discovery with the sensor enabled does not process a previously processed archive file, unless you complete the following steps:
  1. Rename the archive file to its original name. For example, remove _DONE from the file name.
  2. The .processed file in the $COLLATION_HOME/var/asdd directory contains a list of the processed archive files. Remove the name of the archive file from the .processed file.

Multiple archive files from different systems can be processed in a single discovery run, but only one archive file per target system is processed during a single discovery run. If one target system has multiple archive files, only the one with latest time stamp is processed.

To discover multiple archive files from different systems in a single discovery run, copy each archive file to the location that is defined by the com.ibm.cdb.discover.asd.AsyncDiscoveryResultsDirectory property. Include the IP address of each target system in the discovery scope.

Because the discovery script uses the tar command to create the discovery archive file, if you are using a TADDM server that is running the Windows operating system, you must install a third party tar program for TADDM to use to extract the files from the archive file. The location of the tar program is defined by the com.ibm.cdb.tarpath property.

For reference, 'bsdtar' third party tar implementation is found to be supported when configured through above mentioned property for TADDM server running on Windows operating system.

Restriction: Your tar program must support long file paths. GNU Tar 1.13 is not supported because it might truncate long file names.
The process of manually starting discovery can be automated with following properties:
Table 2.
Property Name Possible Values Description
com.ibm.cdb.discover.asd.autodiscovery.enabled True/false If true, it will enable the option to process the stored ASD results files. Default value is false.
com.ibm.cdb.discover.asd.autodiscovery.asdScope <scope name> Default = ASD The thread will pick the target mentioned in this scope to process result file. If this property is not mentioned, default ASD scope is processed.
com.ibm.cdb.discover.asd.autodiscovery.asdProfile <profile name> Default = ASD The thread will pick the sensors mentioned in this profile to process result file. If this property is not mentioned, default ASD profile is processed.
com.ibm.cdb.discover.asd.autodiscovery.filesThreshold <file threshold> Default=20 Minimum Number of files required by thread, to start processing them. The thread will process the result if either the File threshold or Time threshold is met.
com.ibm.cdb.discover.asd.autodiscovery.timeThreshold <time threshold> Default=60 (seconds) Time threshold (in seconds) after which thread will process the result files, even if File Threshold is not met.