Kibana Visualization error >> Esaags error - Bad Request

Hi, i'm trying to build a visualization with a scripted field, but everytime it shows above error with no details.

There is no other info apart from :
kibana Visualization error >> Esaags error - Bad Request

It displays perfectly for a scripted field, however if i choose filter buckets for aggregation, it shows error.

Went in Network - Inspect - Just 400 error is given

Any reason why this happens?

Hello, What Kibana version are you using? Which visualization type (tsvb, etc)? Could you share some screenshots of what you're trying to achieve?


Below screenshot:

Kibana Version : 7.9.0
Visualization Used : Pie Chart.
Field : Scripted Field.
The visualization works for terms aggregation, but throws error for Filters - Buckets aggregation.

As you can see if I use split -slices -filters, it throws an error.
However if I use Split -slices -terms it does not throw error.

The error also is not specific as you can see...
Just notification of esaggs Error.

Please help.

I tried to reproduce it both with numerical and string scripted fields on versions 7.16.3 and 7.10.0 and couldn't reproduce. Is there anything special about your scripted field? (type, formatting)

Could you upgrade to at least 7.10?
string scripted field 7.16

numerical scripted field 7.10:

Can it be the same problem as here? "every log has the same field. I have added a condition to check whether there is that field and this is solved."

Figured it out....

It was issue in scripted field.

Basically , in scripted field I had used only if ...else if condition and had left out else condition.

Values were coming out correctly but were causing issues in visualization.
I corrected and added the else condition and now it is coming ..

The scripted fields have to be correct or else they give error in different places.

1 Like

Great, thanks for publishing the correct response!

1 Like

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