Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 6167c9f

Browse files
author
Chris Wiechmann
committed
Added Metricbeat setup
1 parent 333f0d0 commit 6167c9f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ This shows a sample dashboard created in Kibana based on the indexed documents:
5050
- [Setup API-Manager](#setup-api-manager)
5151
- [Setup local lookup](#setup-local-lookup)
5252
- [Activate user authentication](#activate-user-authentication)
53+
- [Enable Metricbeat](#enable-metricbeat)
5354
- [Configure cluster UUID](#configure-cluster-uuid)
5455
- [Custom certificates](#custom-certificates)
5556
- [Secure API-Builder Traffic-Monitor API](#secure-api-builder-traffic-monitor-api)
@@ -627,6 +628,51 @@ The monitoring users are used to send metric information to Elasticsearch to ena
627628

628629
<p align="right"><a href="#table-of-content">Top</a></p>
629630

631+
### Enable Metricbeat
632+
633+
In the default configuration, the solution uses the so-called self-monitoring. This means that components such as Logstash, Kibana, Filebeat, etc. independently send monitoring information (metrics) to Elasticsearch. However, this approach is not recommended by Elastic and is deprecated.
634+
Metricbeat should be used instead. Unfortunately, the solution cannot easily be delivered with a pre-configured Metricbeat, as it depends too much on the deployment.
635+
So this means that you have to set some parameters in the .env file and then start Metricbeat.
636+
You will learn here how to enable Metricbeat and thus monitor Memcache, the running Docker containers in addition to the pure Elastic stack. In the future, it is planned to monitor the API Manager and the API Builder process in the same way and to provide metrics.
637+
638+
__1. Activate Metricbeat__
639+
640+
- Check that the METRICBEAT_USERNAME & METRICBEAT_PASSWORD user is set up correctly. This user must have rights to Kibana (to upload dashboards) and Elasticsearch (to create indexes).
641+
- Set the parameter: METRICBEAT_ENABLED=true. This will be populated when the Metricbeat container starts.
642+
- Set the parameter SELF_MONITORING_ENABLED=false to disable legacy monitoring.
643+
644+
__2. Configure Metricbeat__
645+
646+
The parameter METRICBEAT_MODULES must be set differently for each host, depending on which services are running on which host.
647+
648+
| Component | Description |
649+
| :--- | :--- |
650+
| **elasticsearch** | Replaces internet monitoring so that Elasticsearch metrics appear in Kibana stack monitoring. __Important:__ A metricbeat monitors ALL Elasticsearch nodes based on the parameter: ELASTICSEARCH_HOSTS and Kibana if needed. |
651+
| **kibana** | Enables monitoring of Kibana analogous to Elasticsearch. You can use a metricbeat for monitoring Elasticsearch & Kibana as explained. |
652+
| **logstash** | Monitoring Logstash. Provides the data in Kibana stack monitoring. |
653+
| **filebeat** | Monitoring Filebeat. Provides the data in Kibana stack monitoring. |
654+
| **memcached** | Captures statistics from Memcached. Currently not used in any dashboard and can be disabled if not needed. |
655+
| **system** | Provides system metrics such as disk IO, network IO, etc. __Important:__ In the default configuration out of the Docker container which limits the process view. Will be improved in a later release. See example: ![System overview](imgs/metricbeat-system-overview.png) or ![Host overview](imgs/metricbeat-api-host-overview.png) |
656+
| **docker** | Provides information about running Docker containers that can be displayed in dashboards. Docker containers are automatically detected on the host. See example: ![Docker overview](imgs/containers-overview.png) |
657+
658+
Set the parameter: METRICBEAT_NODE_NAME to a descriptive name, which should be displayed later in the Kibana dashboards for the host.
659+
660+
__3. Start Metricbeat__
661+
662+
Now start the Metricbeat container on each host:
663+
```
664+
docker-compose -f metricbeat/docker-compose.metricbeat.yml up -d
665+
```
666+
So that on each host a container `metricbeat` started.
667+
668+
__4. Disable Self-Monitoring__
669+
670+
Make sure, the parameter: `SELF_MONITORING_ENABLED=false` is set. Then stop Elasticsearch, Kibana, Logstash & Filebeat services and restart them with docker-compose that they are no longer using self-monitoring. A docker restart is not sufficient here. E.g.
671+
```
672+
docker stop kibana
673+
docker-compose -f kibana/docker-compose.kibana.yml up -d
674+
```
675+
630676
### Configure cluster UUID
631677

632678
This step is optional, but required to monitor your Filebeat instances as part of the stack monitoring. To obtain the Cluster UUID run the following in your browser:

imgs/containers-overview.png

244 KB
Loading

0 commit comments

Comments
 (0)