# Calculate delta between two ingestions

**URL:** <https://discuss.elastic.co/t/calculate-delta-between-two-ingestions/295938>\
**Category:** Kibana\
**Created:** [February 1, 2022, 11:18am UTC](https://discuss.elastic.co/t/calculate-delta-between-two-ingestions/295938 "2022-02-01T11:18:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![javidr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javidr/32/136982_2.png) [@javidr](https://discuss.elastic.co/u/javidr)\
**Post date:** [February 1, 2022, 11:18am UTC](https://discuss.elastic.co/t/calculate-delta-between-two-ingestions/295938/1 "2022-02-01T11:18:32Z")

</div>

Hi

Is it possible to validate the difference between two different ingestions (based on timestamp)?

It is, i am ingesting some data from my IOT devices, as temperature, humidity, particulate matter (air quality level) etc... every 10 minutes

What i want to do is compare the current data against the previous one and see how things have changed

Would be possible to do this?

Thanks

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [February 1, 2022, 12:05pm UTC](https://discuss.elastic.co/t/calculate-delta-between-two-ingestions/295938/2 "2022-02-01T12:05:05Z")

</div>

The only way (if you use logstash for example) is to query Elasticsearch in the filter to get last event ...

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [February 1, 2022, 1:37pm UTC](https://discuss.elastic.co/t/calculate-delta-between-two-ingestions/295938/3 "2022-02-01T13:37:48Z")

</div>

Is there any reason to do it in Elasticsearch?  
I suppose it is better to do on the client side.

If you want to know just there is some difference or not, you can use [fingerprint processor](https://www.elastic.co/guide/en/elasticsearch/reference/current/fingerprint-processor.html) to add fingerprint to each docs.

---

<div class="post-metadata">

**Author:** ![javidr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javidr/32/136982_2.png) [@javidr](https://discuss.elastic.co/u/javidr)\
**Post date:** [February 1, 2022, 2:29pm UTC](https://discuss.elastic.co/t/calculate-delta-between-two-ingestions/295938/4 "2022-02-01T14:29:41Z")

</div>

That would not work i think...I want to have the flexibility to calculate the difference, like saying, in the last hour the temperature inreased in 2C, or things like that, comparing against an existing ingested document

So, the recommendation is to call elastic API to retrieve the value i want for the given timestamps and do the calculation, right?

Thanks

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [February 1, 2022, 2:39pm UTC](https://discuss.elastic.co/t/calculate-delta-between-two-ingestions/295938/5 "2022-02-01T14:39:48Z")

</div>

Yes, go ahead

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 1, 2022, 2:40pm UTC](https://discuss.elastic.co/t/calculate-delta-between-two-ingestions/295938/6 "2022-03-01T14:40:41Z")

</div>

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