I want to make a panel that contains the host and the date of the last update, such as shown in the link. I used this, but I cannot place the date at the end in results.
host, count (sparkline), last update
host="*" | stats sparkline count by host
TRY LIKE THIS:
host="*" | stats sparkline count latest(_time) as "Last Update" by host| fieldformat "Last Update"=strftime('Last Update', "%c")
TRY LIKE THIS:
host="*" | stats sparkline count latest(_time) as "Last Update" by host| fieldformat "Last Update"=strftime('Last Update', "%c")
Use latest(_time) as "Last Update"
in your stats
.
That's an epoch timestamp which needs to be formatted for displaying to humans.
Hi, Martin
Thanks for you answer is good. but i have large numbers in last update: 1427301579
host="*" | stats sparkline count latest(_time) as "Last Update" by host
would have to add another command or have an idea that I can investigate to solve the number?
Thanks, Martin