Hello,
Is it possible to run logstash as service in linux? i am finding it difficult, in windows its super easy and even can run multiple instances, but in linux i have no clue at all
How are you installing Logstash? RPM package? Debian package?
On AWS linux, RPM
Then I'm sure it's managed like any other service, i.e. with e.g. service logstash start
. Configuration files go into /etc/logstash/conf.d and startup options are set via /etc/sysconfig/logstash.
it stops very often, not sure where to check
just saw the log and i have this
WARN: org.elasticsearch.transport.netty: [logstash-0.0.0.0-3475-2010] exception caught on transport layer [[id: 0x88a4d1f1]], closing connection
Should we give http://elasticsearchurl:port in the logstash config file? or without http?
WARN: org.elasticsearch.transport.netty: [logstash-0.0.0.0-3475-2010] exception caught on transport layer [[id: 0x88a4d1f1]], closing connection
In the Logstash log? Which version of Logstash is this? What's your configuration?
Should we give http://elasticsearchurl:port in the logstash config file? or without http?
Either or, I believe.
Yes, version is logstash-2.2.4-1.noarch
And what does your Logstash configuration look like?
which file u are referrng here
The file(s) you put in /etc/logstash/conf.d or feed to Logstash on the command line.
input {
tcp {
port => 5504
type => 'metrix
codec => json {
charset => "UTF-8"
}
}
}
output {
if [type] == "metrix" {
elasticsearch {
host => "ip:9200"
index => "metrics-%{+YYYY.MM.dd}"
}
}
}
actually have them in 2 files one as input and another as output
Okay. Not sure what's going on.
Fixed it, it should be hosts not host