2/8/2024 0 Comments Monit check process example![]() Luckily, I remembered that there was a script runner in monit. There’s not an exit hook for Docker containers, and jury-rigging a mixture of docker wait, docker attach and API calls was a hacky rabbithole that didn’t seem likely to even work anyway. There’s a lot of reasons - and if you’re thinking CLI arguments within the monit DSL then yes, that’s a problem I ran into as well, but also cleaning up pidfiles. Which can be called by the monit process manager:Įxcept that this won’t work well. The problem of course with monit is that you need Pidfiles in order to run up and monitor services using the standard process hooks. So, I needed to set up two different pieces of monitoring:įor each monit cycle (I set it to 60 seconds, but YMMV), checking each host was trivial and worked right away - the monit docs are actually pretty good, and for the simple cases there’s also ample examples in the monitrc file that ships with the install. Also, we already use monit in production, so any big fuckups and I could badger Ric to fix them. It took some time to work out, and it’s by no means perfect, but here’s a potential solution if you want a simple fix.Īt first I looked at Supervisor, but for a variety of reasons (having to foreground processes being one of the main ones) decided against it. In getting these production ready, one of the biggest issues I’ve run into is monitoring. Over the past month or so at Swirrl I’ve been working on using Docker to sandbox all of our microservices (there can be as many as twelve in a full deployment setup). Docker only became production-ready officially a few months ago, but monitoring is a big issue.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |