# Filebeat with minimal security on ELK

**URL:** https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [November 24, 2021, 2:55pm UTC](https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088 "2021-11-24T14:55:29Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Lavandael](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavandael/32/97533_2.png) [@Lavandael](https://discuss.elastic.co/u/Lavandael)
#### Post date: [November 24, 2021, 2:55pm UTC](https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088/1 "2021-11-24T14:55:29Z")

</div>

Hello everyone,

I am using one ELK stack into only one Centos server.  
I tried to follow this tutorial :  
[security-minimal-setup](https://www.elastic.co/guide/en/elasticsearch/reference/7.12/security-minimal-setup.html)

So i added this

```auto
xpack.security.enabled: true
discovery.type: single-node

```

into the **Elasticsearch.yml**

and this  
`elasticsearch.username: "kibana_system"`  
into the **kibana.yml**

It works well into the kibana, i can log in with now one user "elastic"

But it's going wrong with filebeat on my client server which can no more send logs to Elasticsearch.  
Does i have to add something into the filebeat configuration ?

```auto
setup.kibana:
  host: "10.1.24.194:5601"

output.elasticsearch:
  hosts: ["10.1.24.194:9200"]
  protocol: "https"

```

Many thanks !

---

<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: [November 24, 2021, 8:54pm UTC](https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088/2 "2021-11-24T20:54:29Z")

</div>

> [@Lavandael](#):
>
> Does i have to add something into the filebeat configuration ?
> 
> ```auto
> 
> ```

Yes, you will need to add a username and password. Check out the **Basic authentication** section here - [Configure the Elasticsearch output | Filebeat Reference [8.11] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html)

---

<div class="post-metadata">

### Author: ![Lavandael](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavandael/32/97533_2.png) [@Lavandael](https://discuss.elastic.co/u/Lavandael)
#### Post date: [November 25, 2021, 1:43pm UTC](https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088/3 "2021-11-25T13:43:03Z")

</div>

Thanks for the help, i tried to follow the doc

Here's the configuration on the filebeat client

```auto
output.elasticsearch:
  hosts: ["10.1.24.194:9200"]
  protocol: "https"
  username: "filebeat_writer"
  password: "Fil3b3ower"
  setup.ilm.check_exists: false

```

I did this after  
[privileges-to-publish-events](https://www.elastic.co/guide/en/beats/filebeat/current/privileges-to-publish-events.html)  
with an new role and one new user linked to this role "filebeat\_writer"

It still not working after  
systemctl restart elasticsearch && systemctl restart kibana

I got this error on the filebeat client log:

> eslegclient/connection.go:253 Ping request failed with: Get "[https://10.1.24.194:9200](https://10.1.24.194:9200)": dial tcp 10.1.24.194:9200: connectex: Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée.

---

<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: [November 25, 2021, 10:59pm UTC](https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088/4 "2021-11-25T22:59:59Z")

</div>

That suggests that there's something blocking Filebeat.

---

<div class="post-metadata">

### Author: ![Lavandael](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavandael/32/97533_2.png) [@Lavandael](https://discuss.elastic.co/u/Lavandael)
#### Post date: [November 26, 2021, 1:36pm UTC](https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088/5 "2021-11-26T13:36:45Z")

</div>

> [@Lavandael](#):
>
> ```auto
> xpack.security.enabled: true
> discovery.type: single-node
> 
> ```

if i don't use

> xpack.security.enabled: true

nothing block and it works very well for filebeat, any idea ?

---

<div class="post-metadata">

### Author: ![Lavandael](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavandael/32/97533_2.png) [@Lavandael](https://discuss.elastic.co/u/Lavandael)
#### Post date: [December 6, 2021, 7:39am UTC](https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088/6 "2021-12-06T07:39:46Z")

</div>

Hello everyone, if any ideas, help, you are very welcome 🙂

---

<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: [January 3, 2022, 7:39am UTC](https://discuss.elastic.co/t/filebeat-with-minimal-security-on-elk/290088/7 "2022-01-03T07:39:51Z")

</div>

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