export_log_files
This command exports any compressed and rotated messages from /var/log to a specified target.
Messages (log files) must be in the format messages-nnn (for example messages-1223232).
This API is available in Guardium V11.2 and later.
REST API syntax
This API is available as a REST service with the
POST
method. Call this API as follows:
POST https://[Guardium hostname or IP address]:8443/restAPI/export_logfiles
GuardAPI syntax
export_log_files parameter=value
Parameters
Parameter | Value type | Description |
---|---|---|
Port | String | |
RemoteHost | String | Required. |
RemotePassword | String | Required. |
RemotePath | String | Required. |
RemoteUser | String | Required. |
api_target_host | String |
Specifies the target hosts where the API executes. Valid values:
IP addresses must conform to the IP mode of your network. For dual IP mode, use the same IP protocol with which the managed unit is registered with the central manager. For example, if the registration uses IPv6, specify an IPv6 address. The hostname is independent of IP mode and can be used with any mode. |
GrdAPI examples
To export log files to a remote host:
grdapi export_log_files RemoteHost=9.70.165.194 RemotePassword="password"
RemotePath="/var/log/" RemoteUser="root"
To export log files on a specific
port:
grdapi export_log_files RemoteHost=9.70.165.194 RemotePassword="password"
RemotePath="/var/log/" RemoteUser="root" Port=22
REST API example
curl -k -i --header "Authorization: Bearer <token>" -i -H "Content-Type: application/json" -X POST -d '
{RemoteHost:"9.70.165.194",RemotePassword:"password",RemotePath:"/var/log",RemoteUser="root" }
' https://9.42.32.28:8443/restAPI/export_logfiles