In short, ES and Logstash appear to start fine, have no obvious errors in logs and nothing in the error logs, etc. But, my aliases dict is empty and I don't have a logstash index or data in ES. I really have no idea where to look for answers from here.
Logstash's file input tails files by default. If you want it to read files from scratch make sure you set start_position => beginning and clear existing sincedb entries. See the file input documentation for more information.
General advice: Save yourself time by not attempt to go all the way and connect Logstash to ES until you've established that Logstash gets the messages and processes them correctly. Use a stdout { codec => rubydebug } to establish that.
Adding that helped, but only after stopping my service instance of logstash and starting logstash manually via bin/logstash -f [conf file]. Now, everything seems to be working but this isn't the "work around" I wanted.
How can I fix my logstash so it works correctly as a service?
The reason it worked when you ran Logstash by hand was that sincedb state isn't shared between users so the files were treated as brand new and were processed from the begininning.
Again, if you want to reprocess log files you have to clear the sincedb entries. If you do that it'll work even when you run Logstash as a service.
The sincedb files are stored in the home directory of the user running Logstash. If you start Logstash with --verbose or --debug it'll tell you the exact path to the file being used.
{:timestamp=>"2015-10-21T08:57:56.694000-0400", :message=>"No sincedb_path set, generating one based on the file path", :sincedb_path=>"/root/.sincedb_8f309eb34476af59efaabf28f6aac73a", :path=>["/var/log/python_apps/.log", "/var/log/python_apps/.log.*"], :level=>:info, :file=>"logstash/inputs/file.rb", :line=>"120", :method=>"register"}
I'm new to linux, so forgive me if this isn't correct:
cd /root/ ; ll
total 4
-rw-------. 1 root root 1108 Oct 12 12:20 anaconda-ks.cfg
Don't run Logstash as root. Run it as the logstash user (or some other non-privileged user). That's how the RPM and Debian packages set things up for you.
I don't know what's up with the missing sincedb file.
Yes, something like that. And check what user Logstash actually runs as. Obviously, if HOME is /root but Logstash runs as logstash that would explain why no sincedb file is created.
Also, if this file existed on my box, I would have found it with find regardless of what directory, which I didn't. And this doesn't explain why logstash said such existed in the root folder, anyway.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.