I was trying to create a metric visualization to show when was the last time server health is checked
Max(DateTime) really doesnot make more sense to user,so i created the scripted field "LastCheckInHumanReadableFormat" with the following configuration and use this scripted field to create visualization.
My guess is the following: Your field LastCheck contains a Date and Java returns the milliseconds since 01.01.1970 for this as this is the way the Date class stores it internally. Therefore, you receive 51 years which would be correct.
What you want is to calculate the time difference between now and the LastCheck and to return this in a human readable form.
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.