# How to increase the number of filebeat servers in stages

**URL:** https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853
**Category:** Logstash
**Created:** [March 31, 2021, 1:51am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853 "2021-03-31T01:51:17Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)
#### Post date: [March 31, 2021, 1:51am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/1 "2021-03-31T01:51:17Z")

</div>

We are currently trying to increase the number of servers we log using filebeat and logstash in stages.

Filebeat can be installed on a new logging server, and logstash can send logs to the installed server.  
logstash is already installed on the server, we can send the logs to it.  
What is the recommended procedure for a logstash that is already running?

Just editing the logstash config file will not enable the newly added filebeat.  
I ran logstash again, specifying the edited config file.

```auto
/usr/share/logstash/bin/logstash -f /etc/logstash/logstash-sample.conf &

```

At this time, I get the message "logstash is already running", so the logstash with the added configuration will not simply run.  
I've tried stopping logstash, killing the process, and then running it again, but  
I don't think this is a good idea.

Please let me know what I can do.

---

<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: [March 31, 2021, 2:11am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/2 "2021-03-31T02:11:41Z")

</div>

Can you elaborate more on why you need to restart Logstash to enable Filebeat?

---

<div class="post-metadata">

### Author: ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)
#### Post date: [March 31, 2021, 2:23am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/3 "2021-03-31T02:23:27Z")

</div>

I felt that logstash was not able to reflect the new settings.

I wrote the configuration for the newly added filebeat logs in the logstash configuration file that was already running and saved it.

By itself, it did not reflect the new settings and I could not get any logs.

Is it not also necessary to restart logstash?

---

<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: [March 31, 2021, 2:41am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/4 "2021-03-31T02:41:22Z")

</div>

What config changes did you make?

---

<div class="post-metadata">

### Author: ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)
#### Post date: [March 31, 2021, 2:47am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/5 "2021-03-31T02:47:54Z")

</div>

This is the addition of the index for sending to elasticsearch.  
Specifically, I added the following description.

```auto
output {
  ... snip ...
  else if( [tags][0] == "cas" or "cas" in [log][file][path] ) {
    elasticsearch {
      hosts => ["localhost"]
      index => "cas-error-%{+YYYY.MM.dd}"
    }
  }
  ... snip ...
}

```

We plan to add more filter descriptions, but at this stage we have not yet done so.

---

<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: [March 31, 2021, 2:51am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/6 "2021-03-31T02:51:38Z")

</div>

Righto, ok then.  
You might want to look at the `-r` flag [Running Logstash from the Command Line | Logstash Reference [7.12] | Elastic](https://www.elastic.co/guide/en/logstash/current/running-logstash-command-line.html).

---

<div class="post-metadata">

### Author: ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)
#### Post date: [March 31, 2021, 3:02am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/7 "2021-03-31T03:02:03Z")

</div>

Does your suggestion indicate that if I run the following command line, the edits to the config file will be reflected in logstash after it is saved?

```auto
/usr/share/logstash/bin/logstash -f /etc/logstash/logstash-sample.conf --config.reload.automatic &

```

If so, that's what I'm hoping for!

---

<div class="post-metadata">

### Author: ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)
#### Post date: [March 31, 2021, 3:26am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/8 "2021-03-31T03:26:02Z")

</div>

How can I add the --config.reload.automatic option to a logstash that is already running?

---

<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: [March 31, 2021, 3:44am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/9 "2021-03-31T03:44:45Z")

</div>

You need to stop it and rerun it with that flag.

---

<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: [April 28, 2021, 3:45am UTC](https://discuss.elastic.co/t/how-to-increase-the-number-of-filebeat-servers-in-stages/268853/10 "2021-04-28T03:45:45Z")

</div>

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