# How to get sql\_last\_value from last\_run\_metadata\_path every time

**URL:** <https://discuss.elastic.co/t/how-to-get-sql-last-value-from-last-run-metadata-path-every-time/204582>\
**Category:** Logstash\
**Created:** [October 22, 2019, 6:52am UTC](https://discuss.elastic.co/t/how-to-get-sql-last-value-from-last-run-metadata-path-every-time/204582 "2019-10-22T06:52:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olivia5](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olivia5/32/56302_2.png) [@Olivia5](https://discuss.elastic.co/u/Olivia5)\
**Post date:** [October 22, 2019, 6:52am UTC](https://discuss.elastic.co/t/how-to-get-sql-last-value-from-last-run-metadata-path-every-time/204582/1 "2019-10-22T06:52:02Z")

</div>

just the pipeline starts up, sql\_last\_value will be reading from the file(last\_run\_metadata\_path).  
so logstash is running, cant get change value from the file. ( There is a shell timing script that initializes values every day. I want logstash to read. So I have to use the logstash restart every time to read the new value. ) help

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 22, 2019, 2:39pm UTC](https://discuss.elastic.co/t/how-to-get-sql-last-value-from-last-run-metadata-path-every-time/204582/2 "2019-10-22T14:39:06Z")

</div>

You can enable --config.reload.automatic so that logstash will restart a pipeline every time its configuration changes. Set path.config to (for example) /home/user/conf/foo\*.conf and put your actual configuration into /home/user/conf/foo.conf, then have your shell script append a blank line to /home/user/fooBlank.conf every time it runs. This will cause logstash to restart the pipeline and re-read last\_run\_metadata\_path.

---

<div class="post-metadata">

**Author:** ![Olivia5](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olivia5/32/56302_2.png) [@Olivia5](https://discuss.elastic.co/u/Olivia5)\
**Post date:** [October 23, 2019, 3:55am UTC](https://discuss.elastic.co/t/how-to-get-sql-last-value-from-last-run-metadata-path-every-time/204582/3 "2019-10-23T03:55:05Z")

</div>

it worked. thank you:heartpulse:

---

<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:** [November 20, 2019, 4:56am UTC](https://discuss.elastic.co/t/how-to-get-sql-last-value-from-last-run-metadata-path-every-time/204582/5 "2019-11-20T04:56:09Z")

</div>

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