I am playing around in Canvas and was trying to write an ESSQL query to show CPU usage. However, the timestamp shown is always in UTC time and i am unable to cast it to local time (SGT).
SELECT "@timestamp" as Time, system.cpu.user.pct*100 as "CPU USAGE" FROM "metricbeat-*" order by "@timestamp" DESC
This is my current query and how can i cast the UTC timestamp to + 8 hours?
I manually added 8 hours to timestamp to display the local time but i am not sure if this is proper or not...
SELECT CAST("@timestamp" AS DATETIME) + INTERVAL 8 HOURS AS result, system.cpu.user.pct*100 as "CPU USAGE" FROM "metricbeat-*" order by "@timestamp" DESC
Is there a proper method to do this? or my way is fine?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.