> For the complete documentation index, see [llms.txt](https://bigdata-2.gitbook.io/bd201notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bigdata-2.gitbook.io/bd201notes/elk/beats.md).

# Beats

![Beats example](/files/-M5TwP_f7CYrS0h78VX5)

## The Beats

are open source data shippers that you install as agents on your servers to send different types of operational data to Elasticsearch. Beats can send data directly to Elasticsearch or send it to Elasticsearch via Logstash, which you can use to parse and transform the data.

### MetricBeat

Metricbeat is a lightweight shipper that you can install on your servers to periodically collect metrics from the operating system and from services running on the server. Metricbeat takes the metrics and statistics that it collects and ships them to the output that you specify. We can send this statistics directly to the Elasticsearch.

Metricbeat could work in conjunction with several services like PostgreSQL, Redis, MongoDB, MySQL, Windows, System and many others.

> For example you can use System module. This module is enabled by default to collect metrics about your server, such as CPU usage, memory usage, network IO metrics, and process statistics

#### Installation & Configuration of MetricBeat

Download the suitable release from this [page](https://www.elastic.co/downloads/beats/metricbeat)

After you will unpack it, you need to set it up properly, by changing `metricbeat.yml` file

Since we going to send data directly to Elasticsearch add the following line:

```
output.elasticsearch:
    hosts:[”localhost:9200"]
```

We also would want to use pre-built Kibana dashboards, so add the following to the config as well:

```
setup.kibana:
    host:"localhost:5601»
```

And after this one run command:

```
./metricbeat setup--dashboards
```

#### How to run and check MetricBeat is working

```
sudo chown root metricbeat.yml
sudo chown root modules.d/system.yml
sudo ./metricbeat -e -c metricbeat.yml -d "publish”
```

Open <http://localhost:5601/> On the Discover page, make sure that the predefined metricbeat-\* index pattern is selected to see the data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bigdata-2.gitbook.io/bd201notes/elk/beats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
