I'm trying to plot the duration open for some of my data. I initially converted the open and close times to UNIX data forms, then find the difference, then create a timechart for using the average duration open per day, for each specific error. This is up until the final pipe in the plot below and plots fine.
The issues come when I try and use fieldformat. Instead of the y-axis being in UNIX time format, I want it to be in days, hours, minutes and seconds formats and it will not plot that way. I have tried to use the tostring and strptime formats (see below), however it does not plot as I want.
This part is all good
index="special_index" sourcetype=* |
eval TimeOpenedAt = strptime('Data.opened_at', "%Y-%m-%d %H:%M:%S")|
eval TimeClosedAt = strptime('Data.closed_at', "%Y-%m-%d %H:%M:%S") |
eval TimeToCloseUNIX = TimeClosedAt - TimeOpenedAt |
bin _time span=1d |
timechart avg(TimeToCloseUNIX) as TimeToCloseUNIXAvg by ErrorType |
What I have tried
Any help would be gratefully appreciated!
... View more