ubuntu - Running logstash with monit -


I'm trying to start a logstart with the monitor. I have a directory where I have the logstash in which / home / slee / project / logstash.

First of all I create a bash script (wrapper) in the logstash form to run suggestions in the monit site. I created this:

  # / bin / bash export JAVA_HOME = / usr / local / java / # cLASSPATH = / root / lo2 / logstash / logstash-1.1.0-monolithic.jar #config = / Root / lo2 / logstash / stag_conf.conf CLASSPATH = $ / home / slee / project / logstash / logstash-1.1.0-monolithic.jar config = / home / slee / project / logstash / local.conf ) Echo $$ & gt; /var/run/logstash.pid; # Xac2> And 1 Java - Work $ CLASSPATH Agent - f $ Conffig - Web - Backend LolalisticWerch: ///? Local 1 & gt; Executive Java Jar $ CLASSPATH Agent /var/log/apache2/logstash.log -f $ Config --log /var/log/logstash-indexer.out - Web --log /var/log/logstash-web.out - Backend elasticsearch: // localhost / ;; Stop) `cat / var / run / logstash.pid`;; *) Echo "Usage: LogStash {start | stop}" ;; Esac exit 0   

If I am with this. Start / logstash. It works like a charm, but it is like this MONIT if I add:

  pidfile /var/run/logstash.pid group system start-up process with the process logstash = " / Bin / bash / home /slee/PROJECT/twyxt/logstash/logstash.sh "shutdown program =" / bin / bash /home/slee/PROJECT/twyxt/logstash/logstash.sh "If the failed local host port 9292 Protocol http then resume 5 restart if 5 cycles then timeout   

This does not start the logstation at all. Can anyone tell me why?

I sent an email to Logsthesh Group and they gave me this link

I tried to do this but I was getting a peach @ Ubuntu: ~ / project / logstash / upstart / Backup $ sudo initctl start logstash initctl: unknown job: logstash

I do not know what could be wrong in logostep config because I changed my own directory. Please help me.

Best Regards, Stevenson Lee

checkout

I Added a home variable to your startup script and now it starts through the monitor

Comments