Converting x axis values from UTC epoch to date time

Dear community,

I have x axis values in a kibana histogram plot that are UTC epoch (in nano sec). These x values are hardly usable. It would help if I can convert them to sec. Even better is if I can convert them to date time.
x-axis-vals-utc-epoch-ns

Any ideas are appreciated.

Thanks

How is your field indexed? Got to "Stack Management" -> "Index Patterns" and select your index pattern. Find your field. It should be mapped as "date". If its not, then that is why the value is not being displayed as a date and is instead being displayed as a number.

How is your data ingested? You may need to re-ingest your data and map the field to a date field

Hi Nathan,

Thanks for your response.

It is mapped as Number Field (and I was aware of that).

So if it is mapped as a number field is not possible to apply a mathematical formula to convert it to some readable date format?

For e.g. it would help me if I can pick the first timestamp and deduct it from all following ones so that the chart starts with zero. That would be much more readable than the way it currently is (see screenshot) currently

It is after all possible to apply a mathematical formula on the y axis as shown here to convert nano sec to sec.
scaling y axis

Thanks in advance.

Why are you mapping the value as a number instead of a date? In order to properly format the value as a date, it needs to mapped as be date type.

Hi Nathan,

Unfortunately, this is data I have no control on. It is being ingested this way by different people.

Again: is not possible to simply a mathematical conversion? If it is easier just let me know how I can scale the values (convert from nano sec to sec) and even better scale and deduct the first value in the plot so that the plot starts with 0. The following didn't do the job:
{ "script" : "doc['startTime'].value/1000000000" }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.