Get a DemoStart Free TrialSign In

Windows Winlogbeat Setup

Use Logstash with Windows to ship logs to Elasticsearch & Kibana

Winlogbeat is a Windows specific event-log shipping agent installed as a Windows service. It can be used to collect and send event logs to one or more destinations, including Logstash.

Send Your DataLogsOperating systemsWindows Winlogbeat Setup Guide

Follow this step by step guide to get 'logs' from your system to

Step 1 - Install

  • Download the Winlogbeat Windows zip file from the official downloads page.

  • Extract the contents of the zip file into C:\Program Files.

  • Rename the winlogbeat-<version> directory to Winlogbeat.

  • 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 Winlogbeat as a Windows service:

    PS C:\Users\Administrator> cd 'C:\Program Files\Winlogbeat'
    PS C:\Program Files\Winlogbeat> .\install-service-winlogbeat.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-winlogbeat.ps1?
    [D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): R
    Status   Name               DisplayName
    ------   ----               -----------
    Stopped  winlogbeat         winlogbeat
    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-winlogbeat.ps1

Step 2 - Configure Winlogbeat

Configuration for Winlogbeat is found in the winlogbeat.yml file in C:\Program Files\Winlogbeat.

In the event_logs section, specify the event logs that you want to monitor. By default, Winlogbeat is set to monitor application, security, and system logs:

  - name: Application
  - name: Security
  - name: System
To obtain a list of available event logs, run Get-EventLog *

Step 3 - Configure output

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
#  hosts: ["localhost:9200"]
No input available! Your stack is missing the required input for this data source Talk to support to add the input

Step 4 - Validate configuration

Let's check the configuration file is syntactically correct.

PS C:\Program Files\Winlogbeat> .\winlogbeat.exe test config -c .\winlogbeat.yml -e

Step 5 - Start winlogbeat

Ok, time to start ingesting data!

PS C:\Program Files\Winlogbeat> Start-Service winlogbeat

Winlogbeat should now be running. If you used the configuration described here, then you can view the log file at C:\ProgramData\winlogbeat\Logs\winlogbeat.

You can view the status of the service and control it from the Services management console in Windows. To launch the management console, run this command:

PS C:\Program Files\Winlogbeat> services.msc

Step 6 - Stopping winlogbeat

Stop the Winlogbeat service with the following command:

PS C:\Program Files\Winlogbeat> Stop-Service winlogbeat

Step 7 - Check for your logs

Now you should view your data:

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 8 - 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 9 - Windows Centralised Logging Overview

Centralized logging can provide several benefits for Windows environments, including:

Improved visibility: By consolidating all logs from various Windows machines into a central location, it becomes easier to see what's happening across the entire infrastructure. This can help with troubleshooting, identifying security threats, and monitoring system health.

Simplified management: Instead of having to access logs on each individual Windows machine, administrators can manage logs from a single location. This can save time and reduce complexity.

Easier compliance: Many regulatory frameworks require organizations to maintain logs for a certain period of time. Centralized logging can make it easier to meet these requirements by providing a single location to store and manage logs.

Better security: By monitoring logs from a central location, it becomes easier to identify suspicious activity and security threats across the entire infrastructure. This can help organizations to proactively address potential security risks.

Scalability: As organizations grow and add more Windows machines, centralized logging can scale to accommodate the increased volume of logs. This can help ensure that logs are always available and accessible when needed.

Overall, centralized logging for Windows can provide significant benefits for organizations of all sizes, including improved visibility, simplified management, easier compliance, better security, and scalability.

Return to Search
Sign Up

© 2023 Ltd, All rights reserved.