-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stdin documentation unclear, do we need a sep config file? #296
Comments
If you use the same configuration file you'll need to add a file entry for "-" which means stdin. So this means the daemon will also start reading from stdin - but since it will usually be /dev/null it probably won't do anything bad. However, the non-daemon instance will also start reading from any other files in the config file, so yes you'll have two instances reading from log files. Best to have separate configuration files, logstash-forwarder will always perform exactly what its told to do in the config file specified (unless there's a bug!) |
that's what I was afraid of, so now I've got 2 config files. One with just the stdin part and the other with the files. It would make things easier if the stdin option could be specified from the command line since that's exactly what your doing to get it to run from stdin. so if you went command_that_outputs_logs | logstash-forwarder -config='/etc/logstash-forwarder' - it would read the config for the server but seeing the - it would mean to take stdin (a common convention for unix) and then ignore the files sections so it doesn't double submit logs. |
one question, does the logstash-forwarder die after stdin is finished? Because it doesn't look like it. 2014/10/29 19:27:33.986887 Starting harvester: - does that mean it finished and then it didn't quit? how can one seek to the beginning of stdin? I've got commands that run via cron and I want to capture the stdout as they run. so I did: command | logstash-forwarder config=/etc/logstash-forwarder-stdin but does the logstash-forwarder process stop when stdin is finished? |
I guess that's this issue: #251 |
Couldn't see this in the docs, I could test it but would be better if it's documented.
Issue is if I have logstash-forwarder piping in from stdin, can I use the same configuration the daemon started from init.d is also using? That is if I run 2 logstash-forwarders, with one accepting stdin, but both pointing to the same configuration file. Will the file entries of the main one conflict with the second one? That is will the stdin try to read both the stdin and the files listed in the configuration, with 2 processes looking at the same file?
The text was updated successfully, but these errors were encountered: