Can't Use Scripted Field in Visualization with Date Histogram

Hi, I currently have a scripted field that is calculating total CPU percentage used while accounting for number of cores from metricbeat. Below is the setup for the scripted field.

This works as expected, and shows up in Discover as shown below:

image

I can even visualize it by selecting the field on the left from the discover tab and clicking Visualize:

image

Which results in this:

However, once I switch the aggregation to be Max on the field and to use a Date Histogram vice a term, the visualiztion goes blank:

This would be a handy thing to be able to do for some dashboards I'm putting together at the request of my boss, but I can't figure it out.

Hi,

sorry for the very late reply.

If you haven't solved the issue yet, I have the following questions: you seem to have selected a small time range in the date picker. Are you sure there is data at all (having that field) within the selected time range. So could you maybe change the Max aggregation in the bottom chart to a simple count and check whether there are documents.

Cheers,
Tim

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