Debugging monit

后端 未结 7 2039
迷失自我
迷失自我 2020-12-07 09:04

I find debugging monit to be a major pain. Monit\'s shell environment basically has nothing in it (no paths or other environment variables). Also, there are no log file that

7条回答
  •  感动是毒
    2020-12-07 09:41

    By default, monit logs to your system message log and you can check there to see what's happening.

    Also, depending on your config, you might be logging to a different place

    tail -f /var/log/monit
    

    http://mmonit.com/monit/documentation/monit.html#LOGGING

    Assuming defaults (as of whatever old version of monit I'm using), you can tail the logs as such:

    CentOS:

    tail -f /var/log/messages
    

    Ubuntu:

    tail -f /var/log/syslog
    

    Mac OSX

    tail -f /var/log/system.log
    

    Windows

    Here be Dragons

    But there is a neato project I found while searching on how to do this out of morbid curiosity: https://github.com/derFunk/monit-windows-agent

提交回复
热议问题