The user interface displays the Meterics-PostDeployment failed
error message.
Problem
The system encountered an error while invoking post-deployment API calls after deploying the NSX Metrics feature.
Cause
After deploying the NSX Metrics feature, the system sends a post-deployment API request that invokes an API call to the NSX and ClusterApi pod on the NSX Application Platform. The system encountered an error
Solution
- Ensure that the system deployed the NSX Application Platform successfully.
- If you have access to the NSX Manager command line interface (CLI), use the following steps to investigate any errors recorded in the NSX Metrics logs. If you do not have access to the NSX Manager CLI, use the information provided in step 3.
- Log into the NSX Manager appliance as a root user.
- Mark the Kubernetes configuration for any subsequent helm and kubectl command invocation.
export KUBECONFIG=/config/vmware/napps/.kube/config
- Use the following command to verify that the system has deployed the Metrics helm chart successfully.
helm --namespace nsxi-platform list --all --filter 'metrics'
The STATUS property must display deployed.
- Use the following command to verify that the setup pods were deployed and completed successfully.
kubectl --namespace nsxi-platform get pods --selector='app.kubernetes.io/instance=metrics'
- Using the following command, inspect the logs of the
metrics-app-server
pod. ThePOD_NAME
starts withmetrics-app-server-*
for any exceptions or errors.kubectl --namespace nsxi-platform logs <POD_NAME>
- If you do not have access to the NSX Manager CLI, collect the NSX Application Platform support bundle using information in Collect the Support Bundles for the NSX Application Platform Using the UI. Inspect the support bundle logs for the TKG Cluster on Supervisor or upstream Kubernetes pods whose names start with metrics-app-server.
- Post-deployment calls
napp/api/v1/metrics/data-collection
APIGET
andPOST
allow you to read and set the source for the data collection. You can toggle the data collection on or off. If there was problem encountered and the post deployment API did finish successfully, you can manually see if the data collection attribute for some of the hosts are not turned on, and then turn them on as desired. - Additionally, the
/infra/sites/intelligence/registration GET
and/infra/sites/intelligence/registration/{cluster-id} POST
APIs are called as part of the post-deployment step. The output ofapi/v1/infra/sites/intelligence/registration
has an attributeis_metrics_enabled
, which should be set during deployment and is an indication that post-deployment completed successfully. If it is not set, then you can manually set the NSX Metrics feature on using the following information.- Invoke the
GET napp/api/v1/metrics/data-collection
command, which returns a JSON content, similar to the following.{ "metrics_toggle_nsx": true, "metrics_toggle_nsx_cloud_native": true, "metrics_toggle_nsx_config": false }
- Locate all of the flags that are set to false and toggle them to true. More specifically, ensure that the
metrics_toggle_nsx_config
andmetrics_toggle_nsx
attributes are set to true.{ "metrics_toggle_nsx": true, "metrics_toggle_nsx_cloud_native": true, "metrics_toggle_nsx_config": true
- Invoke the
POST napp/api/v1/metrics/data-collection
command using the modified body with flags set to true.
- Invoke the