Hallo everyone. I need heep in kibana. I want to write one Scripted field that converts Sessionlogontime(string) and gives me the result per day. i would be very proud if someone can offer me a solution. It is calculated like this in splunk
latest(SessionLogonTime) as BootTime
latest(HwModel) as HwModel
splitrow
host as Host
filter host in ("*")
| eval BootTime = strptime (BootTime,"%Y-%m-%d %H:%M:%S.%Q %z")
| eval Uptime = round ((now() - BootTime) / 86400, 2)
| stats
avg(Uptime) as AvgUptime
dc(Host) as "#Hosts"
by HwModel
| rename HwModel as "Hardware model"
| eval "Avg. uptime (days)" = round (AvgUptime, 1) | sort - "Avg. uptime (days)"