Configuring and viewing syslog server information by using REST Administration APIs
You can specify syslog configuration by using REST Administration APIs.
The syslog object cannot be deleted by using the REST API DELETE method. To configure your syslog server, complete the following steps:
Use the Eclipse Amlen REST API POST method.
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"Syslog": {
"Host" : "127.0.0.1",
"Port" : 514,
"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."
}
You can view syslog server configuration information by using the Eclipse Amlen REST API GET method with the following Eclipse Amlen configuration URI:
http://<admin-endpoint-IP:Port>/ima/v1/configuration/Syslog
The following example displays syslog server configuration information by using cURL:
curl -X GET
http://127.0.0.1:9089/ima/v1/configuration/Syslog
An example response to the GET method:
{
"Version": "v1",
"Syslog": {
"Host": "127.0.0.1",
"Port": 514,
"Protocol": "tcp",
"Enabled": true
}
}