Hi,
I want to generate a URL for a kibana dashboard that pre-loads a specific time range, I have the time in time format when event occured and i want to display 2h less and 2h plus that time
Is there some way to generate it?
I can generate:
Datemath can't be mixed with static dates like this, you will have to do that calculation wherever you are generating those urls.
In Javascript for example it would work like this:
// give me the time four hours ago
const date = new Date("2020-03-13T15:34:19Z");
date.setHours(date.getHours() - 4);
const updatedISOString = date.toISOString();
Thanks Joe! i'm using elastalert and was trying to generate a URL in the email alert to take the notified person to see the information, dont think i can use javascript in elastalert
Kibana doesn’t support the full datemath Elasticsearch does, but from what I can tell this specific thing should work (haven’t tested though). Sorry for my initial misleading answer, I was pretty certain that specific syntax was Elasticsearch only, but I’m not so sure anymore.
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.