Get a DemoStart Free TrialSign In

Metricbeat Configuration

Ship Metrics with Metricbeat to Logstash

Metricbeat is an open-source shipping agent used to collect and ship operating system and service metrics to your Logit.io Stack via Logstash.

Send Your DataLogsShippersMetricbeat Configuration Guide

Follow this step by step guide to get 'logs' from your system to Logit.io:

Step 1 - Install Metricbeat

To get started first follow the steps below:

Older versions can be found here metricbeat 7, metricbeat 6, metricbeat 5

Step 2 - Copy Configuration file

The configuration file below is pre-configured to send data to your Logit.io Stack via Logstash.

Copy the configuration file below and overwrite the contents of metricbeat.yml.

###################### Logit.io Metricbeat Configuration #######################
# =========================== Modules configuration ============================

metricbeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml

  # Set to true to enable config reloading
  reload.enabled: false

  # Period on which files under path should be checked for changes
  #reload.period: 10s
# ======================= Elasticsearch template setting =======================
setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
  #_source.enabled: false

# ================================== Outputs ===================================
# ------------------------------ Logstash Output -------------------------------
<div class="sw-warning">
    <div>
        <img src="/images/source-wizard/warning-triangle.svg">
    </div>
    <div>
       <b>No input available! </b> Your stack is missing the required input for this data source <a href="#" onclick="Intercom('showNewMessage')" class="btn btn-info btn-sm">Talk to support to add the input</a>
    </div>
</div> 

Step 3 - Validate configuration

DEB/RPM

sudo metricbeat -e -c /etc/metricbeat/metricbeat.yml

macOS

sudo ./metricbeat -e -c metricbeat.yml --strict.perms=false

You’ll be running metricbeat as root, so you need to change ownership of the configuration file and any configurations enabled in the modules.d directory, or run metricbeat with --strict.perms=false as shown above. Read more about how to change ownership.

Windows

cd <EXTRACTED_ARCHIVE>
.\metricbeat.exe -e -c metricbeat.yml

Linux

sudo ./metricbeat -e -c metricbeat.yml --strict.perms=false

You’ll be running metricbeat as root, so you need to change ownership of the configuration file and any configurations enabled in the modules.d directory, or run metricbeat with --strict.perms=false as shown above. Read more about how to change ownership.

If the yml file is invalid, metricbeat will print an `error loading config file` error message with details on how to correct the problem. If you have issues starting metricbeat see "How To Diagnose No Data In Stack" below to troubleshoot.

Step 4 - Start metricbeat

Start or restart metricbeat to apply the configuration changes.

Step 5 - Check Logit.io for your logs

Data should now have been sent to your Stack.

View my data

If you don't see logs take a look at How to diagnose no data in Stack below for how to diagnose common issues.

Step 6 - Configure Modules (Optional)

The system status module is enabled by default to collect metrics about your server, such as CPU usage, memory usage, network IO metrics, and process statistics.

There are a range of other modules which can be enabled for Metricbeat, please choose the module from the list below if you wish to know more.

apache, docker, golang, haproxy, http, kafka, kubernetes, mongodb, mysql, nginx, rabbitmq,

redis, centos, debian, macos, redhat, ubuntu, windows, uwsgi, postgresql, zookeeper, puppet

Step 7 - how to diagnose no data in Stack

If you don't see data appearing in your Stack after following the steps, visit the Help Centre guide for steps to diagnose no data appearing in your Stack or Chat to support now.

Step 8 - Metricbeat System dashboard

The Metricbeat System module comes with predefined Kibana dashboards. To view your dashboards for any of your Logit.io stacks, launch Logs and choose Dashboards.

Kibana dashboard preview

Step 9 - Metricbeat Overview

Metricbeat is a lightweight metrics shipper built using the Libbeat framework. It's origins started from the now deprecated Topbeat & it is used for collecting service and system log metrics to be parsed in Logstash and used across the rest of the ELK Stack.

Metricbeat makes sending data for server monitoring simpler by aggregating system metrics from a number of popular tools including NGINX, MySQL, Apache & HAProxy. While Metricbeat can push log data directly to the Elastic Stack some users may wish to use a buffering service such as Redis or Kafka. Metricbeat does much more than simply collect metrics as it can be used to tap into a variety of systems and execute a range of enhancements to the log file before shipping the metrics to ELK

The shipper when paired with Kibana can be used to report on CPU, memory and load metrics. When used in a containerised environment with Docker it can be used as a solution for container monitoring on the Logit.io platform.

Our platform provides a complete hosted ELK solution allowing you to get the best out of Metricbeat in a single centralised platform for log and metric analysis. We believe that monitoring metrics plays a crucial role in maintaining the health & security of your applications

Discover more about our Metrics-As-A-Service Solution.

If you need any further assistance with sending data through Metricbeat to Logstash we're here to help. Feel free to reach out by contacting our support team via live chat & we'll be happy to assist.

Return to Search
Sign Up

© 2024 Logit.io Ltd, All rights reserved.