I am trying to setup filebeat on windows server.
filebeat version : filebeat-1.2.0-nightlylatest-windows
I will brieg the steps I did..
-
PS C:\Scripts\filebeat> ./install-service-filebeat.ps1
Here I got some execution policy error on PS. I put All executionpolicy unrestricted, then I was able to run that script. -
Edit filebeat.yml file: Below I put my file contents..
paths:
# - /var/log/*.log
- C:\Program Files\Apache Software Foundation\Tomcat 7.0\logs*
input_type: log
document_type: apache
registry_file: "C:/ProgramData/filebeat/registry"
output:
logstash:
# The Logstash hosts
hosts: ["192.168.2.6:5044"] -
Loading the Index Template in Elasticsearch : From here itself I am stuck. I use below command to do this...
PS C:\Scripts\filebeat\filebeat> Invoke-WebRequest -Method Put -InFile filebeat.template.json -Uri http://192.168.2.6:9200/_template/filebeat?pretty
And the error message is..
Invoke-WebRequest : Unable to connect to the remote server
At line:1 char:1
- Invoke-WebRequest -Method Put -InFile filebeat.template.json -Uri http://192.168 ...
-
+ CategoryInfo : NotSpecified: (:) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : System.Net.WebException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
- I tried to start the filebeat service :
PS C:\Scripts\filebeat\filebeat> Start-Service filebeat
But it simply goes to next line.
I setup ELK on ubuntu 14.04. And here is my logstash configuration file (logstash-filter.conf)
input {
tcp{
port => 5044
type => "logs"
}
}
filter {
if [type] == "apache" {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
}
output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }
}
I don't know in which area I am wrong.