# Reporting on success of firmware upgrades for embedded devices

**URL:** <https://discuss.elastic.co/t/reporting-on-success-of-firmware-upgrades-for-embedded-devices/81834>\
**Category:** Elasticsearch\
**Created:** [April 10, 2017, 2:28pm UTC](https://discuss.elastic.co/t/reporting-on-success-of-firmware-upgrades-for-embedded-devices/81834 "2017-04-10T14:28:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gavin\_Hamill](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gavin_hamill/32/17203_2.png) [@Gavin\_Hamill](https://discuss.elastic.co/u/Gavin_Hamill)\
**Post date:** [April 10, 2017, 2:28pm UTC](https://discuss.elastic.co/t/reporting-on-success-of-firmware-upgrades-for-embedded-devices/81834/1 "2017-04-10T14:28:42Z")

</div>

Hi,

I'm trying to put together a dashboard / alerts to check on the success rate of firmware upgrades for some embedded devices. I want to display the results with Grafana but I can't quite figure out the logic.

In short, the device will (through an HTTP RESTful service) write an ES document just before the firmware upgrade starts (device ID, timestamp, version number) and then write another document after it comes back online a few minutes later.

I want to find the number of devices which have not come back online within, say, five minutes.

How might I do that?

Cheers,  
Gavin.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 11, 2017, 9:14am UTC](https://discuss.elastic.co/t/reporting-on-success-of-firmware-upgrades-for-embedded-devices/81834/2 "2017-04-11T09:14:01Z")

</div>

Hey,

wouldnt this be much easier, if the process updated the same document (about an upgrade process), that has something like a status field, that contained a value like `STARTED` (after the first request) and `FINISHED` after the second? Then a query with a range of the last 5 minutes and the status started could easily answer your question.

You could also try something like parent child or join two documents together on the client side, but this seems the easiest way (from the information I read so far).

--Alex

---

<div class="post-metadata">

**Author:** ![Gavin\_Hamill](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gavin_hamill/32/17203_2.png) [@Gavin\_Hamill](https://discuss.elastic.co/u/Gavin_Hamill)\
**Post date:** [April 11, 2017, 9:28am UTC](https://discuss.elastic.co/t/reporting-on-success-of-firmware-upgrades-for-embedded-devices/81834/3 "2017-04-11T09:28:21Z")

</div>

Ha - I actually decided on updating an existing document yesterday, but couldn't see a way to delete my original post. Thanks for letting me know I'm on the right path 🙂

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 11, 2017, 9:53am UTC](https://discuss.elastic.co/t/reporting-on-success-of-firmware-upgrades-for-embedded-devices/81834/4 "2017-04-11T09:53:14Z")

</div>

Better to leave it so it helps others in future 🙂

---

<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:** [May 9, 2017, 10:05am UTC](https://discuss.elastic.co/t/reporting-on-success-of-firmware-upgrades-for-embedded-devices/81834/5 "2017-05-09T10:05:57Z")

</div>

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