Installation of filebeat 5.3.1 in windows 10?

Hi,

I installed filebeat in F:\filebeat-5.3.1-windows-x86_64\Filebeat when i executed the install-service-filebeat.ps1 in powershell it opened and closed immediately i dont know why this is happening ?

Even i changed the path.data to F:\filebeat-5.3.1-windows-x86_64\Filebeat in install-service-filebeat.ps1 file.

Thanks

Did you follow the Getting Started Guide?

Yeah i followed the guide but i pasted in different folder rather than C . I think i won't be a problem. The problem is i cant able to run the script in powershell whenever i am trying to run the powershell is opening and closing without showing any error.

Thanks

How are you executing the install-service-filebeat.ps1 script?

You should open a PowerShell console. cd to the dir containing the script. Then execute PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-filebeat.ps1.

Thanks

I went through like this

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> cd F:\filebeat-5.3.1-windows-x86_64\filebeat
PS F:\filebeat-5.3.1-windows-x86_64\filebeat> dir


    Directory: F:\filebeat-5.3.1-windows-x86_64\filebeat


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       17-04-2017     15:30                module
d-----       17-04-2017     15:44                scripts
-a----       17-04-2017     15:43             41 .build_hash.txt
-a----       17-04-2017     15:44       16101376 filebeat.exe
-a----       17-04-2017     15:44          37050 filebeat.full.yml
-a----       17-04-2017     15:44          15641 filebeat.template-es2x.json
-a----       17-04-2017     15:44          12745 filebeat.template.json
-a----       17-04-2017     15:44           4310 filebeat.yml
-a----       17-04-2017     15:44            507 install-service-filebeat.ps1
-a----       17-04-2017     15:42          97026 NOTICE
-a----       17-04-2017     15:43            811 README.md
-a----       17-04-2017     15:44            184 uninstall-service-filebeat.ps1


PS F:\filebeat-5.3.1-windows-x86_64\filebeat> PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-fileb
eat.ps1
PowerShell.exe : The term 'PowerShell.exe' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service- ...
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (PowerShell.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Still it is showing error. Do i need to change any setting in install-service-filebeat.ps1 file?
I also tried like this Set-ExecutionPolicy Unrestricted install-service-filebeat.ps1 but not working
Thanks

And what is the output if you just try to execute the script?

PS > .\install-service-filebeat.ps1

Could it be an issue with your PATH? What do these show?

PS> Get-ChildItem Env:

PS> $PsHome

Thanks

I managed to run my script by setting set-ExecutionPolicy ByPass When i installed the script it is showing like this

PS F:\filebeat-5.3.1-windows-x86_64\filebeat> set-ExecutionPolicy ByPass

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y
PS F:\filebeat-5.3.1-windows-x86_64\filebeat>  .\install-service-filebeat.ps1

Status   Name               DisplayName
------   ----               -----------
Stopped  filebeat           filebeat


PS F:\filebeat-5.3.1-windows-x86_64\filebeat>  .\install-service-filebeat.ps1


__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        :
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         :
__NAMESPACE      :
__PATH           :
ReturnValue      : 5
PSComputerName   :

__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        :
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         :
__NAMESPACE      :
__PATH           :
ReturnValue      : 0
PSComputerName   :

Status      : Stopped
Name        : filebeat
DisplayName : filebeat

Is this means the filebeat is running ? How can i check whether it is running or not because it is showing Status : Stopped
Thanks

The installation script only creates the service for you. From that point you should resume following the Getting Started guide at Step 2 (configuration). You need to configure it, test your config, then start the service.

Thanks

When i started the service in services.msc it is not showing the service is disabled and now it is throwing error like this

PS F:\filebeat-5.3.1-windows-x86_64\filebeat> PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-fileb
eat.ps1


__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        :
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         :
__NAMESPACE      :
__PATH           :
ReturnValue      : 5
PSComputerName   :

__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        :
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         :
__NAMESPACE      :
__PATH           :
ReturnValue      : 0
PSComputerName   :

New-Service : Service 'filebeat (filebeat)' cannot be created due to the following error: The specified service has
been marked for deletion
At F:\filebeat-5.3.1-windows-x86_64\filebeat\install-service-filebeat.ps1:12 char:1
+ New-Service -name filebeat `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (filebeat:String) [New-Service], ServiceCommandException
    + FullyQualifiedErrorId : CouldNotNewService,Microsoft.PowerShell.Commands.NewServiceCommand

May i know what more i have to do to get this up and running?

Thanks

The problem is i think have installed the zip in F dir when i installed in C dir it is working fine May be i have to change some settings in script if i had installed in F dir.

Thanks @andrewkroh

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.