Create or update syslog server information

Purpose

Creates or updates syslog server configuration for forwarding log messages.

URI

Use the Eclipse Amlen REST API GET method with the following Eclipse Amlen configuration URI: http://<admin-endpoint-IP:Port>/ima/v1/configuration/

Object configuration data

Provide log location configuration data in the payload of the POST method by using the following schema: Content-type is set to application/json:


"Syslog" {    
    "Host" : "string",    
    "Port" : integer,   
    "Protocol" : "tcp" | "upd",    
    "Enabled" : true|false
}
Where:
Host
The IP address of the remote syslog server.
Port
The port number to use to connect to the remote syslog server.
The port number must be in the range 1 - 65535.
Protocol
Specifies the protocol that is used.
This value can be tcp or upd.
The default value is tcp.
Enabled=true|false
Specifies whether the syslog server connection is enabled.
This value can be true or false.
The default value is false.
Note: When Enabled is set to true, Eclipse Amlen attempts to establish a connection to the syslog server. If a connection cannot be established, a CWLNA0150 "Unable to connect" error is displayed. If Enabled is set to false, setting LocationType to syslog in LogLocation fails. If one or more LogLocation items use syslog, then syslog connectivity cannot be disabled by setting Enabled to false.

Usage NotesĀ®

  • The command must be capitalized as shown.
  • The command must use the double quotation marks as shown.
  • The use of symbolic host names reduces log message forwarding performance.

Related REST Administration APIs

Example

Updates the syslog server configuration:
curl -X POST \
   -H  'Content-Type: application/json'  \
   -d  '{                       
           "Syslog": {   
             "Host" : "192.160.24.1",    
             "Port" : 512,   
             "Protocol" : "tcp",    
             "Enabled" : true
         }
      }
  '   \
http://127.0.0.1:9089/ima/v1/configuration/
An example response to the POST method:

{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}