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.
- Protocol
- Specifies the protocol that is used.
- Enabled=true|false
- Specifies whether the syslog server connection is enabled.
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."
}