I'd like to ask if the following requirement is possible:
Basically I monitor the state of my database every 30 mins and sends details of database locks to ELK and stores it in a database-lock index. So every 30 mins I need to refresh the Kibana visualization and identify the status of old database locks that was previously captured and new ones that recently arrived in ELK. In my index I have a date field which indicates the date and time when the lock occurred.
What I need to know is how long has it been locked from this moment by comparing the lock occurrence date field to the current system date. I'm having a hard time searching for a way to compare my date field to the systems current date.
Are you looking for a Data Table or a chart of some type? The easiest way is to sort by Date on your lock occurrence date Field and time to get the latest and compare them. Let me know if this works, else we could try and help you with something else.
Yes, specifically I'm looking into using the new enhanced data table plugin. Lets say the system date time is 02/12/2018 08:00 PM so what I need is similar to the following:
ID | LOCK_DATE_TIME | RUN TIME
1 | 02/12/2018 7:00 PM| 60
2 | 02/12/2018 7:30 PM| 30
And so everytime I refresh this data table, the run time changes. I'm trying to figure out how to enable groovy as I think the functionality is available there but I've got no luck. I'm using Kibana 6.1
I've managed to get the current system date and put it in a scripted field, but when I try to subtract the system date to my lock date time I get an error like this when going to Discover page:
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.