# Start Logstash from systemctl doesn't populate elasticsearch

**URL:** <https://discuss.elastic.co/t/start-logstash-from-systemctl-doesnt-populate-elasticsearch/45526>\
**Category:** Logstash\
**Created:** [March 27, 2016, 12:46am UTC](https://discuss.elastic.co/t/start-logstash-from-systemctl-doesnt-populate-elasticsearch/45526 "2016-03-27T00:46:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mchomicz](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mchomicz](https://discuss.elastic.co/u/mchomicz)\
**Post date:** [March 27, 2016, 12:46am UTC](https://discuss.elastic.co/t/start-logstash-from-systemctl-doesnt-populate-elasticsearch/45526/1 "2016-03-27T00:46:40Z")

</div>

I'm new to ELK, and I am trying to set up multiple index sources (from netflow sources and from snmp via collectd). Seems like the info polled from SNMP is missing ...fields don't show up) I have the following setup:

CentOS 7  
collectd-5.5.1-2.el7.x86\_64 (polling for snmp)  
logstash-1.5.4-1.noarch  
elasticsearch-2.2.1-1.noarch  
kibana-4.4.2-1.x86\_64

When I upstart logstash from systemctl it starts fine, but it looks like no data is being pushed into ES. If I manually run logstash pointing to the conf file data is populated normally into ES.

Here is my logstash config:  
`input {  
udp {  
port =\> 9997  
codec =\> netflow {  
definitions =\> "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-codec-netflow-1.0.0/lib/logstash/codecs/netflow/netflow.yaml"  
versions =\> [5]  
}  
}  
udp {  
port =\> 25826 # Must be specified. 25826 is the default for collectd  
buffer\_size =\> 1452 # Should be specified. 1452 is the default for recent versions of collectd  
codec =\> collectd { } # This will invoke the default options for the codec  
type =\> "collectd"  
}  
}

filter {  
mutate {  
convert =\> {  
"[netflow][ipv4\_src\_addr]" =\> "string"  
"[netflow][ipv4\_dst\_addr]" =\> "string"  
}  
}  
geoip {  
source =\> "[netflow][ipv4\_src\_addr]"  
target =\> "src\_geoip"  
database =\> "/etc/logstash/GeoLiteCity.dat"  
}  
geoip {  
source =\> "[netflow][ipv4\_dst\_addr]"  
target =\> "dst\_geoip"  
database =\> "/etc/logstash/GeoLiteCity.dat"  
}  
#mutate {  
#convert =\> ["[geoip][coordinates]", "float"]  
#}  
}

output {  
stdout { codec =\> rubydebug }  
if [type] == "collectd" {  
elasticsearch {  
index =\> "logstash\_collectd-%{+YYYY.MM.dd}"  
host =\> "localhost"  
protocol =\> http  
}  
} else {  
elasticsearch {  
index =\> "logstash\_netflow-%{+YYYY.MM.dd}"  
host =\> "localhost"  
protocol =\> http  
}  
}  
}`

Can anyone help?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 27, 2016, 9:01pm UTC](https://discuss.elastic.co/t/start-logstash-from-systemctl-doesnt-populate-elasticsearch/45526/2 "2016-03-27T21:01:53Z")

</div>

What do the logs show for LS? Are you sure the process us running after start?

---

<div class="post-metadata">

**Author:** ![mchomicz](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mchomicz](https://discuss.elastic.co/u/mchomicz)\
**Post date:** [March 28, 2016, 12:40am UTC](https://discuss.elastic.co/t/start-logstash-from-systemctl-doesnt-populate-elasticsearch/45526/3 "2016-03-28T00:40:03Z")

</div>

I was able to get it working. Unfortunately I don't know how, but effectively it was a series of restarts to collectd, LS and ES.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:05am UTC](https://discuss.elastic.co/t/start-logstash-from-systemctl-doesnt-populate-elasticsearch/45526/4 "2017-07-06T05:05:14Z")

</div>


