Skip to content

Instantly share code, notes, and snippets.

### Nginx ###
check process nginx
with pidfile /run/nginx.pid
start program = "/usr/sbin/service nginx start"
stop program = "/usr/sbin/service nginx stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if memory usage > 80% for 5 cycles then restart
if failed host 167.172.102.203 port 80 protocol http
then restart
Test gist body 1
@novill
novill / ruby-destructor-example.rb
Created April 3, 2019 09:33 — forked from iboard/ruby-destructor-example.rb
Ruby 'Destructor' example.
class Foo
attr_reader :bar
def initialize
@bar = 123
ObjectSpace.define_finalizer( self, self.class.finalize(bar) )
end
def self.finalize(bar)
proc { puts "DESTROY OBJECT #{bar}" }
end
@novill
novill / test-quru-question.txt
Created March 13, 2019 05:33
Вопрос по тесту Beginner test for Marketing от testGuru
Send time 2019-03-13 08:33:13 +0300
Question body 1 for Marketing Beginner test for Marketing 0 Ben Davis
Answer 1 for question 9 c
Answer 2 for question 9
Answer 3 for question 9 c
Answer 4 for question 9
@novill
novill / test-quru-question.txt
Created March 12, 2019 20:54
Вопрос по тесту Beginner test for Marketing от testGuru
Send time 2019-03-12 23:54:50 +0300
Question body 1 for Marketing Beginner test for Marketing 0 Ben Davis
Answer 1 for question 9
Answer 2 for question 9
Answer 3 for question 9
Answer 4 for question 9