# Running multiple pipelines and a single pipeline triggered with shell script simultaneously

**URL:** <https://discuss.elastic.co/t/running-multiple-pipelines-and-a-single-pipeline-triggered-with-shell-script-simultaneously/338441>\
**Category:** Logstash\
**Created:** [July 14, 2023, 8:36pm UTC](https://discuss.elastic.co/t/running-multiple-pipelines-and-a-single-pipeline-triggered-with-shell-script-simultaneously/338441 "2023-07-14T20:36:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PodarcisMuralis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/podarcismuralis/32/122606_2.png) [@PodarcisMuralis](https://discuss.elastic.co/u/PodarcisMuralis)\
**Post date:** [July 14, 2023, 8:36pm UTC](https://discuss.elastic.co/t/running-multiple-pipelines-and-a-single-pipeline-triggered-with-shell-script-simultaneously/338441/1 "2023-07-14T20:36:31Z")

</div>

Hi.

I have 5 pipelines already running on linux server.  
The conf files are listed in a pipeline.yml and it has already been started with sudo systemctl start logstash, up and running.

I created another single pipeline (single.conf) and a shell script which triggers execution of single.conf. I want to set a cron job and execute shell script once in a day.

Now the problem is, if i start shell script, it triggers single.conf but logstash is already running and it doesn't work.

Do you have any suggestions?  
Thanks.

---

<div class="post-metadata">

**Author:** ![PodarcisMuralis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/podarcismuralis/32/122606_2.png) [@PodarcisMuralis](https://discuss.elastic.co/u/PodarcisMuralis)\
**Post date:** [July 18, 2023, 7:48am UTC](https://discuss.elastic.co/t/running-multiple-pipelines-and-a-single-pipeline-triggered-with-shell-script-simultaneously/338441/2 "2023-07-18T07:48:22Z")

</div>

I solved this problem and it works fine.

Cron job triggers shellscript.sh

```auto
** * * * export LOGSTASH_KEYSTORE_PASS=your_pass_here && cd /etc/logstash/config/ && /bin/bash .sh > /etc/logstash/config/output.log 2>&1

```

And I defined my single.conf pipeline in shellscript:

```auto
"${LOGSTASH_BIN}" -f "${LOGSTASH_CONFIG}" --path.data="${DATA_PATH}"

```

It is important to create a folder as a new path.data for this purpose and give the rights with chmod +x.

Logstash uses /logstash/data as default even if path.data is not set in logstash.yml.

In single.conf, you can set your normal input, filter and output.

---

<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:** [August 15, 2023, 7:49am UTC](https://discuss.elastic.co/t/running-multiple-pipelines-and-a-single-pipeline-triggered-with-shell-script-simultaneously/338441/3 "2023-08-15T07:49:03Z")

</div>

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