Have an account? Sign in
Metricbeat is a lightweight shipper that helps you monitor your Windows server by collecting metrics from services and performance counters running on the Windows server. Configure Metricbeat using the pre-defined examples below to collect and ship metrics about Windows services to Logstash or Elasticsearch.
First we need to install Metricbeat. Windows
Download the Metricbeat Windows zip file from the official downloads page.
Extract the contents of the zip file into C:\Program Files.
Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select Run As Administrator). If you are running Windows XP, you may need to download and install PowerShell.
Run the following commands to install Metricbeat as a Windows service:
PS > cd 'C:\Program Files\Metricbeat' PS C:\Program Files\Metricbeat> .\install-service-metricbeat.ps1 Security warning Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run C:\Program Files\Winlogbeat\install-service-metricbeat.ps1? [D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R Status Name DisplayName ------ ---- ----------- Stopped metricbeat metricbeat
PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-metricbeat.ps1.
We'll be shipping to Logstash so that we have the option to run filters before the data is indexed.
Comment out the elasticsearch output block.
## Comment out elasticsearch output #output.elasticsearch: # hosts: ["localhost:9200"]
Uncomment and change the logstash output to match below.
output.logstash: hosts: ["your-logstash-host:your-ssl-port"] loadbalance: true ssl.enabled: true
There are several built in metricbeat modules you can use. To enable the system on Windows, run the following:
PS > .\metricbeat.exe modules enable windows
Each module has its own configuration file where different metricsets can be enabled / disabled. Locate the configuration file for the system module.
By default the following metrics are enabled. To enable or disable a metric simply comment or uncomment the line out.
- module: windows #metricsets: # - service period: 1m #- module: windows # metricsets: # - perfmon
The perfmon metricset of the Windows module reads Windows performance counters. The service metricset of the Windows module reads the status of Windows services.
Ok, time to start ingesting data!
PS C:\Program Files\Metricbeat> Start-Service metricbeat
The Windows module comes with a predefined Kibana dashboard. To view your dashboards for any of your Logit stacks, launch Kibana and choose Dashboards.