You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Elastic Stack, formerly known as the ELK Stack, is a powerful suite of open-source tools designed for real-time data search, analysis, and visualization. It offers comprehensive capabilities for collecting, processing, and visualizing large volumes of data.
19
-
Its components are:
18
+
The Elastic Stack, formerly known as the ELK Stack, is a powerful suite of open-source tools designed for real-time data search, analysis, and visualization. It offers comprehensive capabilities for collecting, processing, and visualizing large volumes of data. Its components are:
20
19
21
-
-**[Elasticsearch](https://www.elastic.co/elasticsearch)** A distributed, RESTful search and analytics engine based on the Lucene library.
22
-
-**[Logstash](https://www.elastic.co/logstash)** A flexible data collection, processing, and enrichment pipeline.
23
-
-**[Kibana](https://www.elastic.co/kibana)** A visualization and exploration tool for analyzing and visualizing data stored in Elasticsearch.
24
-
-**[Beats](https://www.elastic.co/beats/)** Lightweight data shippers for ingesting data into Elasticsearch or Logstash.
20
+
-**[Elasticsearch](https://www.elastic.co/elasticsearch)**: A distributed, RESTful search and analytics engine based on the Lucene library.
21
+
-**[Logstash](https://www.elastic.co/logstash)**: A flexible data collection, processing, and enrichment pipeline.
22
+
-**[Kibana](https://www.elastic.co/kibana)**: A visualization and exploration tool for analyzing and visualizing data stored in Elasticsearch.
23
+
-**[Beats](https://www.elastic.co/beats/)**: Lightweight data shippers for ingesting data into Elasticsearch or Logstash.
25
24
26
25
<Macroid="requirements" />
27
26
@@ -30,38 +29,66 @@ Its components are:
30
29
- An [SSH key](/organizations-and-projects/how-to/create-ssh-key/)
31
30
- An [Instance](/instances/how-to/create-an-instance/) or an [Elastic Metal server](/elastic-metal/how-to/create-server/) with at least 4 GB of RAM
32
31
33
-
###Install Elasticsearch
32
+
## Install Elasticsearch
34
33
35
34
1. Download and install the Elasticsearch signing key:
Make sure you have SSL certificates set up for secure communication.
80
+
</Message>
81
+
82
+
57
83
## Install and configure Logstash
58
84
59
-
1.Using the same repository added for Elasticsearch, you can simply install Logstash:
85
+
1. Install Logstash using the same repository added for Elasticsearch:
60
86
```bash
61
87
apt install logstash
62
88
```
63
89
64
-
2. Once installed, you can create and modify configuration files for Logstash to set up your data pipelines. These are typically found in `/etc/logstash/conf.d/`.
90
+
2. Create and modify configuration files for Logstash:
91
+
The configuration files for Logstash are typically located in `/etc/logstash/conf.d/`. You can create pipelines to manage your data processing.
65
92
66
93
3. Start and enable the Logstash service:
67
94
```bash
@@ -71,7 +98,7 @@ Its components are:
71
98
72
99
## Install and configure Kibana
73
100
74
-
1. Install Kibana using the repository:
101
+
1. Install Kibana:
75
102
```bash
76
103
apt install kibana
77
104
```
@@ -82,25 +109,96 @@ Its components are:
82
109
systemctl enable kibana
83
110
```
84
111
85
-
3. By default, Kibana is accessible on `http://localhost:5601`. If you need to access it from a remote machine, edit the Kibana configuration file `/etc/kibana/kibana.yml` and set the server host:
112
+
3. Configure Kibana for remote access:
113
+
By default, Kibana is accessible on `http://localhost:5601`. To make Kibana accessible remotely, edit the Kibana configuration file:
114
+
```bash
115
+
nano /etc/kibana/kibana.yml
86
116
```
117
+
118
+
Change the server host to:
119
+
```yaml
87
120
server.host: "0.0.0.0"
88
121
```
89
122
90
-
## Secure the Elastic stack
123
+
4. Secure Kibana:
124
+
Ensure Kibana uses SSL to encrypt communications by adding SSL certificates in the `kibana.yml` file:
It is important to secure your ELK Stack, especially if it is exposed to the public internet. You can complete your setup using the following additional resources:
140
+
2. Configure Filebeat to ship logs to Elasticsearch:
141
+
Edit the Filebeat configuration file to point to your Elasticsearch instance:
142
+
```bash
143
+
nano /etc/filebeat/filebeat.yml
144
+
```
145
+
146
+
Set the output to Elasticsearch:
147
+
```yaml
148
+
output.elasticsearch:
149
+
hosts: ["http://localhost:9200"]
150
+
```
151
+
152
+
Alternatively, configure Filebeat to send logs to Logstash:
153
+
```yaml
154
+
output.logstash:
155
+
hosts: ["localhost:5044"]
156
+
```
157
+
158
+
3. Start and enable the Filebeat service:
159
+
```bash
160
+
systemctl enable filebeat
161
+
systemctl start filebeat
162
+
```
163
+
164
+
## Secure the Elastic Stack
165
+
166
+
Securing your Elastic Stack is essential, especially if exposed to the internet. Following are some recommendations:
167
+
168
+
- Enable built-in security features (as shown above in Elasticsearch and Kibana setup).
169
+
170
+
- Use a firewall:
171
+
You can use `ufw` or `iptables` to restrict access to only the necessary IPs:
172
+
```bash
173
+
ufw allow from <your_ip> to any port 9200
174
+
ufw allow from <your_ip> to any port 5601
175
+
```
176
+
177
+
- Set up an HTTPS reverse proxy:
178
+
You can secure Kibana by setting up an HTTPS reverse proxy with Nginx:
179
+
[Set up an HTTPS reverse proxy with Nginx](https://www.scaleway.com/docs/tutorials/nginx-reverse-proxy/).
180
+
181
+
- Set up TLS/SSL for Elasticsearch and Kibana: Ensure communications are encrypted between components using SSL/TLS as shown above.
93
182
94
-
-[Use a firewal](/tutorials/installation-uncomplicated-firewall/) like `ufw` or `iptables` to restrict access to your Instance.
95
-
-[Secure Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-minimal-setup.html) using its built-in security features or with plugins.
96
-
- Consider setting up an [HTTPS reverse proxy](/tutorials/nginx-reverse-proxy/) using a third-party web server like Nginx or Apache to access Kibana securely.
97
183
98
184
## Test the installation
99
185
100
-
Make sure everything is working:
186
+
After completing the setup, you can verify if everything is working:
187
+
188
+
- Elasticsearch:
189
+
Run the following command to check Elasticsearch health:
190
+
```bash
191
+
curl -X GET "localhost:9200/_cluster/health?pretty"
192
+
```
193
+
194
+
- Kibana:
195
+
Navigate to `http://your_server_ip:5601` in your web browser.
101
196
102
-
- Elasticsearch Run the following command to test your Elasticsearch installation: `curl -X GET "localhost:9200/"`
103
-
- Kibana: Navigate to `http://your_server_ip:5601` in your web browser.
197
+
- Filebeat:
198
+
Ensure logs are being shipped by checking the status:
199
+
```bash
200
+
curl -X GET "localhost:5601/api/status"
201
+
```
104
202
105
203
Now, you should have a basic Elastic stack up and running! Adjust configurations as needed for your specific use case and further secure and optimize your setup for production use.
106
204
Refer to the [official Elastic documentation](https://www.elastic.co/guide/index.html) for the most accurate and up-to-date instructions and advanced configuration information.
0 commit comments