top of page

Configure Syslog on NSX Controllers


When we speak about log management, configuring syslog for all our systems, is and easy option

In Case of NSX configuring syslog on NSX manager is an easy task (Using GUI) but configuration of syslog on NSX controllers takes some efforts using REST APIs.

The only way we can configure syslog on NSX contollers is, Using API

All API commands and help about NSX is available in NSX API GUIDE

We will now see how to use NSX API to set syslog on Controllers.

For this we need an API client, easiest is Firefox REST API which is a plug in and available on internet, you may get any of the API client as per your browser.

Once configured, there will be and icon on Firefox for RESTClient as below

Open RESTclient

Click authentication type as BASIC and once pop up provide NSX manager API username and password (generally admin & your password)

Once this is configured, this looks as below

Setting up the syslog for NSX controllers is done in two steps

1) We need to use API to get controller IDs first

2) Set syslog on each controller using the POST command using controller IDs

Follow below steps to get controller ids

Use URL https://192.168.115.15/api/2.0/vdn/controller, select GET as method and hit Send and find response as below:

(replace your nsx manager ip accordingly)

Make note of all controller ids mentioned in response as <id>controller-1</id>, there may be one or more depending on the number of controllers. I only have one which is controller-1

We will use another API which is POST method to configure syslog for controller with ID controller-1

It Needs a header as Content-type:Application/xml for POST and PUT method

Select POST as method and type POST https://192.168.110.15/api/2.0/vdn/controller/{controller-id}/syslog

In my case (https://192.168.110.15/api/2.0/vdn/controller/controller-1/syslog)

copy below in the body field

<syslogserver>

<syslogServer>1.2.3.4</syslogServer>

<port>514</port>

<protocol>UDP</protocol>

</syslogserver>

(Mention your syslog server in my case it is 1.2.3.4)

it should look as below before we hit SEND

Hit SEND and look for response header

200 Status code specifies success. Just change POST method to GET and hit send again and look for Response Body (preview) and we should be able to see the syslog server configured on this Controller.

This is how to configure Syslog on NSX controllers which is only possible using REST APIs.

(Follow same steps for all controller-id )

Featured Posts
Recent Posts
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page