Options for monitoring Butler SOS itself.
Day 2 operations
Running Butler SOS
How to start and keep Butler SOS running varies depending on whether you are using Docker or a native Node.js approach.
Starting Butler SOS using Docker is easy.
First configure the
docker-compose.yml file as needed, then start the Docker container in interactive mode (with output sent to the screen).
This is useful to ensure everything works as intended when first setting up Butler SOS.
Once Butler SIS has been verified to work as intended, hit
ctrl-c to stop it.
Then start Butler SOS in deameon (background) mode:
docker-compose up -d
From here on the Docker enviromment will make sure Butler SOS is always running, including restarting it if it for some reason stops.
Starting Butler SOS as a Node.js on Windows could look like this:
d: cd \node\butler-sos\src node butler-sos.js
It is of course also possible to put those commands in a command file (.bat on Windows, .sh etc on other platforms) file and execute that file instead.
Windows services & process monitors
As Butler SOS is the kind of service that (probably) should always be running on a server, it makes sense using a Node.js process monitor to keep it alive (if running Butler SOS as a Docker container you get this for free).
On Windows you can use the excellent Nssm tool to make Butler SOS run as a Windows Service, with all the benefits that follow (can be monitored using operations tools, automatic restarts etc).
One caveat with these is that it can be hard to start them (and thus Butler SOS) when a Windows server is rebooted. PM2 can be used to solve this challenge in a nice way, more info in this blog post. On the other hand - just using Nssm is probably the easiest and best option for Windows.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how Butler SOS can be improved.