Sha256: e0174f15fd1608fe5aa15f7057e3ab45b476a509df8c42f673657242b2548f1b
Contents?: true
Size: 518 Bytes
Versions: 1
Compression:
Stored size: 518 Bytes
Contents
# This example shows how to write custom checks: # We check process procline every 1.second, and if it matches `haha` # send TERM signal class MyCheck < Eye::Checker::Custom def get_value Eye::SystemResources.args(@pid) end def good?(value) value !~ /haha/ end end Eye.app :bla do process :a do start_command "ruby -e 'sleep 10; $0 = %q{HAHA}.downcase; sleep'" daemonize true pid_file '/tmp/1.pid' check :my_check, every: 1.second, fires: -> { send_signal(:TERM) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eye-0.10.1.pre | examples/custom_check.eye |