タグ

godに関するkenkitiiのブックマーク (4)

  • A Simple Faith.. Monitoring by God! – TheWebFellas - Ruby on Rails Development Specialists UK

    I'll try and get all my puns out of the way up front.. In the past, we've used monit to monitor our applications and servers - while we've been aware of God for some time - then it was a case of better the devil we knew as we didn't allocate any time to converting to God. Now, my new found religion hasn't been born of any material failings with monit, more a case of getting round to seeing what G

  • Tim Riley - God init script for Debian/Ubuntu systems

    May 27th 2008 To compliment the Red Hat init script that is available on the net, here’s the init script we use to launch god on our Ubuntu systems. To use, save as /etc/init.d/god, make the file executable, then run update-rc.d god defaults. You’re done. #!/bin/sh ### BEGIN INIT INFO # Provides: god # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Shor

  • Godでプロセスが落ちたときにgmailで通知する方法 - harry’s memorandum

    書いたコードをデーモンとして動かすときに、手抜きしてnohupでバックジョブに投げていたんですが、id:kenkitiiさんに 「rubyGodという便利なものがあるよ」と教えてくれました。 このGodってどういうもの? 通常のプログラムをデーモンとして動かせます。 設定をrubyで記述します。 色々な機能が付いてたりもします。 で、使ってみたら便利すぎてびびりました。 とりあえずプロセスが落ちたときのメール通知をgmail経由にしたかったので、対応できるようにしてみました。 サンプルコード 'test.rb' を作成 ただカウントだけのゴミコードです。 n = 0 while true puts (n += 1) sleep 1 end godで読み込む設定ファイル 'test.god' を作成 notify_smtp()にtlsを対応させています。 require 'tlsmail'

    Godでプロセスが落ちたときにgmailで通知する方法 - harry’s memorandum
    kenkitii
    kenkitii 2010/02/17
    godでgmailを使う
  • Godで簡単daemonize

    今さらながら なぜ daemontools を使うのか - kazuhoのメモ置き場 これを読んで、 通常のプログラムをそのままデーモン化できるから という記述にうんうんと頷いていた。1 今回は、daemontools もいいかもしれないけど God を使って daemon 作ろうぜって話。これは monit には真似できないよ。 cf. M/Monit | Wiki Godでオレオレデーモンを作る例えば以前作った Rswatch っていうログを監視するツールなんかも、一応 daemon のように動くけど、これ落ちたらどうすんのとか、システム起動時に自動的に起きるようにするのどうしよう、とかいろいろ管理しにくくて仕方なかった。デーモンを作ることは、実は 1)目的の動作を作り込むこと、2)デーモン化する処理を作り込むこと、の二つに分けられる。そう、2 は目的じゃない。期待する動作ではあるけれ

  • 1