In a very simple setup (see config partial below)
I try to get email notifications if the process uses to much memory.
This works until i kill the process manually and god restarts it.
The process running condition keeps filling the log but the memory
condition is not seen anymore.
In the code for the task i found the following:
# cleanup from current state
self.driver.clear_events
self.metrics[from_state].each { |m| m.disable }
The second line clearly tries not to disable the metrics in
self.metrics[nil] when the state changes from running to start.
But the events for the driver are all cleared already in the line
above, so my polling conditions won't get any events anymore after a
state change.
Is this a bug, or am i doing something else wrong?
My config concerning the transitions:
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 30.seconds
c.running = false
end
end
w.lifecycle do |on|
on.condition(:flapping) do |c|
c.to_state = [:start, :restart]
c.times = 5
c.within = 1.minute
c.transition = :unmonitored
c.retry_in = 10.minutes
c.retry_times = 5
c.retry_within = 2.hours
end
on.condition(:memory_usage) do |c|
c.interval = 15.seconds
c.above = 20.gigabytes
c.times = [3, 5]
c.notify = "captainf"
end
end
--
You received this message because you are subscribed to the Google Groups
"god.rb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/god-rb?hl=en.