GET https://<mgr_IP>/api/v1/transport-nodes/<tn_uuid>GET Transport Node API call. GET transport node API call successfully returns the syslog configuration details in the response.VMware NSX
Syslog configurations defined in a CentralNodeConfigProfile via the NSX UI are not retrieved in the GET /api/v1/transport-nodes/<tn_uuid> response. This behavior could have multiple underlying reasons. For further investigation and to determine the exact cause, please consider raising a case with the Broadcom Support team by following the process outlined in Creating and managing broadcom cases.
Configuring syslog via an API call will reflect the syslog configurations in the GET https://mgr_IP/api/v1/transport-nodes/tn_uuid API response.
You can configure syslog individually for each transport node using API(method 1) OR you can configure syslog on the Central node profile using API(method 2)
Method 1: Configure the syslog server using API individually in the transport nodes:
https://<nsx-mngr-IP>/api/v1/transport-nodes/tn_ID/node/services/syslog/exportersExample Body:
{ "exporter_name": "Syslog-1", "server": "syslog-server-IP", "port": 514, "protocol": "UDP", "level": "INFO"}
Method 2: Configure the syslog server on the Central node profile using API:
https://<nsx-mngr-IP>/api/v1/configs/central-config/node-config-profiles/<centralnodeprofile_ID>Example Body:
{ "resource_type": "CentralNodeConfigProfile", "id": "00000000-0000-0000-0000-000000000001", "display_name": "All NSX Nodes", "description": "All configurations in this profile are applied to Manager and Edge nodes.", "timezone": "UTC", "_revision": 8, "ntp": { "servers": [ "ntp.corp.local", "ntp.vmware.com" ] }, "syslog": { "exporters": [ { "server": "192.168.110.10", "port": 514, "max_log_level": "INFO", "protocol": "UDP" } ] }
For additional details regarding the different log levels available, please refer to the documentation: Adding syslogservers for nsx nodes