You can forward logs from vRealize Automation to vRealize Log Insight to take advantage of more robust log analysis and report generation.

vRealize Automation is bundled with a fluentd-based logging agent. The agent collects and stores logs so that they can be included in a log bundle and examined later. You can configure the agent to forward a copy of the logs to a vRealize Log Insight server by using the vRealize Log Insight API. The supplied API allows other programs to communicate with vRealize Log Insight.

For more information about vRealize Log Insight, including documentation for the vRealize Log Insight API, see vRealize Log Insight documentation and also the /api/v1/events/ingest/{agentId} page.

Configure the logging agent to automatically and continuously forward vRealize Automation logs to vRealize Log Insight by using the supplied vracli command line utility.

All log lines are tagged with a host name and environment tag and can be examined in vRealize Log Insight. In a high availability (HA) environment, logs are tagged with different host names, depending on the node that they originated on. The environment tag is configurable by using the --environment ENV option as described below in the Configure or update integration of vRealize Log Insight section. In an HA environment, the environment tag has the same value for all log lines, regardless of the node they originated on.

Information about how to use the vracli command line utility is available by using the --help argument in the vracli command line. For example: vracli vrli --help.

Check existing configuration of vRealize Log Insight

Command

vracli vrli

Arguments

There are no command line arguments.

Output

The current configuration for vRealize Log Insight integration is output in JSON format.

Exit codes
The following exit codes are possible:
  • 0 - Integration with vRealize Log Insight is configured.
  • 1 - An exception occurred as part of command execution. Examine the error message for details.
  • 61 (ENODATA) - Integration with vRealize Log Insight is not configured. Examine the error message for details.
Example - check integration configuration
$ vracli vrli
No vRLI integration configured
 
$ vracli vrli
{
    "agentId": "0",
    "environment": "prod",
    "host": "my-vrli.local",
    "port": 443,
    "scheme": "https",
    "sslVerify": false
}
Note:
You can set a different host scheme (the default is https) and port (the default is 443) to use for sending the logs, as shown in the following samples:
vracli vrli set some-host
vracli vrli set some-host:9543
vracli vrli set http://some-host:9543

Port 9543 is used by the vRealize Log Insight ingestion API as described in the Administering vRealize Log Insight topic Ports and External Interfaces in the vRealize Log Insight documentation.

Configure or update integration of vRealize Log Insight

Command

vracli vrli set [options] FQDN_OR_URL

Arguments
The following command line arguments are available:
  • FQDN_OR_URL - the FQDN or IP address of the vRealize Log Insight server that is to be used to post logs by using the vRealize Log Insight API configuration. Port 443 and an HTTPS scheme are used by default. If any of these settings must be changed, you can use a URL instead.
  • options
    • --agent-id SOME_ID - Set the ID of the logging agent for this appliance. The default value is 0. Use to identify the logging agent for logs that are posted to vRealize Log Insight by using the vRealize Log Insight API configuration.
    • --environment ENV - set an identifier for the current environment. It will be available in vRealize Log Insight logs as a tag for each log line event. The default value is prod.
    • --ca-file /path/to/server-ca.crt - Specify a file that contains the certificate authority (CA) certificate that was used to sign the vRealize Log Insight server certificate. Force the logging agent to trust the specified CA and enable it to verify the certificate of the vRealize Log Insight server. The file can contain a whole certificate chain if needed to verify the certificate. In case of a self-signed certificate, pass the certificate itself.
    • --ca-cert CA_CERT - Specify a file in the same manner as --ca-file but pass the certificate (chain) inline as a string.
    • --insecure - Deactivate SSL verification of the server certificate. Force the logging agent to accept any SSL certificate when posting logs.
Output

No output is expected.

Exit codes
The following exit codes are possible:
  • 0 - The configuration was updated.
  • 1 - An exception occurred as part of the execution. Examine the error message for details.
Examples - Configure or update integration configuration
$ vracli vrli set my-vrli.local
$ vracli vrli set 10.20.30.40
 
$ vracli vrli set --ca-file /etc/ssl/certs/ca.crt 10.20.30.40
  
$ vracli vrli set --ca-cert "$(cat /etc/ssl/certs/ca.crt)" 10.20.30.40
 
$ vracli vrli set --insecure http://my-vrli.local:8080
 
$ vracli vrli set --agent-id my-vrli-agent my-vrli.local
 
$ vracli vrli set --environment staging my-vrli.local

Clear integration of vRealize Log Insight

Command

vracli vrli unset

Arguments

There are no command line arguments.

Output

Confirmation is output in plain text format.

Exit codes
The following exit codes are possible:
  • 0 - The configuration was cleared or no configuration existed.
  • 1 - An exception occurred as part of the execution. Examine the error message for details.
Examples - Clear integration
$ vracli vrli unset
Clearing vRLI integration configuration
 
$ vracli vrli unset
No vRLI integration configured