# Beats: Metricbeat

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fmetrics%2Fmetricbeat.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fmetrics%2Fmetricbeat.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

**Coralogix** provides a seamless integration with `Metricbeat` so help you send your metric data from anywhere and create metric dashboards.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

This document includes cluster dependent URL's. Each URL has a variable part (in Italic). Please match this part with a row entry within the following table. Copy the table row entry located under the column that matches the top level domain of your Coralogix account (.com, .in etc.). Replace the variable part of the URL with this entry.

\[table id=51 /]

* Have `Metricbeat` installed, for more information on how to install: <https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation.html>

* Install our SSL certificate to your system for providing secure connection. You can download here: <br />*SSL Certificates*

## General[​](#general "Direct link to General")

**Private Key** – Your [Send Your Data - API Key](https://docs-docusaurus.kinsta.page/user-guides/account-management/api-keys/send-your-data-api-key/.md) is a unique ID that represents your company.

**Application Name** – The name of your main application, for example, a company named *"SuperData"* would probably insert the *"SuperData"* string parameter or if they want to debug their test environment they might insert the *"SuperData– Test"*.

**SubSystem Name** – Your application probably has multiple subsystems, for example: Backend servers, Middleware, Frontend servers etc. in order to help you examine the data you need, inserting the subsystem parameter is vital.

## Configuration[​](#configuration "Direct link to Configuration")

### On the host machine[​](#on-the-host-machine "Direct link to On the host machine")

Open your `Metricbeat` configuration file and configure it to use `Logstash`. For more information about configuring `Metricbeat` to use `Logstash` please refer to: <https://www.elastic.co/guide/en/beats/metricbeat/current/logstash-output.html>

Point your `Metricbeat` to output to **Coralogix** logstash server:

```
logstashserver.coralogix.com:5015
```

In addition you should add *Coralogix* configuration from the **General** section.

Here is a basic example of **metricbeat.yml** file for collecting metrics from  a `Redis` server:

```
metricbeat.modules:

- module: redis

  enabled: true

  hosts: ["redis:6379"]

  metricsets: ["info", "keyspace"]

  period: 10s



fields_under_root: true

fields:

  PRIVATE_KEY: "YOUR_PRIVATE_KEY"

  APP_NAME: "APP_NAME"

  SUB_SYSTEM: "SUB_NAME"



output.logstash:

  enabled: true

#If your account URL end with .com use logstashserver.coralogix.com

#If your account URL end with .in use logstashserver.app.coralogix.in 

  hosts: ["your-logstash-enadpoint:5015"]

  ttl: 60s

  ssl.certificate_authorities: ["<path to folder with certificates>/ca.crt"]
```

**Note:** If you want to send all additional metadata, the **fields\_under\_root** option should be equals to *false*.

### With Docker[​](#with-docker "Direct link to With Docker")

Build Docker image with your **metricbeat.yml**:

```
FROM docker.elastic.co/beats/metricbeat:6.6.2



LABEL description="Metricbeat metrics data collector"



# Adding configuration file and SSL certificates for Metricbeat

COPY metricbeat.yml /usr/share/metricbeat/metricbeat.yml

COPY ca.crt /etc/ssl/certs/Coralogix.crt



# Changing permission of configuration file

USER root

RUN chown root:metricbeat /usr/share/metricbeat/metricbeat.yml



# Return to deploy user

USER metricbeat
```

## Usage[​](#usage "Direct link to Usage")

You can also deploy with *Docker-compose*:

```
version: '3.6'

services:

  redis:

    image: redis:latest

    container_name: redis



  metricbeat:

    image: docker.elastic.co/beats/metricbeat:6.6.2

    container_name: metricbeat

    volumes:

      - ./metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro

      - ./ca.crt:/etc/ssl/certs/Coralogix.crt:ro
```

Make sure you change owner of **metricbeat.yml** file to *root* (uid=1000). /n /n

**If you have any questions or need additional guidance, our support team is available 24/7 via our in-app chat!**
