Logstash not ingesting data to elasticsearch when run as daemon and it does show any error as well. But its ingesting data to elasticsearch when ran from terminal as /bin/logstash -f /path/to/conf/file.
Below is the content of /etc/systemd/system/logstash.service :
[Unit]
Description=logstash
[Service]
Type=simple
User=logstash
Group=logstash
Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
Prefixing the path with '-' makes it try to load, but if the file doesn't
exist, it continues onward.
EnvironmentFile=-/etc/default/logstash
EnvironmentFile=-/etc/sysconfig/logstash
ExecStart=/usr/share/logstash/bin/logstash --path.settings /etc/logstash/
Restart=always
WorkingDirectory=/
Nice=19
LimitNOFILE=16384
[Install]
WantedBy=multi-user.target