NSX-T Edge and Manager CFAPI/TLS Integration

NSX Managers, Edges and ESXi transport nodes can all send their logs encrypted. The NSX Managers and Edges even ship a Log Insight agent that talks the native CFAPI protocol over TLS, port 9543. It buffers on disk when the log server is away and verifies the server’s certificate.

Getting there takes some CLI work, though. You need the CA on every node, one command per node, and a separate setting on the ESXi hosts. This guide does all of it the way a VCF 5 deployment expects, and proves that every hop is encrypted and verified.

What you’ll end up with:

  • NSX Managers (all three nodes) sending over CFAPI/TLS (li-tls, port 9543), with the server certificate checked against your CA
  • NSX Edges doing the same, because their gateway firewall and routing logs matter most during an incident
  • ESXi transport nodes, which carry the distributed firewall logs, sending syslog over TLS (port 6514)
  • One configuration method only, so nothing is logged twice
  • A way to prove it from Debian with openssl, and on the log server
  • A day-2 routine for certificate renewal, new nodes and upgrades

Tested on: NSX 4.1/4.2 in VCF 5.1/5.2 with VMware Aria Operations for Logs 8.x (the product formerly called vRealize Log Insight). The checks use Debian 13 with OpenSSL 3.5. Names follow VCF’s sfo-m01 conventions, like my NSX overlay guide.


Table of contents

  1. Placeholders
  2. Protocols and ports
  3. Prerequisites
  4. Check the log server’s certificate chain
  5. Pick one configuration method
  6. NSX Managers
  7. NSX Edges
  8. ESXi transport nodes
  9. Verify on Aria Operations for Logs
  10. Day-2 operations
  11. Troubleshooting
  12. Checklist

1. Placeholders

PlaceholderMeaning
sfo-m01-nsx01a, -nsx01b, -nsx01cNSX Manager nodes (the VIP is sfo-m01-nsx01)
sfo-m01-en01, sfo-m01-en02NSX Edge nodes
sfo-m01-cl01The vSphere cluster with the ESXi transport nodes
sfo-vrli01.example.netAria Operations for Logs cluster VIP (integrated load balancer)
sfo-vrli01a, -01b, -01cThe log server nodes
ca-chain.pemYour root CA and intermediate CA in one PEM file

Always point clients at the VIP, never at a single log node. The integrated load balancer spreads the agents across the cluster and moves them when a node goes down.


2. Protocols and ports

proto in NSXTransportPortEncryptedNotes
udpSyslog514NoLost packets, no back-pressure. Avoid.
tcpSyslog514NoReliable but readable on the wire
tlsSyslog over TLS6514YesAny syslog receiver; supports client certificates
liCFAPI (Log Insight agent)9000NoAgent with disk buffer, in clear text
li-tlsCFAPI over TLS9543YesAgent with disk buffer, compression, server check. Use this for NSX Managers and Edges.

li-tls is the better choice towards Aria Operations for Logs. The agent stores events locally when the server is down and sends them when it’s back. Plain syslog, even over TLS, loses what doesn’t fit in the send buffer.

ESXi doesn’t have the agent, so hosts use syslog over TLS (ssl://...:6514).


3. Prerequisites

A proper certificate on the log server. Replace the self-signed certificate that Aria Operations for Logs installs with one from your CA (Administration โ†’ SSL). It must contain, in the Subject Alternative Names:

  • the VIP FQDN sfo-vrli01.example.net, because that’s the name the clients check
  • every node FQDN (sfo-vrli01a.example.net, …), because the load balancer can hand you to any node

Upload the full chain (server certificate, intermediate, root) so the server presents the whole path.

Time and DNS. TLS verification fails with a wrong clock. NSX nodes, ESXi hosts and the log cluster all need working NTP. The VIP name must resolve the same way from every component.

Firewall. From the management network (NSX Manager and Edge management interfaces, ESXi vmk0) to the log VIP and nodes:

FromToPort
NSX Managers, NSX EdgesLog VIP and nodesTCP 9543
ESXi hostsLog VIP and nodesTCP 6514

If TLS is a requirement, block 514, 9000 and UDP 514 towards the log cluster from these networks. Then a misconfigured node fails loudly instead of quietly sending in the clear.

Content pack. Install the VMware NSX content pack in Aria Operations for Logs (Content Packs โ†’ Marketplace). It brings the dashboards, extracted fields and alerts.


4. Check the log server’s certificate chain

Before touching NSX, check from any Linux box (Debian 13 here) what the server presents and whether your CA file verifies it. Do this against the ingestion ports, not only port 443:

# What chain does the server send?
openssl s_client -connect sfo-vrli01.example.net:9543 -servername sfo-vrli01.example.net \
    -showcerts </dev/null 2>/dev/null | grep -E '^ *[0-9] s:|^ *i:'

# Does our CA file verify it, including the host name?
openssl s_client -connect sfo-vrli01.example.net:9543 -servername sfo-vrli01.example.net \
    -CAfile ca-chain.pem -verify_hostname sfo-vrli01.example.net -verify_return_error -brief </dev/nullCode language: PHP (php)

The second command must end with Verification: OK and show Protocol version: TLSv1.2 or TLSv1.3. Repeat for port 6514 and for each node name. Every node must present a certificate that’s valid for the VIP name.

Typical failures:

OutputMeaning
self-signed certificate in certificate chainYour -CAfile doesn’t contain the root, or you’re still looking at the default certificate
unable to get local issuer certificateThe intermediate is missing: neither the server sends it nor is it in ca-chain.pem
hostname mismatchThe VIP or node FQDN is missing from the certificate’s SANs
certificate has expired / not yet validCertificate dates, or a clock that is wrong

Build ca-chain.pem with the intermediate and the root in it, PEM, nothing else:

cat intermediate-ca.pem root-ca.pem > ca-chain.pem
openssl crl2pkcs7 -nocrl -certfile ca-chain.pem | openssl pkcs7 -print_certs -noout | grep subject

See my Certificate management with OpenSSL on Debian 13 guide for building and checking chains in depth.


5. Pick one configuration method

NSX has two ways to set a log server, and you should use only one:

MethodWhereScope
Node profileSystem โ†’ Fabric โ†’ Profiles โ†’ Node Profiles โ†’ All NSX Nodes โ†’ Syslog ServersPushed centrally to the nodes
Per-node CLI or APIset logging-server on each Manager and EdgeExactly the node you’re on

The node profile is convenient, but depending on the NSX version its UI doesn’t accept every combination of li-tls with a custom server CA. If both methods point at the same server, every event arrives twice and you pay for it in license and storage.

This guide uses the per-node CLI, which works on every 4.x version. Before you start, open the node profile and remove all syslog servers from it. If your version’s profile does accept LI-TLS with your CA, you may use it instead. Then skip sections 6 and 7, and use the checks in them.


6. NSX Managers

The setting is per node. It isn’t replicated across the manager cluster, so do this on sfo-m01-nsx01a, -nsx01b and -nsx01c.

6.1 Put the CA file on each node

The CLI only reads certificate files from the node’s file store, /image/vmware/nsx/file-store. Copy the file in with SCP as root, then fix its location and owner:

scp ca-chain.pem root@sfo-m01-nsx01a.example.net:/root/
ssh root@sfo-m01-nsx01a.example.netCode language: JavaScript (javascript)
install -m 0644 -o root -g www-data /root/ca-chain.pem /image/vmware/nsx/file-store/ca-chain.pem
rm /root/ca-chain.pem
ls -l /image/vmware/nsx/file-store/ca-chain.pem

If root SSH is disabled on your managers, as it should be outside maintenance windows, enable it temporarily (start service ssh and the root login in the CLI, or the console) and disable it again afterwards. Some versions also offer copy url scp://... in the admin CLI to fetch a file into the file store directly.

6.2 Set the log server

Log in as admin (the NSX CLI, not root) and run:

sfo-m01-nsx01a> set logging-server sfo-vrli01.example.net:9543 proto li-tls level info serverca ca-chain.pem
sfo-m01-nsx01a> get logging-serversCode language: CSS (css)
  • proto li-tls uses the CFAPI agent over TLS.
  • level info sends everything from informational up. debug floods the log server and isn’t needed day to day.
  • serverca names the file in the file store. The agent refuses servers whose certificate doesn’t chain to it.

No messageid filter here. You can limit the managers to certain message IDs (messageid SWITCHING,ROUTING,FABRIC,SYSTEM,POLICY,HEALTHCHECK,SHA,MONITORING) to save volume, but a filter that’s too narrow is exactly what’s missing when you investigate an incident. The audit trail of who changed which rule matters most. Filter in Aria Operations for Logs, not at the source.

6.3 Check the agent on the node

As root, the agent’s own log shows whether it uses TLS and whether the connection works:

ls -t /var/log/loginsight-agent/ | head -n1
grep -E 'proto|ssl|ssl_ca_path|port =|Connect' "/var/log/loginsight-agent/$(ls -t /var/log/loginsight-agent/ | head -n1)"Code language: JavaScript (javascript)

You’re looking for these lines, shortened:

Read config param [server].proto = cfapi
Read config param [server].hostname = sfo-vrli01.example.net
Read config param [server].ssl = yes
Read config param [server].ssl_ca_path = /config/vmware/nsx-node-api/syslog/<id>_ca.pem
Read config param [server].port = 9543
Connecting to server sfo-vrli01.example.net:9543
Connection to sfo-vrli01.example.net:9543 successfully establishedCode language: JavaScript (javascript)
  • ssl = yes with port 9543 means encrypted.
  • ssl_ca_path shows that NSX copied your CA file into its own configuration. The agent verifies against that copy, not against the file store.
  • Event storage is full. Stopping collection of new events right after start is normal when the server was unreachable before. It must be followed by Event storage is ready to accept data.

Is the agent in FIPS mode? The NSX agent runs with ssl_fips_mode on. The server certificate needs a FIPS-compatible key and signature (RSA 2048+ or ECDSA P-256/P-384, SHA-256 or better). The certificate from section 3 should be fine.

6.4 Check through the API

The same configuration is visible through each node’s API. It’s handy for checking all nodes from one script:

for n in sfo-m01-nsx01a sfo-m01-nsx01b sfo-m01-nsx01c; do
    echo "== $n"
    curl -s --cacert ca-chain.pem -u admin "https://$n.example.net/api/v1/node/services/syslog/exporters" \
        | jq -r '.results[] | "\(.server):\(.port) \(.protocol) \(.level)"'
doneCode language: PHP (php)

Each node must show exactly one line: sfo-vrli01.example.net:9543 LI-TLS INFO.


7. NSX Edges

Edges carry the gateway firewall, NAT, BGP and the Tier-0/Tier-1 service logs. They need the same configuration, on each edge node (sfo-m01-en01, sfo-m01-en02, and every edge you add later).

scp ca-chain.pem root@sfo-m01-en01.example.net:/root/
ssh root@sfo-m01-en01.example.net
install -m 0644 -o root -g www-data /root/ca-chain.pem /image/vmware/nsx/file-store/ca-chain.pem
rm /root/ca-chain.pemCode language: JavaScript (javascript)

As admin:

sfo-m01-en01> set logging-server sfo-vrli01.example.net:9543 proto li-tls level info serverca ca-chain.pem
sfo-m01-en01> get logging-serversCode language: CSS (css)

Check the agent log on the edge exactly as in section 6.3. The edge connects from its management interface (eth0), not from its TEP or uplinks, so the firewall rule from section 3 has to allow the edge management network.

From the managers, you can also read an edge’s configuration through the manager API. You need the edge’s transport node ID from System โ†’ Fabric โ†’ Nodes โ†’ Edge Transport Nodes:

curl -s --cacert ca-chain.pem -u admin \
  "https://sfo-m01-nsx01.example.net/api/v1/transport-nodes/<edge-node-id>/node/services/syslog/exporters" | jqCode language: HTML, XML (xml)

8. ESXi transport nodes

The distributed firewall runs in the ESXi kernel. Its logs (/var/log/dfwpktlogs.log), with rules that have logging enabled, go through the host’s syslog, not through NSX. For end-to-end encryption the hosts need syslog over TLS as well.

8.1 Trust the CA on the hosts

The ESXi syslog daemon checks the server certificate against the host’s certificate store. The simplest way is through vCenter: add your root and intermediate in vCenter โ†’ Administration โ†’ Certificates โ†’ Certificate Management โ†’ Trusted Root Certificates. vCenter distributes trusted roots to its hosts. Check that they arrived on one host:

esxcli system security certificatestore list | grep -i subjectCode language: PHP (php)

Without vCenter, add them per host, one certificate per file:

esxcli system security certificatestore add --filename=/tmp/root-ca.pem
esxcli system security certificatestore add --filename=/tmp/intermediate-ca.pemCode language: JavaScript (javascript)

8.2 Set the log host

For the whole cluster at once, with PowerCLI:

Get-Cluster sfo-m01-cl01 | Get-VMHost | ForEach-Object {
    Get-AdvancedSetting -Entity $_ -Name Syslog.global.logHost |
        Set-AdvancedSetting -Value 'ssl://sfo-vrli01.example.net:6514' -Confirm:$false
    $esxcli = Get-EsxCli -VMHost $_ -V2
    $esxcli.network.firewall.ruleset.set.Invoke(@{rulesetid = 'syslog'; enabled = $true})
    $esxcli.system.syslog.reload.Invoke()
}Code language: PHP (php)

Or per host, in the ESXi shell:

esxcli system syslog config set --loghost='ssl://sfo-vrli01.example.net:6514'
esxcli network firewall ruleset set --ruleset-id=syslog --enabled=true
esxcli system syslog reload
esxcli system syslog mark --message="TLS logging test from $(hostname)"Code language: PHP (php)

ssl:// means syslog over TLS. The mark message must show up in Aria Operations for Logs within seconds. If it doesn’t, /var/log/vmsyslogd.log on the host says why: usually certificate verification or the firewall.

If you use vSphere Configuration Profiles (vLCM-managed clusters on vSphere 8), set Syslog.global.logHost in the profile instead of per host. Otherwise remediation sets it back.


9. Verify on Aria Operations for Logs

Agents. In Administration โ†’ Management โ†’ Agents, all three managers and every edge must be listed, with a recent “last active” time:

Aria Operations for Logs, Administration โ†’ Agents: the NSX Manager nodes listed as connected agents
The NSX nodes appear as agents once CFAPI is connected

ESXi hosts don’t appear there, because they’re plain syslog sources. Find them in Explore Logs by hostname.

Every source, in one query. In Explore Logs, over the last 5 minutes, group the events by hostname. Each manager, edge and host must show up. A missing name is a node that isn’t configured, or one that’s failing.

Encryption. On the log server side, a connection on 9543 or 6514 is TLS by definition. The proof that nothing is still using the old ports is on the network: with 514 and 9000 blocked (section 3), a node that would fall back to them simply goes silent and shows up in the query above.

The NSX dashboards. The VMware NSX content pack dashboards (overview, distributed firewall, gateway firewall, audit) should fill within a few minutes. Make a test change in NSX, such as a comment on a firewall rule, and find it in the audit log.


10. Day-2 operations

EventWhat to do
Log server certificate renewed, same CANothing on NSX or ESXi. Run the openssl check from section 4 against the new certificate.
New CA or new intermediateDistribute the new chain before switching the server certificate: copy it to every Manager and Edge file store, re-run set logging-server ... serverca, add it to vCenter/ESXi trust. Then switch the server certificate.
New edge nodeSections 7 and 9. Put it in your edge deployment checklist; it doesn’t inherit the CLI setting.
New ESXi hostCovered by the configuration profile, or run section 8 for it
NSX upgradeAfterwards, get logging-servers on every node, and the agents list in section 9
Aria Operations for Logs node addedIts FQDN must be in the certificate’s SANs (section 3)
Removing a serverclear logging-servers on the node, or del logging-server with the same parameters as when you set it

Keep ca-chain.pem and the exact set logging-server command in your runbook. When a new edge is deployed at 2 a.m. for an incident, logging is the step that’s forgotten.

Monitor the monitoring. Create an alert in Aria Operations for Logs that fires when a known NSX node or host hasn’t sent anything for 15 minutes. A silent firewall is not a quiet firewall.


11. Troubleshooting

SymptomWhere to lookLikely cause
Node not in the agent list/var/log/loginsight-agent/liagent_*.logDNS, firewall on 9543, or certificate verification
Agent log: SSL handshake / certificate verify failedopenssl s_client from section 4CA file without the intermediate or root, SAN without the VIP, wrong clock
set logging-server rejects the serverca filels -l /image/vmware/nsx/file-store/File not in the file store, not PEM, or wrong name
Every event appears twiceNode profile and CLI both configuredRemove one (section 5)
ESXi mark message never arrives/var/log/vmsyslogd.log on the hostCA not in the host store, ruleset syslog not enabled, port 6514 blocked
DFW logs missing, everything else is thereRule logging off, or host syslog not configuredEnable Logging on the DFW rules that matter; section 8
Event storage is full keeps repeatingAgent logThe server isn’t reachable or doesn’t accept data: network, certificate, or the log cluster is overloaded
Logging stopped after an NSX upgradeget logging-serversRe-apply the configuration on that node

12. Checklist

  • โ˜ Log server certificate from your CA, SANs with the VIP and every node, full chain installed
  • โ˜ openssl s_client ... -verify_return_error says Verification: OK on 9543 and 6514
  • โ˜ NTP on all NSX nodes, ESXi hosts and log nodes
  • โ˜ Node profile syslog servers removed (or the node profile used exclusively)
  • โ˜ All three NSX Managers: ca-chain.pem in the file store, li-tls on 9543 with serverca, level info
  • โ˜ All Edges configured the same way
  • โ˜ ESXi hosts trust the CA and use ssl://sfo-vrli01.example.net:6514
  • โ˜ Ports 514 and 9000 to the log cluster blocked from the management networks
  • โ˜ All managers and edges in the agents list; every host found in Explore Logs
  • โ˜ NSX content pack installed, an audit test change is visible
  • โ˜ Alert for silent sources in place
  • โ˜ Runbook has the CA file, the commands and the “new edge” step