monit

what is the advantage of using supervisord over monit

拥有回忆 提交于 2019-12-02 17:04:48
We have a custom setup which has several daemons (web apps + background tasks) running. I am looking at using a service which helps us to monitor those daemons and restart them if their resource consumption exceeds over a level. I will appreciate any insight on when one is better over the other. As I understand monit spins up a new process while supervisord starts a sub process. What is the pros and cons of this approach ? I will also be using upstart to monitor monit or supervisord itself. The webapp deployment will be done using capistrano. Thanks I haven't used monit but there are some

用monit监控mongodb,崩溃后自动重启mongdb

∥☆過路亽.° 提交于 2019-12-02 02:13:42
用monit监控mongodb,崩溃后自动重启mongdb Posted on 2017-12-17 19:45 季枫 阅读(660) 评论(0) 编辑 收藏 什么是monit Monit是一个跨平台的用来监控Unix/linux系统(比如Linux、BSD、OSX、Solaris)的工具。Monit特别易于安装,而且非常轻量级(只有500KB大小),并且不依赖任何第三方程序、插件或者库。 Monit可以监控服务器进程状态、端口状态,HTTP/TCP状态码、服务器资源变化、文件系统变动等等,根据这些变化,可以设定邮件报警、重启进程或服务。易于安装、轻量级的实现以及强大的功能,让Monit成为一个理想的后备监控工具。 monit不像zabbix功能那么强大,但是胜在轻量级,且具备基本所有的监控需求,比较适合中小型创业公司的使用。 官网:https://mmonit.com/monit 安装 yum install monit 如何配置 使用yum安装默认配置文件在: /etc/monitrc # 全局参数配置文件 /etc/monit.d/ # 在这个目录下新增每个待监控服务的配置 编辑全局参数配置文件/etc/monitrc,我的配置如下 vim /etc/monitrc 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Monitor ruby processes with Monit

别来无恙 提交于 2019-12-01 02:47:43
I have a bunch of Ruby scripts which are long running, I'd like to ensure that every 30 seconds or so these are up. I normally start the commands by simply ruby script-name.rb How can I configure monit to look after these scripts? Update: I tried to follow this method to create a wrapper script which would then launch the ruby process but it did not seem to create the .pid file and typing './wrapper-script stop' did nothing :/ Should I write the pid inside ruby or use a wrapper script to create the pid necessary for monit? The Monit Wiki has a lot of configuration examples: http://mmonit.com

rvm monit delayed_job

杀马特。学长 韩版系。学妹 提交于 2019-12-01 01:04:45
I am trying to run delayed_job using monit, but its failing to run as rvm's paths (local rvm installation per user basis) are not available to the command. My application is a rails2 app with bundler. Monit is not able to find bundler. Does anyone have any suggestions as to how i can tell about the rvm paths to monit? I am getting the error [rails@x-rws1 current]$ monit start delayed_job -c config/delayed_job.monitrc 'delayed_job' start: /usr/bin/env 'delayed_job' failed to start no such file to load -- bundler /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

Monitor ruby processes with Monit

孤街浪徒 提交于 2019-11-30 22:37:08
问题 I have a bunch of Ruby scripts which are long running, I'd like to ensure that every 30 seconds or so these are up. I normally start the commands by simply ruby script-name.rb How can I configure monit to look after these scripts? Update: I tried to follow this method to create a wrapper script which would then launch the ruby process but it did not seem to create the .pid file and typing './wrapper-script stop' did nothing :/ Should I write the pid inside ruby or use a wrapper script to

rvm monit delayed_job

狂风中的少年 提交于 2019-11-30 19:05:42
问题 I am trying to run delayed_job using monit, but its failing to run as rvm's paths (local rvm installation per user basis) are not available to the command. My application is a rails2 app with bundler. Monit is not able to find bundler. Does anyone have any suggestions as to how i can tell about the rvm paths to monit? I am getting the error [rails@x-rws1 current]$ monit start delayed_job -c config/delayed_job.monitrc 'delayed_job' start: /usr/bin/env 'delayed_job' failed to start no such file

God vs. Monit [closed]

不问归期 提交于 2019-11-29 18:59:33
Which one to use for process monitoring and why? Both solutions are good, and there are some pros and cons for both of them. God config file is written in Ruby, so you can do basically everything Ruby allows you to do, and it's a lot of stuff. Monit has to be configured using its own syntax, it's usually OK but more restrictive. Anyway, you can also generate monit config with Ruby (as a part of your deployment strategy). Also, monit uses less resources, so if you're on VPS or just don't have any spare memory, monit could be a better choice. Personally, I prefer god, as it's more configurable.

Is there benefit to using Monit instead of a basic Upstart setup?

孤人 提交于 2019-11-29 18:41:42
I'm configuring my server to run node.js as a daemon. I've setup Upstart to handle startup and shutdown of node, which works wonderfully. The next step is to make sure that node.js is restarted if it dies. A few of the guides have suggested using Monit (or Fugue ) to monitor the process (in Monit's case by doing an HTTP request to the server and waiting for a response). I'm happy to use something like Monit or Fugue, but I'm not sure why one wouldn't (or couldn't) just use Upstart's respawn feature . I assume Upstart will monitor the PID of the launched process and just kick it off again if it

Monit bundle exec rails s

安稳与你 提交于 2019-11-29 17:18:14
I have the following shell script that allows me to start my rails app, let's say it's called start-app.sh : #!/bin/bash cd /var/www/project/current . /home/user/.rvm/environments/ruby-2.3.3 RAILS_SERVE_STATIC_FILES=true RAILS_ENV=production nohup bundle exec rails s -e production -p 4445 > /var/www/project/log/production.log 2>&1 & the file above have permissions of: -rwxr-xr-x 1 user user 410 Mar 21 10:00 start-app.sh* if i want to check the process I do the following: ps aux | grep -v grep | grep ":4445" it'd give me the following output: user 2960 0.0 7.0 975160 144408 ? Sl 10:37 0:07 puma

Node.js OpsWorks Layer console logs

情到浓时终转凉″ 提交于 2019-11-29 09:43:01
问题 I have an Opsworks stack with a Node.js Layer and Node.js Application. I'm wondering if anyone knows where on an ubuntu 14.04LTS instance the console logs from my application are being printed to. I know the opsworks uses monit to run my application but I'm not sure where its outputting the logs to. Thanks! 回答1: So annoyingly enough, the Monit configuration rendered for Node.JS apps on Opsworks doesn't send the output anywhere! Source for this claim. (This surprised me when I learned about it