...
Code Block |
---|
if (doc['loglevel.keyword'].value != "INFO") { DateTimeFormatter ft = DateTimeFormatter.ofPattern("YYYY-MM-dd HH:mm:ss.SSS"); Instant from_instant = Instant.ofEpochMilli(doc['Timestamp'].value - 60000); Instant to_instant = Instant.ofEpochMilli(doc['Timestamp'].value + 5000); ZonedDateTime from_z = from_instant.atZone(ZoneId.of("UTC")); ZonedDateTime to_z = to_instant.atZone(ZoneId.of("UTC")); String from_ts = from_z.format(ft); String to_ts = to_z.format(ft); String ReqId = doc['RequestId.keyword'].value; String URL = "http://10.147.58.138:5601/app/kibana#/dashboard/105a83d0-215e-11e8-a744-95cec6f8f1a4?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:'" + from_ts + "',mode:absolute,to:'" + to_ts + "'))&_a=(description:'',filters:!(),options:(darkTheme:!f),query:(query_string:(analyze_wildcard:!t,query:'RequestId:%20%22" + ReqId + "%22')),timeRestore:!f,viewMode:view)"; return URL; } |
Import Kibana Dashboards/Visualizations
...