# Need advice for ELK

**URL:** https://discuss.elastic.co/t/need-advice-for-elk/179846
**Category:** Beats
**Tags:** metricbeat
**Created:** [May 6, 2019, 9:39pm UTC](https://discuss.elastic.co/t/need-advice-for-elk/179846 "2019-05-06T21:39:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zenimagine](https://avatars.discourse-cdn.com/v4/letter/z/3bc359/32.png) [@zenimagine](https://discuss.elastic.co/u/zenimagine)
#### Post date: [May 6, 2019, 9:39pm UTC](https://discuss.elastic.co/t/need-advice-for-elk/179846/1 "2019-05-06T21:39:55Z")

</div>

Hello, I just installed ELK on my server by following the tutorial [https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04) and I have some questions:

- what is the difference between the command :

`# sudo metricbeat setup --template -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]'`  
`# sudo metricbeat setup -e -E output.logstash.enabled=false -E output.elasticsearch.hosts=['localhost:9200'] -E setup.kibana.host=localhost:5601`

and

`# metricbeat setup -e`

- if I monitor multiple servers, how does it work ? Should you create multiple indexes ?

---

<div class="post-metadata">

### Author: ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)
#### Post date: [May 9, 2019, 8:26am UTC](https://discuss.elastic.co/t/need-advice-for-elk/179846/2 "2019-05-09T08:26:03Z")

</div>

Only just started experimenting with `metricbeat` so in no way an expert 🙂

> [@zenimagine](#):
>
> # metricbeat setup -e

Starting `metricbeat` without any arguments means it uses _defaults_ for Kibana host and output (which I think is Elasticsearch). The assumption is that both Kibana and Elasticsearch is on the same host (localhost) and are listening on their default ports.

> [@zenimagine](#):
>
> if I monitor multiple servers, how does it work ?

When you monitor several machines with `metricbeat` you are probably sending the metrics to a central Elastic Stack setup. This means you have to change _localhost_ in the `metricbeat` config to wherever Kibana and Elasticsearch is.

> [@zenimagine](#):
>
> Should you create multiple indexes ?

You should be able to use a shared index for all `metricbeat` metrics. Usually you would have a rotating daily index. This is the default and `metricbeat`will do that by default if it connects directly to Elasticsearch. If you go through Logstash, you might have to configure it separately.

Hope that helps.

---

<div class="post-metadata">

### Author: ![zenimagine](https://avatars.discourse-cdn.com/v4/letter/z/3bc359/32.png) [@zenimagine](https://discuss.elastic.co/u/zenimagine)
#### Post date: [May 9, 2019, 12:38pm UTC](https://discuss.elastic.co/t/need-advice-for-elk/179846/3 "2019-05-09T12:38:50Z")

</div>

Thanks for these informations. I did not manage to monitor other servers. I opened 2 new questions :

> [@How to connect two servers to Filebeat?](https://discuss.elastic.co/t/how-to-connect-two-servers-to-filebeat/180162):
>
> I have 2 servers HTTPS with let's Encrypt : [monitoring.example.com](http://monitoring.example.com) with ELK (IP: 11.11.111.111) [www.example.com](http://www.example.com) with my site in production (IP: 22.22.222.222) To install and configure ELK, I followed this tutorial : On the server [monitoring.example.com](http://monitoring.example.com) I have this configuration : $ sudo nano /etc/nginx/sites-available/monitoring-example-com server { listen 80 default\_server; listen [::]:80; server\_name monitoring.example.com; location / { return 301 https://mon…

> [@How to monitor two servers with Metricbeat?](https://discuss.elastic.co/t/how-to-monitor-two-servers-with-metricbeat/180052):
>
> I have a two servers : SERVER\_1 with ELK ([https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04)) ELK is accessible from a subdomain and protected with a Nginx password. SERVER\_2 with my Drupal site I configured Elasticsearch : $ sudo nano /etc/elasticsearch/elasticsearch.yml I replaced the line #network.host: 192.168.0.1 by network.host: localhost On SERVER\_1 I installed Metricbeat with the following commands : $…

---

<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: [June 6, 2019, 12:38pm UTC](https://discuss.elastic.co/t/need-advice-for-elk/179846/4 "2019-06-06T12:38:50Z")

</div>

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