Hello,
I’m trying to understand how unwrap works.
{"timestamp":"2021-10-10T15:08:54.408395+0300", "uptime":1}
{"timestamp":"2021-10-10T15:09:54.408395+0300", "uptime":3}
{"timestamp":"2021-10-10T15:10:54.408395+0300", "uptime":5}
{"timestamp":"2021-10-10T15:11:54.408395+0300", "uptime":10}
{"timestamp":"2021-10-10T15:12:54.408395+0300", "uptime":15}
{"timestamp":"2021-10-10T15:13:54.408395+0300", "uptime":22}
So I have this kind of json log generated by promtail fed into loki. My question is I’m trying to graph this uptime yet no luck. Tried the following:
{job="myjob"} | json | unwrap uptime | __error__="" [1m]
but it seems I need to apply a function to it. Assume uptime is metric in time.
thanks,
evrim.