Managing the Smart Agent


To configure the Smart Agent parameters 

All the Smart Agent related parameters are stored in the smartagent.conf file. If you want to configure some of these parameters, you need to update the smartagent.conf file.

Do the following:

  1. Log in to the server where the RSCD Agent is installed.
  2. Navigate to the following path:
    • (Windowsc:\windows\rsc
    • (Linux/etc/rsc
  3. Back up the smartagent.conf file.
  4. Open the smartagent.conf file and edit the required parameters.

    Field

    Nested field

    Data type

    User input required?

    Purpose

    rest_api





    host

    String

    ✅️

    The host name of the Smart Hub API endpoint.

    port

    Integer

    ✅️

    The port for Smart Hub API endpoint.

    timeout_ms

    Integer

    ❌️

    The maximum waiting time before an API transaction succeeds. The default is 150000 ms.

    accesskey

    String

    ✅️

    The encoded key for accessing the Smart Hub.

    authtype

    String

    ❌️

    The supported authentication type. Currently, only 'cert' is supported.

    clientcert

    String

    ❌️

    The SSL client certificate file that is used for authenticating with the Smart Hub API endpoint. After authentication is successful, this file is stored in the configuration directory:

    • (Windows) C:\Windows\rsc
    • (Unix and Linux) /etc/rsc 

    clientkey

    String

    ❌️

    The SSL private key file that is used for authenticating with Smart Hub API endpoint. After authentication is successful, this file is stored in the configuration directory:

    • (Windows) C:\Windows\rsc
    • (Unix and Linux) /etc/rsc 

    enrollment







    state

    String

    ❌️

    The state of the agent enrollment. The following values are possible:

    • "new": The initial state, which is the default value.
    • "authenticated": The server is authenticated with the Smart Hub.
    • "enroll_req_sent": The server has sent an enrollment request to the Application Server.
    • "enrolled": The server is enrolled in the Application Server.
    • "registered": The server is registered in the Smart Hub.
    • "decommissioned": The server is decommissioned from the Application Server.

    server_name

    String

    ❌️

    The name that is used to enroll the server in the Application Server. This field is configured after the server is enrolled in the Application Server.

    server_guid

    String

    ❌️

    The server guid in the Application server. This field is configured after the server is enrolled in the Application Server.

    infra_id

    String

    ❌️

    A unique infrastructure identifier for the Application Server. This identifier is used by the Smart Agent when sending requests and receiving responses from the Application Server. This field is configured when the server is authenticated with the Smart Hub.

    en_interval_m

    Integer

    ❌️

    The interval at which the server enrollment request is sent (in minutes). The interval can be in the range 1 - 360 minutes.

    enroll_as

    String

    ✅️

    The server is enrolled into the Application Server using this identifier. Any one of the following identifiers can be used:

    • <HOSTNAME>: Indicates the server host name. This is the default identifier.
    • <SMARTHUB_PEER_IP>: Indicates the IP address of the server. A server might have multiple IP addresses. The IP address that is used for connecting to the Smart Hub is represented by this field.
    • <SMARTHUB_PEER_FQDN>: Indicates the fully qualified domain name for <SMARTHUB_PEER_IP>.
    • <UUID>: Indicates a random UUID value. Use it for enrolling servers in the AWS public cloud data center. NEW IN 20.02.01

    Also, you can specify a combination of <HOSTNAME>.domain or free text, such as smartagent.domain.

    request_ttl_h

    Integer

    ❌️

    The period up to which the Smart Agent waits for a response for a server enrollment request. After the server enrollment request is sent, the Smart Agent polls for the enrollment response. If the response is not received within this specified time period, a new enrollment request is sent. The default is 24.

    request_id

    String

    ❌️

    The server enrollment request id.

    After the server enrollment request is sent, the Smart Agent receives a request ID that is updated in the configuration file. This request ID is used for querying the server enrollment response. After the server enrollment response is received, this field is removed from the configuration file.

    request_time

    Integer

    ❌️

    Time that is spent in sending the server enrollment request.

    This field is added in the configuration file when server enrollment request is sent and removed when the response is received.

    NEW IN 20.02.01

    en_max_entries

    Integer

    ❌️

    Maximum number of enrollment attempts that the Smart Agent can make after receiving a failure enrollment response from the Application Server. The default value is 5.

    heartbeat

    hb_interval_m

    Integer

    ❌️

    The interval at which the Smart Agent sends heartbeat requests to the Smart Hub (in minutes). The interval range can be 1 to 60 minutes.

    environment

    SMARTHUB_HOST

    String

    ❌️

    The environment variables used to represent the Smart Hub host.

    SMARTHUB_PORT

    String

    ❌️

    The environment variables used to represent the Smart Hub port.

    SERVER_NAME

    String

    ❌️

    The environment variables used to represent the enrolled server name. (server_name field)

    tls

    skip_validation

    Boolean

    ❌️

    Enables or disables validation of the server-side TLS certificates. By default, validation is disabled.

    hostname


    String

    ❌️

    The host name of the server.

    version


    String

    ❌️

    The version of the product.

    uuid


    String

    ❌️

    A unique identifier string.

    workmanager NEW IN 20.02.01



    JSON object

    ❌️

    Configurations related to the Smart Hub.

    wm_interval_s

    Integer

    ✅️

    Specifies the interval (in seconds) at which the Smart Hub is polled for work requests. The default is 300 seconds.

    wm_websockets_enabled

    Boolean

    ✅️

    Indicates whether the websockets are used for polling work requests. The default is true. If the value is set to false, HTTP requests are used to retrieve work requests.

    tunnel NEW IN 20.02.01



    JSON object

    ❌️

    Configurations related to the tunnel feature.

    tnl_enabled

    Boolean

    ✅️

    Indicates whether the tunnel feature is enabled in Smart Agent. By default, it is disabled.

    tnl_allowed_tcp_ports

    Array

    ❌️

    Specifies the allowed destination port. If the received "tunnel" work request has a port which is not allowed, the tunnel module will display the appropriate error and the "tunnel" work request will not be processed. The default port is 4750.

    tnl_idle_timeout_m

    Integer

    ✅️

    Specifies the idle connection timeout in minutes. If the idle timeout parameter is received in a "tunnel" work request, it is used. If this parameter is not set, closing idle connection will not be processed by the Smart Agent. The default timeout interval is 720 minutes.

    NEW IN 20.02.01
    (optional) You can add the following out-of-the-box cloud-specific properties to the enrollment request.

    Property

    Type

    Description

    CLOUD_ACCOUNT

    String

    The cloud account to which the server belongs.

    CLOUD_REGION

    String

    The cloud region where the server is located.

    CLOUD_RESOURCE_NAME

    String

    The cloud resource name for the server.

    CLOUD_RESOURCE_ID

    String

    The cloud resource identifier for the server.

    CLOUD_VPC

    String

    The VPC where the cloud is located.

    Additionally, you can add custom properties. 

    Cloud properties example

    The following example shows the two custom properties ("CLOUD_IS_PROD" and "CLOUD_BU_NO") and the remaining are the out-of-the-box properties.

    "properties": {
       "CLOUD_PROVIDER": "AWS",
       "CLOUD_ACCOUNT": "BMC Production Account",
       "CLOUD_REGION": "us-east-1",
       "CLOUD_RESOURCE_ID": "i-1234567890abcdef0",
       "CLOUD_IS_PROD": true,
       "CLOUD_BU_NO": 364527
  5. Save the changes.
  6. Restart the Smart Agent service.

To start and stop the Smart Agent 

The Smart Agent runs as a daemon process. You can use the daemon startup scripts to start or stop the Smart Agent. These scripts are installed along with the RSCD Agent installation.

Action

Windows

Linux

Start the Smart Agent.

The Smart Agent runs as a Windows service.

  1. On the search bar, type services.msc.
  2. Right-click TrueSight Server Automation Smartagent, and click Start.

You can run one of the following commands:

  • NEW IN 20.02.01 systemctl smartagent start

    Important

    If you are using a Linux system with the systemd support, this is the default command to start the Smart Agent. If you want to use the /etc/init.d/smartagent start command, perform this procedure.

  • /etc/init.d/smartagent startIf you are using a Linux system that does not support systemd, use this command.

Stop the Smart Agent.

The Smart Agent runs as a Windows service.

  1. On the search bar, type services.msc.
  2. Right-click TrueSight Server Automation Smartagent, and click Stop.

You can run one of the following commands:

  • NEW IN 20.02.01 systemctl smartagent stop

    Important

    If you are using a Linux system with the systemd support, this is the default command to stop the Smart Agent. If you want to use the /etc/init.d/smartagent stop command, perform this procedure.

  • /etc/init.d/smartagent stopIf you are using a Linux system that does not support systemd, use this command.

(optional) Perform the following steps to disable the systemctl service and use the /etc/init.d/smartagent commands for starting or stopping the Smart Agent: NEW IN 20.02.01

Do the following:
  1. Log in to the Linux system where the RSCD Agent is installed.
  2. Disable the systemctl commands:
    systemctl disable smartagent
  3. Back up and move the files.
    mv /etc/systemd/system/smartagent.service /opt/<backupLocation>/
  4. (optional) Verify the run level of the Smart Agent.
    chkconfig -–list servicename
  5. (optional) If you want to set the run level, run this command:
    chkconfig --level <number> smartagent onFor example, chkconfig --level 345 smartagent on
  6. Restart the Linux system.
  7. Verify that the systemctl service is disabled:
    systemctl status rscd

To troubleshoot issues with the Smart Agent 

If you encounter any issues with the Smart Agent, check the Smart Agent logs to troubleshoot the issues. For more information, see Logs-for-the-Smart-Agent.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*