[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] god 0.4.0 released

Tom Werner

9/10/2007 11:31:00 PM

Progress on god is moving along as quick as ever. This release adds a
bunch of new features and bug fixes. Most interestingly you'll find
several useful new command line functions:

* `god status` prints out the status of each Watch
* `god log` shows realtime logs for a specific Watch (even if you
don't have god logging to file)
* `god load` loads or reloads a config file into a running god instance
* `god terminate` stops all Watches and then stops god (useful when
testing your setup)

The logging system has been beefed up with proper timestamps and
criticality levels. Log messages are more complete overall. You can also
get the STDOUT/STDERR of a god-daemonized process written to a log file
by specify 'w.log = <log file path>' in your Watch config.

If you let god daemonize your process for you, there's no need to
provide a stop command. A default killing lambda will take care of
gracefully (or not so gracefully if necessary) stopping your
god-daemonized process.

The validity of your config file is checked better than previous
versions to point you to the problem area of your config.

The bug that prevented group control from working has been fixed so you
can now start/stop/etc groups of Watches.

Updated documentation is now available on the website:

http://god.ruby...


WHAT IS GOD?

God is an easy to configure, easy to extend monitoring framework written
in Ruby.

Keeping your server processes and tasks running should be a simple part
of your deployment process. God aims to be the simplest, most powerful
monitoring application available.


DISCLAIMER

God is still very young, I'd love to get feedback and bug reports, but I
do not yet recommend you use it for mission critical tasks. I personally
use it in production but then I'm a daring fellow.


INSTALL

sudo gem install god


FEATURES

* Config file is written in Ruby
* Easily write your own custom conditions in Ruby
* Supports both poll and event based conditions
* Different poll conditions can have different intervals
* Easily control non-daemonized processes


EXAMPLE

The easiest way to understand how god will make your life better is by
looking at a sample config file. The following configuration file is
what I use at gravatar.com to keep the mongrels running:

# file: gravatar.god
# run with: god -c /path/to/gravatar.god
#
# This is the actual config file used to keep the mongrels of
# gravatar.com running.

RAILS_ROOT = "/var/www/gravatar2/current"

%w{8200 8201 8202}.each do |port|
God.watch do |w|
w.name = "gravatar2-mongrel-#{port}"
w.interval = 30.seconds # default
w.start = "mongrel_rails cluster::start --only #{port} -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
w.stop = "mongrel_rails cluster::stop --only #{port} -C #{RAILS_ROOT}/config/mongrel_cluster.yml"
w.grace = 10.seconds
w.pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid")

w.behavior(:clean_pid_file)

w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 5.seconds
c.running = false
end
end

w.restart_if do |restart|
restart.condition(:memory_usage) do |c|
c.above = 150.megabytes
c.times = [3, 5] # 3 out of 5 intervals
end

restart.condition(:cpu_usage) do |c|
c.above = 50.percent
c.times = 5
end
end
end
end


DOCS

Detailed documentation is available at http://god.ruby...


CHANGES

== 0.4.0 / 2007-09-10

* Major Enhancements
* Add the ability for conditions to override transition state (for
exceptional cases)
* Implement dynamic load of config files while god is running (god
load <filename>)
* Add ability to save auto-daemonized process output to a log file
* Add robust default stop lambda command for auto-daemonized processes
(inspired by _eric)
* Add status command for god binary (shows status of each watch)
* Create proper logger with timestamps
* Add log command to god binary to get real time logs for a specific
watch from a running god instance
* Add terminate command for god binary (stop god and all watches)
* Minor Enhancements
* Enforce validity of Watches
* Enforce that God.init is not called after a Watch
* Move pid_file_directory creation and validation to God.start
* Remove check for at least one Watch during startup (now that dynamic
loading exists)
* New Conditions
* Tries < PollCondition - triggers after the specified number of tries
* Add :notify_when_flapping behavior to check for oscillation [kevinclark]
* Add :degrading_lambda condition. [kevinclark]
It uses a decaying interval (1/2 rate) for 3 cycles before failing.
* Bug Fixes
* Use exit!(0) instead of exit! in god binary to exit with code 0
(instead of default -1)
* Command line group control fixed
* Fix cross-thread return problem


AUTHORS

Tom Preston-Werner
Kevin Clark

--
Tom Preston-Werner

* Libraries:
Chronic (chronic.rubyforge.org)
God (god.rubyforge.org)
Fuzed (fuzed.rubyforge.org)
* Site:
rubyisawesome.com


2 Answers

icebreaker

5/3/2013 2:50:00 AM

0

On Thu, 02 May 2013 21:12:56 -0400, chicagofan <me7@privacy.net>
wrote:

>icebreaker wrote:
>> On Thu, 02 May 2013 05:25:02 -0400, Ubiquitous<weberm@polaris.net>
>> wrote: What did you watch?
>>>
>>> Chicago Fire -- Matt and Hallie fall back into bed after exchanging
>>> breakup boxes. Severide just keeps digging the hole deeper with the
>>> psycho inept paramedic candidate that has accused him of whatever. I
>>> was hoping Dawson and Shay would take her down. Maybe there's still
>>> hope. Corrupt Voight gets off the charge with a promotion and returns
>>> to makes everyone's life a hell. A new squad replacement is quite the
>>> jackass. Dawson, Hermann, and Otis do a soft opening of Molly's. Is it
>>> just me or are they decreasing the action for more soap? Becoming too
>>> soapy for my taste.
>
>What bothers me most is that a corrupt cop and a schizoid female
>firefighter failure get PROMOTED!!!

Not sure that isn't what sometimes happens with people that have
connections or scams. CFD gave the nutjob a promo to get rid of her
complaint. I'm guessing that's what the chyck wanted in the first
place as she sucked at being a para or firie and knew it. She's a game
player.As for Voight, he has stuff on people in CPD which is why no
one goes after him plus a good number of the force may be on the take
in one way or another.

>
>How on earth do they justify promoting either one of them?!! As for
>Severide, how could he so stupid?

Severide is a pretty boy who can't believe a chyck would do that to
him.

>bj

Godzilla Pimp

5/4/2013 12:17:00 AM

0

icebreaker wrote:
> On Thu, 02 May 2013 21:12:56 -0400, chicagofan<me7@privacy.net>
> wrote:
>
>> icebreaker wrote:
>>> On Thu, 02 May 2013 05:25:02 -0400, Ubiquitous<weberm@polaris.net>
>>> wrote: What did you watch?
>>>> Chicago Fire -- Matt and Hallie fall back into bed after exchanging
>>>> breakup boxes. Severide just keeps digging the hole deeper with the
>>>> psycho inept paramedic candidate that has accused him of whatever. I
>>>> was hoping Dawson and Shay would take her down. Maybe there's still
>>>> hope. Corrupt Voight gets off the charge with a promotion and returns
>>>> to makes everyone's life a hell. A new squad replacement is quite the
>>>> jackass. Dawson, Hermann, and Otis do a soft opening of Molly's. Is it
>>>> just me or are they decreasing the action for more soap? Becoming too
>>>> soapy for my taste.
>> What bothers me most is that a corrupt cop and a schizoid female
>> firefighter failure get PROMOTED!!!
> Not sure that isn't what sometimes happens with people that have
> connections or scams. CFD gave the nutjob a promo to get rid of her
> complaint. I'm guessing that's what the chyck wanted in the first
> place as she sucked at being a para or firie and knew it. She's a game
> player.As for Voight, he has stuff on people in CPD which is why no
> one goes after him plus a good number of the force may be on the take
> in one way or another.

I'm sure that's what the dirty blonde was after too, but I had forgotten
that Voight had every opportunity to be gathering blackmail info on his
job before and that would explain his good fortune... unfortunately.
:( Thanks for clearing that up. :)


>> How on earth do they justify promoting either one of them?!! As for
>> Severide, how could he so stupid?
> Severide is a pretty boy who can't believe a chyck would do that to
> him.

I'm sure that's true before she did this to him, but what blew me away
was him contacting her after... and giving her more opportunities to
make outrageous claims about him. Not to mention how it makes him look
guilty... as if he's trying to intimidate her. <sigh> I hope she will
be brought down before this series is over. :)
bj
>
>> bj