Syslog server details are not retreived while running the api/v1/transport-nodes/tn_uuid API call
search cancel

Syslog server details are not retreived while running the api/v1/transport-nodes/tn_uuid API call

book

Article ID: 431984

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • When executing the GET Transport Node API call:
    GET https://<mgr_IP>/api/v1/transport-nodes/<tn_uuid>
    the syslog server configuration details are not returned in the API response.
  • This behavior is observed specifically when the syslog server configuration is applied through the NSX UI using CentralNodeConfigProfile. In such cases, even though the syslog settings are correctly configured and applied to the transport node through the UI, the corresponding configuration details are not reflected in the response of the GET Transport Node API call.
  • However, when the syslog server configuration is applied directly using an API, the configuration is correctly associated with the individual transport node. As a result, the GET transport node API call successfully returns the syslog configuration details in the response.

Environment

VMware NSX

Cause

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.

Resolution

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/exporters

Example 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"
      }
    ]
  }
  

Additional Information

For additional details regarding the different log levels available, please refer to the documentation: Adding syslogservers for nsx nodes