1 Reply Latest reply on Apr 25, 2016 3:29 PM by Sarah Xu

    TSI API - How to normalize epoch time (timestamp) to current Time Zone?

    Karlis Peterson

      I am integrating performance data from a monitoring source (e.g. BPPM or TSIM) using REST API. I simply pass the epoch value that I collect every 5 minutes from the source tool into the JSON body of the Measures API. I notice that that the date is based on different timezone (maybe GMT). How should I handle the epoch so that it is based on my timezone, such as EST or CST?

       

      Here is a SAMPLE JSON Body for a measures:

       

      Formatted JSON Data

         "source":"172.21.97.150",

         "metric":"TSIM..VMware_CPU_Container..CPU_Total_Util",

         "measure":0.0395,

         "timestamp":1461327641,

         "metadata":{ 

            "app_id":"CBNA",

            "source_type":"ESXi"

         }

      }

       

      The actual time reflected in the source tool is:  4/22/2016 12:28:46 PM CST

      1461327641 = 4/22/2016 15:28:46 GMT

       

      This is what I see in the TSI UI .. appears to be a GAP in the graph with current time (click to enlarge image):

      Measures_Graph.png

       

      Please provide best practices on how I should handle epoch? Should I transform it before sending? What would you suggest?

       

      Thank you.

       

      KP