Skip to content

Instantly share code, notes, and snippets.

@erikh

erikh/service.rb Secret

Created January 17, 2012 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikh/c2e18fa254e80a45ce1b to your computer and use it in GitHub Desktop.
Save erikh/c2e18fa254e80a45ce1b to your computer and use it in GitHub Desktop.
class AService < SM::Service
config_from :chef, :databag => "services", :item => "a_service"
std_monitor :flap, :action => :stop, :tries => 2
groups [ :cool_service, :fart ]
def custom_monitor
# ping isn't a real function, just an idea of how this would work
ping("host") == 0
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment