Tag Archives: God

Example configuration with God – Monitor nodejs

God is a very powerful process monitoring library written in Ruby. This tutorial describes how to setup a basic monitoring configuration file for a NodeJS application, telling God to restart the NodeJS app upon the process being killed (for what ever reason).

To get started, create a god/ directory within your Node app.

mkdir /var/www/sites/nodeapp/god

In this directory, create a god configuration file

vi /var/www/sites/nodeapp/god/nodeapp.god

Update the global God configuration file (Refer to previous tutorial on installing God on Ubuntu 12.04) with the location of your Node app config.

sudo vi /etc/god.conf
1
God.load '/var/www/sites/nodeapp/god/*.god'

Great, when you reload God it will start using the configuration, but first we must write the configuration file. Open your nodeapp.god config file for editing. We will start off by creating a basic configuration file that will allow you to:

  • Start node
  • Stop node
  • Restart node

Continue reading

Install God background process monitoring on Ubuntu 12.04

God, a monitoring framework written in Ruby is easy to configure, easy to extend and easy to use. God allows you to monitor the state of a process (whether it is running or not) and perform specific tasks dependent upon the state. These tasks can be as simple as restarting the process or go as far as alerting you via email, text, a phone call – basically, anything you can programmatically do in Ruby.

This tutorial shows you how to setup God on Ubuntu 12.04 (and I’m pretty sure it would work for earlier versions of Ubuntu too). I will cover the installation and layout of configuration files, as well as setting up an init service script allowing for God to be started|stopped|restarted easily, and automatically started at boot. Continue reading