Configuring application discovery service

The Agile Service Manager application discovery service is installed together with the other core components. Once you have provided the discovery details, Agile Service Manager can discover application data.

Before you begin

Ensure you have all the required application discovery information available, such as the application discovery username and password, scope and accessList details.

Remember: You provide configuration details for the deployed application discovery service after installing the core Agile Service Manager and application discovery containers, and after ensuring that the installed Application Discovery Observer, Application Discovery engines and the provided Db2 database container are running.
Verify the Application Discovery deployment before configuring the observer jobs. Use the following command to verify that the docker containers are running:
ASM_HOME/bin/docker-compose ps
The system should return output indicating that the following containers have a state of Up and therefore are running:
...
asm_appdisco-observer_1
asm_app-disco-discovery_1
asm_app-disco-primarystorage_1
asm_db2_1

About this task

You first upload the configuration details in a commonconfig.json file via POST /file command. You then run the PUT /config command for the Application Discovery Observer, which first validates the files, and then saves them in the topology management artifact and application discovery.

The application discovery service discovers configuration information about the entire application infrastructure, identifying deployed software components, physical servers, network devices, virtual systems, and host data. It then saves the information in the provided database. The Application Discovery Observer then retrieves network topology data from the database via REST API, which it uses to create topologies within the Agile Service Manager topology service.

Table 1. Application discovery model objects mapped to Agile Service Manager entity types
Application Discovery model object Agile Service Manager entity types
AppServer application
ComputerSystem host, server, router, switch
CPU cpu
L2Interface networkinterface
IpInterface networkinterface
IpAddress ipaddress
OperatingSystem os
Service service
StorageExtent storage
Function service
SAPSystem application
Collection Group
Router Router
Terminology:
  • A computer system can be a host, server, router or switch
  • A computer system contains CPU, L2Interface and storage
  • Operating system, application server and service run on a computer system
  • A computer system can connect to another computer system
  • A SAPSystem contains a collection
  • An application server can be a member of a collection

Procedure

  1. Edit the example configuration file included with the Application Discovery installation, or create a new configuration file.
    For on-prem
    Edit the included configuration file:
    ASM_HOME/data/appdisco-observer/ExampleCommonconfig.json
    Save the file as commonconfig.json
    Alternatively, in the ASM_HOME/bin directory, generate the configuration file using the generate_common_config.sh script:
    ./generate_common_config.sh -d
    Expected output includes:
    ...Successfully generated commonconfig.json in /opt/ibm/netcool/asm/bin/../data/appdisco-observer folder...
    For OCP
    Copy the text from the following example file: Application discovery service configuration template
    Save the file as commonconfig.json
  2. Edit or populate the following required properties in the configurations file for Application Discovery observer.
    See the related links for the full text of the included example configuration file.
    configId
    Discovery profile ID
    username
    Application Discovery username
    Value is administrator
    password
    Application Discovery encrypted password
    For on-prem: Value is collation, which must be encrypted.
    For OCP: No update is required. The Application Discovery Observer retrieves the password from appdisco secret:
    {releasename}-topology-nasm-app-disco-admin-secret
    scope
    Application Discovery scope
    accessListType
    Application Discovery access list objects and their properties
    See the following topic for all accessListTypes and properties: Supported application discovery accessListTypes and properties
    Note: The Application Discovery user gets locked out after three failed login attempts. This lockout is cleared after 30 minutes.
  3. Encrypt the following parameters:
    • password
    • privatePassword
    • enablePassword
    • passPhrase
    • communitystring
    For on-prem
    To encrypt these parameters, run the encrypt_password.sh script in the ASM_HOME/bin directory:
    ./bin/encrypt_password.sh 
    Enter and then confirm the parameters to be encrypted, in turn. The encryption utility will return encrypted versions.
    For OCP
    For OCP, encrypt these parameters with the following command:
    kubectl exec -ti asm-topology-pods -- java -jar /opt/ibm/topology-service/topology-service.jar encrypt_password --password '<password to encrypt>'
  4. Upload the configurations file (that is, 'commonconfig.json') via the Application Discovery Observer's Swagger UI POST /file command, or cURL command.
    Example cURL command:
    curl --insecure --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' --header 'X-TenantID: cfd95b7e-3bc7-4006-a4a8-a73a79c71255' --header 'Authorization: Basic YXNtOmFzbQ==' --request POST --url 'https://localhost/1.0/appdisco-observer/files' --form 'job_file=@/tmp/commonconfig.json'
    The configurations file will be saved in the ASM_HOME/data/appdisco-observer/tenant-id directory.
  5. Run POST /config via Swagger UI or cURL command to create the discovery details from the configurations file to the topology artifacts and Application Discovery.
    curl --insecure --request POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'X-TenantID: cfd95b7e-3bc7-4006-a4a8-a73a79c71255' --header "Authorization: Basic ${TOKEN}"  --url 'https://localhost:9156/1.0/appdisco-observer/config?filename=commonconfig.json'
  6. Run PUT /config via Swagger UI or cURL command to create/update/replace the discovery details from the configurations file to the topology artifacts and Application Discovery.
    Example cURL command:
    curl --insecure --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'X-TenantID: cfd95b7e-3bc7-4006-a4a8-a73a79c71255' --header “Authorization: Basic ${TOKEN}” --request PUT --url 'https://localhost:9156/1.0/appdisco-observer/config?filename=commonconfig.json'
    Note: To view the discovery configuration, you can run GET /config/{id} command. Example cURL command:
    curl --insecure --header 'Accept: application/json' --header 'X-TenantID: cfd95b7e-3bc7-4006-a4a8-a73a79c71255' --header “Authorization: Basic ${TOKEN}” 'https://localhost:9156/1.0/appdisco-observer/config/default'
  7. Use the Swagger UI or a cURL command to add an anchor or a gateway.
    Example anchor cURL command
    curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic YXNtOmFzbQ==' 'https://<ASM host>/1.0/appdisco-observer/anchor?configId=user6&IP%20Address=9.46.74.13&Port=3400'
    Example gateway cURL command
    curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic YXNtOmFzbQ=='  'https://<ASM host>/1.0/appdisco-observer/gateway?configId=user6&IP%20Address=9.46.75.179'
    Note: Anchor and gateway are global configurations. The value for the configId must be the same as defined for the configId property in the commmonconfig.json file.

Results

The discovery configurations are saved in topology management artifacts and Application Discovery. You can now run the full load job.

A Response code 400 error can occur when the incorrect componentType has been provided:
Example error message:
{
  "_error": {
    "message": "Failed to configure Application Discovery access list object",
    "level": "error",
    "description": "Failed to configure Application Discovery access list componentType: Computer Systems, vendor: none and accessListName: ComputerSystem_cvt_host1 via PUT or POST, aborting operation... Refer to Application Discovery observer logs for more details"
  }
} 
Workaround
Correct the configuration file, then re-upload it, and then rerun the PUT /config command.

What to do next

Next, you define an Application Discovery Observer job.