Configure sensor (agentless) automation settings using a file

Instead of waiting for a prompt to enter each setting individually, you can use a file to load settings as a batch.

The file format varies depending on the appliance type you are configuring. See File formats for agentless configuration settings.

Before you begin

  • Root or administrative privileges are required.

To load agentless settings from a file

  1. Create a plain text file that contains the agentless configuration settings.

    For example, the AWS configuration file will look like this:

generic
AWS_ACCOUNT_ID=123456789012
AWS_REGION=us-east-4
ACCESS_KEY_ID=ABCD12E3F4GHIJ567KLM
SECRET_KEY=HIDNmmbd55416d1vXIHNC415HhiwY84Yni8484B

You must create a separate file for each load balancer you configure. You cannot combine settings into a single file.

  1. Save the configuration file to a directory on the host where the sensor is installed.

  2. Run the addagentless command to apply the configuration file.

    • On Linux:
      • For single configuration: ./addagentless.sh -type (BIGIP | NETSCALER | A10 | AWS) -file path
        Example: ./addagentless.sh -type AWS -file /app/Sensor/cli/awsfile
      • For high availability configuration (applicable only for A10): ./addagentless.sh -type A10 -ha VRRPA -file path
        Example: ./addagentless.sh -type A10 -ha VRRPA -file /app/Sensor/cli/A10file
    • On Windows:
      • For single configuration: addagentless.bat -type (BIGIP | NETSCALER | A10 | AWS) -file path
        Example: addagentless.bat -type AWS -file /app/Sensor/cli/awsfile
      • For high availability configuration (applicable only for A10): addagentless.bat -type A10 -ha VRRPA -file path
        Example: addagentless.bat -type A10 -ha VRRPA -file /app/Sensor/cli/A10file
    • On Docker:
      • For single configuration: docker exec -it <container-id/name> cli/addagentless.sh -type (BIGIP | NETSCALER | A10 | AWS) -file path
        Example: ./docker exec -it 123456 cli/addagentless.sh -type AWS -file /app/Sensor/cli/awsfile
      • For high availability configuration (applicable only for A10): docker exec -it <container-id/name> cli/addagentless.sh -type A10 -ha VRRPA -file path
        Example: ./docker exec -it 123456 cli/addagentless.sh -type A10 -ha -file /app/Sensor/cli/A10file

Run the docker ps command to get the container name or ID and its operating status.

There are two ways to configure the agentless on docker:

  1. Without signing in to the docker sensor container:
    Run the docker exec -it <container-id/name> cli/addagentless.sh -type A10 or docker exec -it <container-id/name> cli/addagentless.sh -type A10 -ha VRRPA command.
  2. By signing in to the docker sensor container:
    1. Run the docker exec -it <container-id/name> bash command to get a bash shell in the container.
    2. Go to the sensor installation directory and run the cli/addagentless.sh -type A10 or cli/addagentless.sh -type A10 -ha VRRPA command.

File formats for agentless configuration settings

Appliance Example file formats
F5 BIG-IP MANAGEMENT_IP=10.141.17.192
MANAGEMENT_PORT=443
WEB_USERNAME=username1
WEB_PASSWORD=password1
Citrix NetScaler MANAGEMENT_IP=10.141.17.192
MANAGEMENT_PORT=443
WEB_PROTOCOL=http
WEB_USERNAME=username01
WEB_PASSWORD=password01
SSH_USERNAME=username02
SSH_PASSWORD=password02
SSH_PORT=20
A10
(For single configuration)
MANAGEMENT_IP=10.141.17.192
MANAGEMENT_PORT=443
ADMIN_USERNAME=username001
ADMIN_PASSWORD=password001
A10
(For high availability configuration)
HA_MANAGEMENT_IP=10.141.17.192
HA_MANAGEMENT_PORT=443
ADMIN_USERNAME= username001
ADMIN_PASSWORD= password001
ENABLE_PASSWORD= password01
PEER_INFO=10.141.17.196,443,username001,
password001 : 10.141.17.197,443,username002,password002

Note: Use a colon (:) symbol surrounded by blank spaces to separate the login information for each peer.
AWS AWS_ACCOUNT_ID=123456789012
AWS_REGION=us-east-4
ACCESS_KEY_ID=ABCD12E3F4GHIJ567KLM
SECRET_KEY=HIDNm+bd55416d1vXIHNC415HhiwY84Yni8484B