Wednesday, October 22, 2014

Setting up Syslog on NSX Controller

Hi

Recently I received a request on how to configure syslog on the NSX controller during the NSX training so I looked at the API documentation and found out that this is the only supported Way to configure the syslog for NSX controllers. Official documentation will get modified reflecting the same state but in the mean time please read this post and refer the KB mentioned below.

Enabling or querying or disabling Syslog On NSX controller using NSX API

Add controller syslog exporter
Configures a syslog exporter on the specified controller node.

Request
POST https:///api/2.0/vdn/controller/{controller-id}/syslog
Request Body:

10.135.14.236
514
UDP
INFO


Query controller syslog exporter
Retrieves details about the configured syslog exporter on the specified controller node.

Request
GET https:///api/2.0/vdn/controller/{controller-id}/syslog
Response Body:

10.135.14.236
514
UDP
INFO


Delete controller syslog exporter
Deletes syslog exporter on the specified controller node.

Request
DELETE https:///api/2.0/vdn/controller/{controller-id}/syslog


Now only thing you need to make sure that you need to use the encoding method as application/xml NOT application/json.

Here is the screen shot from the NSX API Guide about using xml format.




Hope you find this useful and based on the above information I have created a KB article also which you can refer to setup syslog for NSX Manager too.

Enjoy !! 


Share and care !

No comments:

Post a Comment