(9.1+) Management API configuration

The Management API site.config file is located in the install directory of each Management Instance. It contains the following objects:

  • The lager object is used for logging.
  • The management_api object contains settings for the Management API and Authorization API, including port numbers. (The default port numbers are 8000 for the Management API and 2800 for the Authorization API.)
  • The Email Notification object is used for sending emails.
  • The license_manager object contains the port number for the License Manager. (The default port number is 8002.)
  • The ds object contains database credentials.

WHERE IS THE MANAGEMENT API site.config FILE LOCATED?

The default location is C:\Program Files(x86)\Virtual Hold Technology\Management API

Sample site.config file

This is a sample file. Depending on the application you are using, you may see additional settings.

[ {lager, [
        {handlers, [
            {lager_console_backend, info},
            {lager_file_backend, [{file,"C:/Program Files (x86)/Virtual Hold Technology/VHLogs/Logs/
                 Management API/debug.log"},{level,debug},{size,10485760},{date,"$D0"},{count,5}]},
            {lager_file_backend, [{file,"C:/Program Files (x86)/Virtual Hold Technology/VHLogs/Logs/
                 Management API/error.log"},{level,error},{size,10485760},{date,"$D0"},{count,5}]}
        ]}
    ]},
    {management_api, [
        {webmachine_port,8000},
        {auth_api_url,"http://<SERVERNAME>:2800"},
        {auth_service_token,"xxxxxx-GOOD-xxxxxx"},
        {auth_queue_name,"SystemManagement"}
    ]},
    {license_manager, [
        {web_port,8002}
    ]},
    {email_notification, [
        {action_timeout_in_minutes, 5},
        {relay, "10.10.1.90"},
        {port, 25},
        {username,"sampleuser@virtualhold.com"},
        {password,"hsojjvOcVpFohDLquLFb0Q=="},
        {from, {"Test Email", "sampleuser@virtualhold.com"}}
    ]}
],
    {ds,[{vht_config,
          [{driver,"{SQL Server}"},
           {server,"SERVERNAME"},
           {uid,"sa"},
           {pwd,"IoRfyOWxGkvCemmouRBy4P=="},
           {database,"VHT_Config"}
           {multi_subnet_failover, "Yes"}]},
          {vht_rpt,
          [{driver,"{SQL Server}"},
           {server,"SERVERNAME"},
           {uid,"sa"},
           {pwd,"IoRfyOWxGkvCemmouRBy4P=="},
           {database,"VHT_RPT"}
           {multi_subnet_failover, "Yes"}]}]}].

Logs

The lager object specifies how the log file is handled. It includes:

  • Path to the location where the log file is stored
  • Level of logging output to the log file
  • Maximum size of the log file
  • Format for the date
  • Number of files stored in the log location

The Management API must be stopped and restarted for changes to take effect.

Refer to Management API Logging for more information on logging.

Email Notification

The email_notification section of the site.config file contains the settings needed to send email alerts. These must be set up manually. The Callback Installer does not prompt for this information.

    ]},
        {email_notification, [
        {action_timeout_in_minutes, 5},
        {relay, "10.10.1.90"},
        {port, 25},
        {username,"sampleuser@virtualhold.com"},
        {password,"hsojjvOcVpFohDLquLFb0Q=="},
        {from, {"Test Email", "sampleuser@virtualhold.com"}}
    ]}
SettingDefinition
action_timeout_in_minutesMaximum time in minutes that the requested action has to complete. Exceeding this generates a failed email message.
relayThe name of the SMTP server.
portThe network port used to communicate with the SMTP server. The default is 25.
*username

System administrator (sender) user name.

To disable SMTP authentication, do one of the following manually in the site.config:

  • Set username and password to none.
  • Remove parameters for username and password.
*password

Encrypted system administrator (sender) password.

To disable SMTP authentication, do one of the following manually in the site.config:

  • Set username and password to none.
  • Remove parameters for username and password.
fromThe user name and email address that appears as the sender on the notification email message.

* To enter or change the username and encrypted password, use the Update SMTP Credentials utility. See Changing SMTP Credentials for System Management Email.

The Management API must be stopped and restarted for changes to take effect.

Management API logging

Log messages will be written to the Management API log files (error.log and debug.log) located in the same location as the other Callback log files, which is the "VHLogs\Logs" folder wherever Callback has been installed (the default is C:\Program Files (x86)\Virtual Hold Technology\VHLogs\Logs\Management API).

The log level, log location, and other details are set in the Management API site.config file. Refer to Management API Configuration.

Log Levels

The following log levels are provided. The log level represents the lowest severity at which a log message will be written.

  • emergency (in both error.log and debug.log files)
  • alert (in both error.log and debug.log files)
  • critical (in both error.log and debug.log files)
  • error (in both error.log and debug.log files)
  • warning (in debug.log file only)
  • notice (in debug.log file only)
  • info (in debug.log file only)
  • debug (in debug.log file only)

The most log messages will be written at the debug level, the least at the emergency level.

Error.log File

To view only emergency, alert. critical and error log messages, open the error.log file. Since this file contains more general information, it is best used as the first step in locating problems.

Debug.log File

To view all log messages, open the debug.log file. Since this file contains large quantities of detailed information, it is best used to further investigate initial information retrieved from the error.log file.

Changing SMTP credentials for System Management email

UPGRADING TO VHT Callback SOFTWARE 8.11.1 OR LATER?

The SMTP password must be re-entered in order to correctly encrypt the password.

Each Management Instance has a Management API site.config file containing the settings needed to send email alerts.To change the SMTP credentials for email, perform these steps on each Management Instance.
  1. Click Start.

  2. In the Search field, enter command prompt.

  3. Right-click Command Prompt and select Run as administrator.

  4. Type cd followed by the path to the install directory for Management API and press Enter.
    • For example, type: cd C:\Program Files (x86)\Virtual Hold Technology\Management API, and press Enter.

  5. Type bin\management_api_node update_smtp_credentials [user name] [password] and press Enter.

    • Replace [user name] and [password] with the new user name and/or password.

The email credentials will be changed and the password will be encrypted.

To disable SMTP authentication, do one of the following manually in the site.config:

  • Set username and password to none.
  • Remove parameters for username and password.

Refer to the Maintaining SMTP Notification Services During Password Change topic to create a temporary SMTP user to maintain the function of the Management API while changing the password of an existing user. The Management API uses the temporary user to send email notifications for System Management while you change credentials.

Refer to Adding a New SMTP User to add a new SMTP user.

Maintaining SMTP notifications during password change

Create a temporary SMTP user to maintain the function of the Management API while changing the password of an existing user. The Management API uses the temporary user to send email notifications for System Management while you change credentials.
  1. Create a temporary user on the SMTP server.
  2. Perform these tasks on each Callback Management API:
    • Use the Update SMTP Credentials utility to change the credentials to match the temporary user.
    • Restart the Callback Management API service.
After the changes are complete, use the Update SMTP Credentials utility to change the credentials back to the credentials of the previous user. Restart the Management API service. You can delete the temporary user if needed.

Adding a new SMTP user

To add an SMTP user for the Management API service:
  1. Create the new user on the SMTP server.
  2. Perform these tasks on each Management API:
    • Use the Update SMTP Credentials utility to change the SMTP credentials to match the new user.
    • Restart the VHT Management API service.

Complete all steps on each Management API before moving to the next server.