HCX 4.9.1 or earlier.
NSX 4.x
This is due to a flag change in the NSX overlay segments
The issue is resolved in HCX version 4.10.
Workaround for HCX 4.9.1 or earlier:
Steps to enable MON using API.
Log in to HCX hybridity page https://<hcx-manager-ip> and navigate to Network Extension.
Open the developer tools on the browser.
Select Network -> XHR and l2E from the name window and collect the information from the Response tab related to the L2E that MON needs to be enabled.
Copy the whole response output to a "Notepad ++" and search for the VLANID and its corresponding stretchId that you want to enable MON.
Next, use the Update Network Extension API to enable/Disable the MON.
Navigate to Network Extension API in the HCX API explorer using the following URL: https://<hcx-FQDN>/hybridity/docs/index.html
Select the HCX Connector from the drop down.
Select Network Extension as shown in the screenshot below
Replace api.example.com with the ip or FQDN of the HCX manager
Go to Authorize, select PUT, and click Try it out.
Click on Authorize and key in the x-hm authorization token.
Fill out the information(All the fields), including the server name and Extension ID.
Here, extension ID should be the stretch ID that was noted earlier.
Ensure that in the Request body - Schema, all details are filled properly with the same format and alignment.
"mobilityOptimizedNetworking": true
tail -f /common/logs/admin/app.log
Once the MON feature is enabled on the segment, you may need to enable MON for individual VMs