【问题标题】:Confusion over where standard out goes with monit process混淆标准输出与监控过程的位置
【发布时间】:2014-11-16 22:25:21
【问题描述】:

我一直在尝试为我的 node.js 应用程序设置日志记录,使用 monit 来监控和重新启动应用程序。我的一个问题是,标准输出到哪里去了?例如,如果我的监控配置如下所示:

check host node_web_app_beehive with address 127.0.0.1
  start program = "/bin/bash -c 'cd /srv/www/beehive/current ; source /srv/www/beehive/shared/app.env ; /usr/bin/env PORT=80$
  stop program = "/usr/bin/pkill -f 'node /srv/www/beehive/current/server.js'"
  if failed port 80 protocol HTTP
    request /
    with timeout 10 seconds
    then restart

假设我没有重定向或记录节点进程的控制台输出到哪里?谢谢你。

【问题讨论】:

    标签: linux node.js monit


    【解决方案1】:

    看起来你的配置被你的编辑器截断了,但你应该能够使用正常的重定向将标准输出发送到你想要的任何地方。我已经用 monit 做过很多次了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多