Uploaded image for project: 'logstash'
  1. LOGSTASH-2253

Mixed up Init and upstart configs and process.

    Details

      Description

      1) Both the init scrips and the upstart configs are looking in the /etc/logstash/conf.d/ dir for all configs.

      This is causing issue like I had, where the upstart was trying to launch the web-ui with the shipper config.

      EXAMPLE:
         LS_CONF_DIR=/etc/logstash/conf.d
      THEN
         args="agent -f ${LS_CONF_DIR} -l ${LS_LOG_FILE} ${LS_OPTS}"
      

      here is the behavior I was seeing:

      @system-001:~# cat /var/run/logstash.pid
      843
      @system-001:~# ps -aef | grep logstash
      logstash   843     1  2 15:59 ?        00:00:23 /usr/bin/java -Djava.io.tmpdir=/var/lib/logstash -Xmx500m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -jar /opt/logstash/vendor/jar/jruby-complete-1.7.11.jar -I/opt/logstash/lib /opt/logstash/lib/logstash/runner.rb agent -f /etc/logstash/conf.d -l /var/log/logstash/logstash.log
      logstash  3179     1 94 16:14 ?        00:00:08 /usr/bin/java -Djava.io.tmpdir=/var/lib/logstash -Xmx500m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -jar /opt/logstash/vendor/jar/jruby-complete-1.7.11.jar -I/opt/logstash/lib /opt/logstash/lib/logstash/runner.rb web -l /var/log/logstash/logstash.log
      

      2) also if you want to have logstash as central indexer running on the same system as the web-ui or the shipper there needs to be a change to the init and upstart configs to have separate configs.

      EXAMPLE FIX:
      Shipper:
          NAME=logstash
      Indexer:
          NAME=logstash-index
      Web-UI
          NAME=logstash-web-ui
      Then change 
      # logstash configuration directory
      CONF_DIR=/etc/logstash/conf.d
      CONF_FILE=$CONF_DIR/$NAME.conf
      
      AND
      DAEMON_OPTS="agent -f ${CONF_FILE} ${LS_OPTS}"
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                logstash-dev Logstash Developers (Inactive)
                Reporter:
                caroeber C. Alex Roeber
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: