问题标签 [monit]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
passenger - Monit 不会使用 kill 命令停止脚本
我正在使用 monit 来监控几个进程。这些过程包括乘客实例和我编写的为乘客实例生成 pidfile 的守护程序。Monit 将启动这些过程没有问题。它不会阻止他们。以下是守护进程的 Monit 配置:
它是一个通过 capistrano 生成的 erb 模板。如果我通过具有最小环境的 root 身份通过终端运行停止命令,那么它可以工作,但是当我请求 Monit 停止进程时,我收到以下错误:
我已经尝试了我能想到的一切。我找不到或生成停止命令输出的任何日志。
ruby-on-rails - 获取 Monit monitrc 文件来测试 Rails 应用程序
我正在尝试使用 Monit 来监控并在某些 Rails 应用程序崩溃时重新启动它们。这些应用程序使用 Sphinx。Monit 不接受通常在 shell 中工作的命令。
monitrc 配置如下所示:
访问 pidfile 的权限被拒绝,但如果我尝试:
它不起作用。
同样,monit 不接受启动和停止程序 bash 命令。
我是否缺少明显的解决方法?顺便说一句,我是个菜鸟。
我还查看了http://capitate.rubyforge.org/recipes/sphinx-monit.html#sphinx:monit:start但并没有真正明白。
ruby - Ash pidfile showing wrong process id
I've got a really simple wrapper script to start a ruby program that monitors a network connection. The script's on router - hence we're using ash, not bash.
Since we're using monit to monitor the status, I need a PID file. The problem is, the process id set by the wrapper is one less than the ruby program.
Monit therefore spans hundreds of processes. How can I get the wrapper to start the ruby program and create the correct pidfile?
My wrapper looks like this:
ruby-on-rails - 使用 RVM 监控 resque
我以前使用以下 Monit 脚本进行了 Monit 监控 resque
然后我改变了一些东西,最值得注意的是删除了系统范围的 rvm 安装,我假设在 /usr/local/ruby/bin 安装了 ruby。大约在这个时候,monit 无法再启动 resque。也许原因是其他原因,但我认为是这些卸载导致了损坏。
所以我查看了脚本并注意到 /usr/local/ruby/bin 不存在,所以我尝试将其更改为我认为应该指向的内容,因为我的 rvm 中的 ruby 是 /home/ 周围唯一的一个例如/.rvm/rubies/ruby-1.9.3-p194/bin
但这没有用。所以我谷歌了一些,发现这个建议也没有用:
我在日志中得到的只是:
所以我不确定如何进一步调试。有什么建议么?
ruby-on-rails - 在 Ubuntu/Monit 中将 Mailman 脚本作为服务运行
我在我的 Rails 应用程序中设置了一个邮递员脚本来下载和处理电子邮件。这工作正常。
该脚本位于 rails 应用程序的脚本目录中。
我需要这个脚本在部署时运行,通过monit(我用于其他服务)。
我不确定如何配置 monit 来运行这个特定的脚本(因为它没有启动/停止功能等)。
在服务器上使用 Ubuntu 12.04。
linux - 在linux ec2上安装monit失败
我正在尝试在 linux 上安装 monit。我运行了以下命令:
当我尝试时:
我得到:
monit-5.5 目录包含以下内容:
不知道是什么问题。感谢您的帮助。
node.js - 配置monitrc来监控node js app进程,找不到使用screen ec2 linux运行的node app pidfile
我通过我的 ec2 linux 实例上的屏幕运行我的 app.js(节点 js 应用程序)。我正在尝试配置我的 monitrc 文件,我需要应用程序 pidfile。它不在:/var/run(并且没有 /var/www)
如果有人知道 pidfile 在哪里或我如何找到它,我将不胜感激。
谢谢!
java - 使用monit监控java程序
我写信是为了获得一些关于通过 Monit 启动我的 java 程序的帮助。我写了一个启动脚本program.sh。monit 代码和 scipt 代码随此帖子提供。
问题是我无法使用通过 monit 执行的脚本文件来启动和停止程序。如果我使用终端启动它,我可以监控该过程,但我无法使用 monit 启动/停止它。monit 的日志显示“启动失败”
但是,我可以从 monit 轻松启动和停止 ssh 之类的程序。监视器在 sudo 下运行,我正在从具有管理权限的帐户运行脚本。如果有人帮助我解决这个问题,那将非常有帮助谢谢
监控文件
启动/停止脚本
monitoring - 包括最后几行登录监视警报
我目前正在使用 Monit 监控 Node.JS 实例。它工作得很好,但是当出现问题时,我想添加 Node.JS 实例日志的最后 10 行。这甚至可能吗?
这是我格式化邮件的方式:
}
ruby-on-rails-3 - Monit Ruby on Rails Sidekiq
我正在尝试为 Sidekiq 设置 Monit。这是我到目前为止的配置文件:
问题是当我运行 monit reload 程序“捆绑”不存在时,我收到一条消息。
有人对此有解决方案吗?