elastic / logstash-forwarder

An experiment to cut logs in preparation for processing elsewhere. Replaced by Filebeat: https://github.com/elastic/beats/tree/master/filebeat
Other
1.79k stars 415 forks source link

changes to makefile to package an RPM that uses a conf.d config #527

Open wfindley opened 9 years ago

wfindley commented 9 years ago

There seemed to be no good reason for new installations of logstash forwarder to use a straight config file. This PR has the Makefile drop the example config in a conf.d dir and tells pleaserun to use that instead for an arg.

wfindley commented 9 years ago

I just signed the CLA.

jordansissel commented 9 years ago

I'm not against the change, but wonder about how this will break people who upgrade.

On Friday, September 18, 2015, wfindley notifications@github.com wrote:

There seemed to be no good reason for new installations of logstash forwarder to use a straight config file. This PR has the Makefile drop the example config in a conf.d dir and tells pleaserun to use that instead for

an arg.

You can view, comment on, or merge this pull request online at:

https://github.com/elastic/logstash-forwarder/pull/527 Commit Summary

  • changes to makefile to package an RPM that uses a conf.d dir rather than a single config file.

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/elastic/logstash-forwarder/pull/527.

wfindley commented 9 years ago

Yeah, I thought about that. Conditional migration of the existing config or just advice to migrate config file? On Sep 18, 2015 4:59 PM, "Jordan Sissel" notifications@github.com wrote:

I'm not against the change, but wonder about how this will break people who upgrade.

On Friday, September 18, 2015, wfindley notifications@github.com wrote:

There seemed to be no good reason for new installations of logstash forwarder to use a straight config file. This PR has the Makefile drop the example config in a conf.d dir and tells pleaserun to use that instead for

an arg.

You can view, comment on, or merge this pull request online at:

https://github.com/elastic/logstash-forwarder/pull/527 Commit Summary

  • changes to makefile to package an RPM that uses a conf.d dir rather than a single config file.

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/elastic/logstash-forwarder/pull/527.

— Reply to this email directly or view it on GitHub https://github.com/elastic/logstash-forwarder/pull/527#issuecomment-141567143 .

wfindley commented 9 years ago

maybe something like this in after-install.sh?

/sbin/chkconfig --add logstash-forwarder

chown -R logstash-forwarder:logstash-forwarder /opt/logstash-forwarder
chown logstash-forwarder /var/log/logstash-forwarder
chown logstash-forwarder:logstash-forwarder /var/lib/logstash-forwarder
if [ -f /etc/logstash-forwarder.conf ]; then
  read -p "Found /etc/logstash-forwarder.conf.  Would you like to move it into /etc/logstash-forwarder.conf.d? " -n 1 -r
  echo    # move to a new line
  if [[ $REPLY =~ ^[Yy]$ ]]
  then
    mv /etc/logstash-forwarder.conf /etc/logstash-forwarder.conf.d
  fi
fi
echo "Logs for logstash-forwarder will be in /var/log/logstash-forwarder/"
wfindley commented 9 years ago

Ok, I've tried the CLA again.

wfindley commented 9 years ago

https://elasticsearch.echosign.com/public/viewAgreement?tsid=CBFCIBAA2AAABLblqZhAqFhFGOXl1inbzsrDkRP8jkIMdHy4rrQHh7OugL1hBlkcGuJ06a_dvfqQvAdYtqlI*&

andrewkroh commented 8 years ago

Filebeat supports the usage of a conf.d directory. It is not enabled by default but there is an open issue for this: elastic/beats-packer#27. To use a conf.d directory with Filebeat you must set the config_dir option in your config file.