In below screenshots you can see an example of a data point in Grafana vs. Kibana. I cannot grasp how the values can be that different, especially seeing that the factor is not even a whole number.
You’re using a bucket script aggregation in Kibana but in Grafana only a sum with a script which is not the same thing. Grafana has support for bucket script aggregation since version 6.0 so would recommend you to upgrade. But one important thing to make sure when comparing Kibana and Grafana is that you’re using the same time interval. I can see that you’re using auto in Grafana and don’t know what the interval is in Kibana. To be able to compare make sure you’re using the same interval by specifying for example 1 minute in both Grafana and Kibana.