I had to download the JSON file from the web (github) then pasted into the file. I then ran the command:
Invoke-WebRequest -Method Put -InFile winlogbeat.template.json -Uri http://localhost:9200/_template/winlogbeat?pretty
and worked fine.
Now I am trying to set the Kibana dashboard, but it either says:
Get-Process : A parameter cannot be found that matches parameter name 'dashboards'.
At line:1 char:25
+ PS > .\winlogbeat setup -dashboards
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Process], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.GetProcessCommand
or it says:
Program 'winlogbeat.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1
+ .\winlogbeat setup --dashboards
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ .\winlogbeat setup --dashboards
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
When installed the dashboard for Logstash output using this command:
PS > .\winlogbeat.exe setup -e `
-E output.logstash.enabled=false `
-E output.elasticsearch.hosts=['localhost:9200'] `
-E output.elasticsearch.username=winlogbeat_internal `
-E output.elasticsearch.password=YOUR_PASSWORD `
-E setup.kibana.host=localhost:5601
I get this error:
Get-Process : Parameter cannot be processed because the parameter name 'e' is ambiguous. Possible matches include:
-ErrorAction -ErrorVariable.
At line:1 char:29
+ PS > .\winlogbeat.exe setup -e `
+ ~~
+ CategoryInfo : InvalidArgument: (:) [Get-Process], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.GetProcessCommand
Also for some reason my winlogbeat did not come with a scripts folder for me to install dashboards as stated here:
https://www.elastic.co/guide/en/beats/winlogbeat/5.0/winlogbeat-sample-dashboards.html
Also when trying to run winlogbeat I get this error:
Start-Service : Service 'winlogbeat (winlogbeat)' cannot be started due to the following error: Cannot start service winlogbeat on computer '.'.
At line:1 char:1
+ Start-Service winlogbeat
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotStartService,Microsoft.PowerShell.Commands.StartServiceCommand
This is my config file:
winlogbeat.event_logs:
- name: Application
ignore_older: 72h
- name: Security
- name: System
setup.template.settings:
index.number_of_shards: 3
setup.dashboards.enabled: true
setup.kibana:
host: "IP:5601"
output.logstash:
hosts: ["IP:5000"]