Metricbeat Configuration
Ship Metrics with Metricbeat to Logit.io
Metricbeat is an open-source shipping agent used to collect and ship operating system and service metrics to your Logit.io Stack via Logstash.
Install Integration
Install Metricbeat
To get started you will need to install metricbeat. To do this you have two main options:
- Choose the metricbeat (opens in a new tab) ZIP file (Windows ZIP x86_64) or
- Choose the Microsoft Software Installer MSI (opens in a new tab) file (Windows MSI x86_64 (beta))
To successfully install metricbeat and set up the required Windows service you will need to have administrator access.
If you have chosen to download the zip file:
- Extract the contents of the zip file into C:\Program Files.
- Rename the extracted folder to metricbeat
- Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select Run As Administrator).
- From the PowerShell prompt, run the following commands to install metricbeat as a Windows service:
cd 'C:\Program Files\metricbeat'
.\install-service-metricbeat.ps1
If script execution is disabled on your system, you need to set the execution policy for the current session to allow the script to run. For example:
PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-metricbeat.ps1
For more information about Powershell execution policies see here (opens in a new tab).
If you have chosen to download the metricbeat.msi file:
- double-click on it and the relevant files will be downloaded.
At the end of the installation process you'll be given the option to open the folder where metricbeat has been installed.
- Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select Run As Administrator).
- From the PowerShell prompt, change directory to the location where metricbeat was installed and run the following command to install metricbeat as a Windows service:
.\install-service-metricbeat.ps1
If script execution is disabled on your system, you need to set the execution policy for the current session to allow the script to run. For example:
PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-metricbeat.ps1
For more information about Powershell execution policies see here (opens in a new tab).
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 -------------------------------
output.logstash:
hosts: ["@logstash.host:@logstash.sslPort"]
loadbalance: true
ssl.enabled: true
# ================================= Processors =================================
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
Validate Configuration
.\@beatname.exe test config -c @beatname.yml
If the yml file is invalid, @beatname will print a description of the error. For example, if the
output.logstash
section was missing, @beatname would print no outputs are defined, please define one under the output section
Start Metricbeat
To start Metricbeat, run in Powershell:
Start-Service metricbeat
Launch Logs to view your data
Launch LogsConfigure 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
How to diagnose no data in Stack
If you don't see data appearing in your stack after following this integration, take a look at the troubleshooting guide for steps to diagnose and resolve the problem or contact our support team and we'll be happy to assist.