I am using God for the first time to monitor my resque and resque-sceduler process.I followed the tutorial on God's home page. According to that if god if there is already a watch added to God by:
sudo god -c /path/to/config.god
then after editing the watch it can be added to God again using the same command. But it does not allow to add it and reports that sock is already in use, I have to manually kill the process and add the watch again. Am I missing something?
I need to add the watch again after every deployment, that is why I am trying to do this.
The page you link to does not actually support your assertion that you reload watches by using the same command that starts god
, to wit:
sudo god -c /path/to/config.god
Instead it says to use:
sudo god load path/to/config.god
Specifically, the extracted parts of that page are:
STARTING AND CONTROLLING GOD
To start the god monitoring process as a daemon simply run the god executable passing in the path to the config file (you need to sudo if you're using events on Linux or want to use the setuid/setgid functionality):
$ sudo god -c /path/to/config.god
: : : : :
DYNAMICALLY LOADING CONFIG FILES INTO AN ALREADY RUNNING GOD
God allows you to load or reload configurations into an already running instance. There are a few things to consider when doing this:
- Existng Watches with the same name as the incoming Watches will be overidden by the new config.
- All paths must be either absolute or relative to the path from which god was started.
To load a config into a running god, issue the following command:
$ sudo god load path/to/config.god
If you're relying on the text:
Ctrl-C out of the foregrounded god instance. Notice that your current simple server will continue to run. Start god again with the same command as before.
then that's only for a foregrounded instance of god
, one run with -D
. If you CTRL-C that, then god
will stop (but the servers it started will continue). If you're god
instance is running in the background (no -D
), you need to use kill
to stop it in the same manner.