It is recommended to have a logging system of some sort (Log Insight or other) configured for your NSX components, NSX Manager, NSX Controllers and NSX Edge devices as this not only be handy when troubleshooting but will also give you a better view of what is happening on your environment.
As I don’t have Log Insight currently installed on my lab, I am going to be using a CentOS box as a syslog server. Let’s first go through installing syslog on my linux server, then we will move on to configuring the NSX manager, controllers and edge devices.
Configuring CentOS 7 as a syslog server
I am going to start by updating my box as it’s a fresh install
yum update -y
Then I am going to install rsyslog
sudo yum install rsyslog
Now let’s edit the rsyslog config file:
Find and uncomment the following lines to make my server listen on port 514 udp and tcp.
I have added the following lines to create a template for storing the logs forwarded by the clients.
I then created a folder for each device that will be sending the logs. ie nsx-manager and edge-01
Within each folder I created a messages file
Finally I restarted the rsyslog service
systemctl rsyslog restart
Configuring NSX Manager Logging
Login to your NSX manager
Click on Manage Appliance Setting then edit your syslog server details
Configuring DLR and Edge Logging
Networking & Security > NSX Edges > Double click on your edge device > Settings > Configuration > Enter your syslog server details
Configuring NSX Controllers Logging
Logging for NSX Controllers can only be configured via the REST API. I will be using Postman to make my changes. Below is the request body that I will be running against my NSX Manager. Controller-2 is my NSX controller id.
The response is a 200 so we are good!
Now let’s login to our syslog server and check if our logs are being recorded.
I hope this was post was helpful.
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count:
My name is Amine El Badaoui and I currently live in Aylesbury, a small town in the south east of England
I have been working in the IT industry for few years now and specialise in VMware virtualisation, data centre infrastructure and cloud technologies. Over the years I have obtained numerous industry certifications from Microsoft, Netapp and VMware.I currently work as a VMware Product Engineer @ https://www.rackspace.com/
This blog represents my random technical notes and thoughts. The thoughts expressed here do not reflect my current employer in anyway.