HTTP Metrics
Collect and ship HTTP endpoint server metrics to Logstash and Elasticsearch
Metricbeat is a lightweight shipper that helps you monitor your servers by collecting HTTP endpoint server metrics. Configure Metricbeat using the pre-defined examples below to collect and ship abitrary HTTP endpoint server metrics and statistics to Logstash or Elasticsearch.
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 -------------------------------
No input available! Your stack is missing the required input for this data source
Talk to support to add the inputEnable module
There are several built-in metricbeat modules you can use. To enable the http module, run the following:
metricbeat modules list
metricbeat modules enable @module
Configure Module
Each module has its own configuration file where different metricsets can be enabled / disabled. Locate the configuration file for the http module.
/etc/metricbeat/modules.d/@module.yml
By default metricsets are disabled. To enable or disable a metric simply comment or uncomment the line out.
- module: http
#metricsets:
# - json
period: 10s
hosts: ["localhost:80"]
namespace: "json_namespace"
path: "/"
#body: ""
#method: "GET"
#username: "user"
#password: "secret"
#request.enabled: false
#response.enabled: false
#json.is_array: false
#dedot.enabled: false
Start Metricbeat
To start @beatname, run in Powershell:
Start-Service @beatname
Check Logit.io for your logs
Data should now have been sent to your Stack.
View My DataIf you don't see take a look at How to diagnose no data in Stack below for how to diagnose common issues.
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.