Install filebeat on windows

Hello everybody,

I'm trying to install filebeat on a windows server. But when I run it from the command prompt it shows me this :

Can anyone help me ?

Thannnks !

hi samir,
Just run with the following command .
.\install-service-filebeat.ps1

Look into filebeat doc

https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-getting-started.html

1 Like

When I run this command it opens the script in a text file but doesn't execute it.

check your filebeat.yml file and configure properly.
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration.html

test your filebeat.yml by following command ./filebeat -configtest -e

If you installed from DEB or RPM packages, run ./filebeat.sh -configtest -e.

I tested my configuration file. It is Ok. But despite that I can not install filebeat as a service.

Hi @Sam67000. What's wrong with that output? It shows that it has installed filebeat as service which is stopped. Look under services if filebeat is there.

Ah yes It's Ok thank you very much. But I have another problem when I want to load the template manually. I launch this command :

C:\Program Files\Filebeat> Invoke-WebRequest -Method Put -InFile filebeat.template.json -Uri http://localhost:9200/_template/filebeat?pretty

But it puts me : invoke-webrequest is not recognized as an internal or external command, operable program or batch file.

You have to execute this with powershell. Open powershell or type powershell in a cmd and then enter.

Ah thank you ! we are moving forward.
Now when I run it from the powershell it shows me the following error :

Invoke-WebRequest : Unable to connect to the remote server
At line:1 char:1

  • Invoke-WebRequest -Method Put -Infile filebeat.template.json -Uri http://localho ...
  •   + CategoryInfo          : NotSpecified: (: [Invoke-WebRequest], WebException
      + FullyQualifiedErrorId : System.Net.WebException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Is elasticsearch running on your machine?

If not replace http://localhost:9200 with your elasticsearch machine.

I replace localhost with the IP address of my Elasticsearch machine right ?

:thumbsup:

I did what you told me. Now it shows me another error : :rage:

invoke-webrequest : InvokeThe response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete.
Specify the UseBasicParsing parameter and try again.

Try with param -UseBasicParsing

Yes it worksssssssssssssss !!!!!!! Thanks a loooot !!

Glad to hear that it works :thumbsup: