NSX Application Platform Metrics Time-Series API may not show latest status for 'is_status' metrics
search cancel

NSX Application Platform Metrics Time-Series API may not show latest status for 'is_status' metrics

book

Article ID: 327334

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Symptoms:
- NSX is deployed with NSX Application Platform version 4.1.1 (NAPP versions prior to 4.1.1 did not have status metrics).
- For the NSX Application Platform 4.1.1, time-series API https://<mgr-ip>/napp/api/v1/metrics/data, if the query is for 'is_status' metric_key, and if API request does not specify start_time and end_time, only 12 data-points are returned. So, if there are more than 12 transitions for this resource_id for this key, it will not show the latest transitions in the API output.

Resolution

This is a known issue impacting NSX Application Platform 4.1.1.

Workaround:
Always specific start_time and end_time when querying 'is_status' metrics in time-series API.

Step 1. Get the current epoch time from https://www.epochconverter.com/

Step 2. Run the metrics API and provide start_time and end_time for particular key and resource_type.

Let's say the current epoch time is 1690966500(Wednesday, 2 August 2023 08:55:00 GMT) then an example request to get last 12 hour status metrics would be:

POST https://<mgr-ip>/napp/api/v1/metrics/data

{
    "start_time": 1690923300, // Tuesday, 1 August 2023 20:55:00 GMT 
    "end_time": 1690966500, // Wednesday, 2 August 2023 08:55:00 GMT
    "resource_type":"PolicyEdgeNode",
    "resource_ids":["<intent-path>"],
    "keys":["tn.admin_status"]]
}

Additional Information

Impact/Risks:
Latest status not visible in the API output, will lead the user to interpreting incorrect latest status for the key.