How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

Posted on August 8, 2016 by jharosh — No Comments ↓

In my previous article discussed about VMware NSX Manager 6.x.x Backup and Restore and in this article I am going to discuss how to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices.

In the production environment it is always recommenced to have remote log collector server configured, so that NSX Manager 6.x.x, NSX Controllers and NSX Edge devices sends all audit logs and system events from  NSX Manager 6.x.x, NSX Controllers and NSX Edge devices to the syslog server. This will be handy to troubleshoot or to get the final RCA in the event of any issue.

Let’s start with configuring syslog server for NSX Manager:-

1. Login to the VMware NSX Manager Virtual Appliance with Admin account.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices
2. Go to Manage –> General –> Click Edit in the Syslog Server section.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices3. Provide Syslog Server, Port and Protocol details in the syslog server window and Click OK to test and save the  settings.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

4. Once it is saved. It will show the settings like below.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devicesThis is how we can configure Syslog server for NSX Manager.


Next is how to Configure Syslog Server for VMware NSX controllers :-

For NSX Controllers only supported method to configure syslog Server is through the NSX API. And using Rest API we need to push Syslog Server details on all the NSX controllers one by one.

Before we go ahead and push the syslog server on NSX controllers through REST API, We need to enable/Add REST API client to the browser. You can search for Rest API Client for the browser for Chrome or Mozilla and Add to the Browser.

 

 

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

Once you are done with adding REST API plug-in to your browser. There are couple of thing that needs to be remember.

REST API requests requires Authentication  header and Content-Type as application/xml to send HTTP body.

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

Now we are ready to send the request body to configure Syslog Server for NSX controllers.

Open the Rest Client to set the request body to configure Syslog for NSX for vSphere Controllers. Make sure you have selected the Method as POST and URL as https://<NSX Manager IP>/api/2.0/vdn/controller/{controller-id}/syslog where controller-id is the name of NSX controller and can be found on the NSX Installation page.

HTTP Request body has to be this:

<controllerSyslogServer>
<syslogServer>x.x.x.x</syslogServer>
<port>514</port>
<protocol>UDP</protocol>
<level>INFO</level>
</controllerSyslogServer>

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

This is how we can configure Syslog Server on NSX Controllers. If you want to DELETE the Syslog exporter use below request:-

Method :- DELETE and URL:- https://<NSX-Manager-IP>/api/2.0/vdn/controller/{controller-ID}/syslog.


How to configure Syslog Server for Distributed Logical Router.

1.  Login to vCenter Server using vSphere Web Client and choose Networking and Security –> NSX Edges –> and Double click on Logical Router.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

2. Under Manage –> Settings –> Configuration click on Change under Syslog Servers.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

3. Enter the Syslog Server and Protocol details in the Edit Syslog Server Configuration page and Click OK.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

4. Now we can see Syslog is configured and ready to send all the logs to Remote Server.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices


How to configure Syslog Server for NSX Edge.

1.  Login to vCenter Server using vSphere Web Client and choose Networking and Security –> NSX Edges –> and Double click on NSX Edge.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

2. Under Manage –> Settings –> Configuration click on Change under Syslog Servers.How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

3. Enter the Syslog Server and Protocol details and Click OK.

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

That’s All. This is how you can configure Syslog Server for NSX Manager, NSX Controllers and NSX Edges.

Thank you and Happy learning How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

如何为NSX Manager 6.xx,NSX Controller和NSX Edge设备配置集中式日志记录

发表于 2016年8月8日 由 jharosh - 没有评论↓

在我以前的文章讨论了关于  VMware的NSX经理6.XX备份和恢复 ,这在文章中,我  还是打算讨论  如何配置集中记录了NSX经理6.XX,NSX控制器和NSX边缘设备。 

在生产环境中,建议始终配置远程日志收集器服务器,以便NSX Manager 6.xx,NSX Controllers和NSX Edge设备发送来自NSX Manager 6.xx,NSX Controllers和NSX Edge设备的所有审核日志和系统事件。到syslog服务器。如果有任何问题,这将很容易进行故障排除或获得最终的RCA。

让我们从为NSX Manager配置syslog服务器开始:-

1.使用管理员帐户登录到VMware NSX Manager虚拟设备。 2.转到管理–>常规–>单击Syslog服务器部分中的编辑。3.在“系统日志服务器”窗口中提供“系统日志服务器”,“端口”和“协议”详细信息,然后单击“确定”以测试并保存设置。How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices
How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devicesHow to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

4.一旦保存。它将显示如下设置。How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices这是我们可以为NSX Manager配置Syslog服务器的方法。


接下来是如何为VMware NSX控制器配置Syslog服务器:-

对于NSX Controllers,仅受支持的配置syslog服务器的方法是通过NSX API。使用Rest API,我们需要一一推送所有NSX控制器上的Syslog Server详细信息。

在继续并通过REST API在NSX控制器上推送系统日志服务器之前,我们需要启用REST API客户端/将REST API客户端添加到浏览器。您可以为Chrome或Mozilla的浏览器搜索Rest API Client,然后将其添加到浏览器。

 

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

完成将REST API插件添加到浏览器后。有几件事需要记住。

REST API请求需要身份验证标头和Content-Type作为application / xml来发送HTTP正文。

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

现在,我们准备发送请求正文以为NSX控制器配置Syslog服务器。

打开Rest Client来设置请求正文,以配置用于vSphere Controller的NSX的Syslog。确保已选择方法为POST,  URLhttps:// <NSX Manager IP> /api/2.0/vdn/controller/ {controller-id} / syslog,其中controller-id是NSX控制器的名称,可以是在NSX安装页面上找到。

HTTP请求正文必须是这样的:

<controllerSyslogServer>
<syslogServer> xxxx </ syslogServer>
<port> 514 </ port>
<protocol> UDP </ protocol>
<level> INFO </ level>
</ controllerSyslogServer>

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

这是我们可以在NSX Controllers上配置Syslog服务器的方法。如果要删除Syslog导出器,请使用以下请求:-

方法:-删除和URL:-https:// <NSX-Manager-IP> /api/2.0/vdn/controller/ {controller-ID} / syslog。


如何为分布式逻辑路由器配置Syslog服务器。

1.使用vSphere Web Client登录到vCenter Server,然后选择网络和安全性-> NSX Edges->并双击逻辑路由器。How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

2.在管理–>设置–>配置下,单击Syslog服务器下的更改。How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

3.在“编辑Syslog服务器配置”页面中输入Syslog服务器和协议详细信息,然后单击“确定”。How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

4.现在,我们可以看到已配置Syslog,并准备将所有日志发送到远程服务器。How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices


如何为NSX Edge配置Syslog服务器。

1.使用vSphere Web Client登录到vCenter Server,然后选择网络和安全性-> NSX Edges->并双击NSX Edge。How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

2.在管理–>设置–>配置下,单击Syslog服务器下的更改。How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

3.输入Syslog服务器和协议详细信息,然后单击“确定”。

How to Configure centralized logging for the NSX Manager 6.x.x, NSX Controllers and NSX Edge devices

就这样。这是为NSX Manager,NSX Controllers和NSX Edge配置Syslog Server的方法