Standalone Discovery Probe configuration - Adaptive Applications - BlueCat Gateway - 24.1.2

Network Discovery Administration Guide

ft:locale
en-US
Product name
BlueCat Gateway
Version
24.1.2

Starting in Network Discovery v24.1, you can configure the Discovery Probe to operate independently of BAM to ensure the separation of the Discovery Probe resource (v2 REST API). To do so, you must set the WORK_WITH_BAM variable to false as described below, when installing the Docker container.

  • If you do not want the Docker container to connect to BAM, set the WORK_WITH_BAM variable to false:
    docker run -d --name <NAME> -p <HTTP_PORT>:8000 -p <HTTPS_PORT>:44300 \
    -e BAM_IP=0.0.0.0 \
    -e BAM_API_VERSION=2 \
    -e SESSION_COOKIE_SECURE=false \
     -e WORK_WITH_BAM=false \
    quay.io/bluecat/network_discovery:24.1.2

The Discovery Probe operates independently from BAM.

  • Alternatively, if you want the Docker container to connect to BAM, set the WORK_WITH_BAM variable to true:
    docker run -d --name <NAME> -p <HTTP_PORT>:8000 -p <HTTPS_PORT>:44300 \
    -e BAM_IP=<BAM_IP> \
    -e BAM_API_VERSION=2 \
    -e SESSION_COOKIE_SECURE=false \
     -e WORK_WITH_BAM=true \
    quay.io/bluecat/network_discovery:24.1.2

When the WORK_WITH_BAM variable is set to true or no value is provided, the Docker container defaults to connecting to BAM. This enables integration between the Discovery Probe and BAM, thereby allowing the monitoring and analysis of v2 REST API requests.

Note: In both cases, ensure that BAM_API_VERSION is set to 2. Network Discovery will not work if the BAM_API_VERSION is set to 1. If no value is set, the default value (that is, 2) is used.

Based on your requirements, you can modify the WORK_WITH_BAM variable in the discovery_probe_config.ini file in the /portal/builtin/workflows/NetworkDiscovery/config folder.

For example, to change the WORK_WITH_BAM variable to true, you can add the following to the end of the existing content in the discovery_probe_config.ini file:
[BAM_SETTING]
work_with_bam = true
Note: When running the Docker container, the environment variables specified in the docker run command will take precedence over the values defined in the discovery_probe_config.ini file. The WORK_WITH_BAM variable in the configuration file is only useful when we do not pass the environment variable flag when running Docker.

Procedure

To connect the standalone Probe to the Management container:
  1. Run two Docker containers, one for the standalone Probe and the other for Management:

    Standalone Probe:
    docker run -d --name <NAME> -p <HTTP_PORT>:8000 -p <HTTPS_PORT>:44300 \
    -e BAM_IP=0.0.0.0 \
    -e BAM_API_VERSION=2 \
    -e SESSION_COOKIE_SECURE=false \
     -e WORK_WITH_BAM=false \
    quay.io/bluecat/network_discovery:24.1.2
    Management:
    docker run -d --name <NAME> -p <HTTP_PORT>:8000 -p <HTTPS_PORT>:44300 \
    -e BAM_IP=<BAM_IP> \
    -e BAM_API_VERSION=2 \
    -e SESSION_COOKIE_SECURE=false \
     -e WORK_WITH_BAM=true \
    quay.io/bluecat/network_discovery:24.1.2
  2. From the Network Discovery UI (Management service), add a local probe. See Adding a discovery probe for details.

  3. Add a remote probe. See Adding a discovery probe for details.

    Note: For details on the default username and password, refer to BlueCat default login credentials (you must be authenticated to view this topic). If you've already updated the user credentials, use them instead.
  4. Add (or update) a device to use the remote probe. See Adding a device for details.

    The remote probe monitors and collects data from the device.

  5. To manage the monitoring and data collection, add a Reconciliation policy that includes both the device and the remote probe. See Adding a Reconciliation Policy for details.

  6. After the Reconciliation policy is added, select Run Now from the Schedule Type dropdown list and click Submit.

    Network Discovery starts running the policy immediately and initiates the monitoring process. When the policy is run, the Discovery Status in the details section displays the current status of the policy. Make sure you wait at least 1minute for the JSON file to be updated in the BAM UI.

    After the policy is run, you can view the History and Logs for the policy.

    Note:

    To verify that the job ID associated with the policy is successfully added, access the URL <http://<ip>>:<remote_probe>/network-discovery/api/v2/ and then, use the API GET ../discovery_probe.

  7. Once the policy is executed successfully, you can view the results in the BAM UI.

Authorization

When using a standalone Discovery Probe (that is, when WORK_WITH_BAM variable is set to false), the container cannot connect to BAM for authorization when using v2 REST API. Instead, you can use the JSON Web token (JWT) for authorization.

  1. Open Swagger by using the following URL:

    https://<YOUR_IP>:<PORT>/network-discovery/api/v2/
  2. Use the following v2 REST API endpoint to login with user credentials:

    POST .../discovery_probe/login
    Note: For details on the default username and password, refer to BlueCat default login credentials (you must be authenticated to view this topic). You can update the user credentials by using the PUT .../discovery_probe/update_user endpoint.

    Upon successful login, an access token is generated in the response. Copy this token as it will be used in the step 4.

  3. Navigate to the top of the page and click Authorize.

  4. In the Available Authorizations page that is displayed, paste the token (obtained in step 2) in the Value field.

  5. Click Authorize.

    You are logged in successfully.

Note: To connect the Management service to a standalone Probe, the Management user credentials must be the same as those used for the standalone Probe.