We can manage Beats from the command line. For example, we can start metric modules, which can be executed by the following command:

./metricbeat modules enable apache mysql
Copy the code

The command above starts the Apache mysql module. We might find it convenient to do this. But if I were to do this with a large number of machines (say, thousands of machines), it would be cumbersome, because we would need to repeat the same actions on each machine. If we need to make changes, we need to do the same for each machine again. So what can we do to help reduce this workload?

Elastic has added a new feature to Kibana: centralized management. Beats Central administration uses a mechanism called configuration tags to group related configurations. After registering your first Beat, you can define configuration tags in Kibana’s central admin UI.

Beats Centralized management is a feature that comes with version 6.5. For security reasons, this feature is available under an Elastic Gold license or a Standard license using our Elastic Cloud service to ensure proper deployment of protection. It includes the new Beats central management UI in Kibana and utilizes Elasticsearch as a centralized configuration store. In the near future, we also plan to expose an API to make it easier to integrate with external tools and systems.

Let me show you how to use Beats for centralized management.

 

The preparatory work

As I mentioned above, we had to buy Elastic Gold to have this functionality. To test this feature, we can accept a 30-day trial so that we can start our testing.

Let’s first click on Management in Kibana and then choose 30 days to try. When we accept the terms, we can see:

You can certainly see that on the left side of the list there is an additional category called Beats, and under it there is an item called Central Management. Let’s click on Central Management:

It shows that our security is not turned on, which means that this feature must be enabled in conjunction with security. Refer to my previous article “Elasticsearch: Setting Elastic Account Security” to enable security. We’re using an elastic account to log in:

We can see a dialog box that prompts us to Enroll Beat. Click this button.

So far we’ve seen two Beats available: Filebeat and Metricbeat. Let’s choose Metricbeat to do some experiments. At the same time, select your favorite Platform from Platform:

For our situation, I choose MacOS.

Because Metricbeat needs to be used. We need to install our Metribeat using my previous post “Elastic Beats Introduction”. At the same time, enter the Command copied from Copy Command in our Terminal:

This time in our Kibana will show:

It shows my hostname and metricBeat version information. Next we select the Continue button:

We can pick a Tag Name that we like and a color that we like. I chose Local above to indicate that my Metricbeat is running locally. This way we can easily find out the configuration of our machine in the future. Let’s click the Add Configuration Block button:

We can select our module and choose to like the module. Finally, select the Save button. Then select the Save & Continue button:

Finally we did:

Select Done on the screen above:

We can see that we have successfully configured our Metricbeat module. The Config Status is Offline. We can type the following command in our Terminal (in the Metricbeat installation directory) :

./metricbeat run
Copy the code

 

Let’s refresh our Kibana interface again:

From the above we can see that our MetricBeat is already running successfully. Of course, we can also find the corresponding index. We can configure other modules in the same way.

We next need to click on our Tags to add or configure our Beats:

Click Add Configuration block to Add other modules in the same Beat module, or Add an output to Elasticsearch:

You need to fix the hosts address for your Settings. The output of our FileBeat will now be sent to our Elasticsearch. We can add another module in the same way.

 

Reference:

【 1 】 www.elastic.co/guide/en/be…

(2) www.elastic.co/blog/introd…