From: Michael Shigorin <mike@osdn.org.ua> To: sysadmins@lists.altlinux.org Subject: Re: [Sysadmins] monit rule for VE Date: Mon, 12 Nov 2007 11:59:09 +0200 Message-ID: <20071112095909.GX7957@osdn.org.ua> (raw) In-Reply-To: <20071112080754.GB22865@xeon.vladregion.ru> On Mon, Nov 12, 2007 at 11:07:56AM +0300, Alexander Volkov wrote: > Коллеги, может кто подсказать правило для monit, чтоб он > отслеживал соединение _из_ VE, и при сбое просто перезапускал > его? Ммм... > Я поставил monit внутрь контейнера, дабы он отслеживал процесс > ices2, но не помогает, при падении сервиса он не > перезапускается, нужен рестарт контейнера. А руками перезапускается? Может помочь что-то вида start program = "/usr/local/sbin/ices2-restart.sh" stop program = "/sbin/service ices2 stop" где /usr/local/sbin/ices2-restart.sh содержит нечто вроде service ices2 stop sleep 3 killall -9 ices2 sleep 2 service ices2 start (хотя для вредных сервисов, которые не чинятся, было бы лучше такие костыли всё-таки в инитскрипте фиксировать как forcerestart или навроде того) > Отследить можно по установленному соединению с VE_IP на > HN_IP:8000, но вот как правило формализовать, никак что-то не > соображу. Видимо, скриптиком с парсеньем вывода netstat, но я бы так не делал при возможности сделать проще. -- ---- WBR, Michael Shigorin <mike@altlinux.ru> ------ Linux.Kiev http://www.linux.kiev.ua/
next prev parent reply other threads:[~2007-11-12 9:59 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-11-12 8:07 Alexander Volkov 2007-11-12 9:59 ` Michael Shigorin [this message] 2007-11-12 10:49 ` Alexander Volkov 2007-11-12 18:55 ` Michael Shigorin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20071112095909.GX7957@osdn.org.ua \ --to=mike@osdn.org.ua \ --cc=shigorin@gmail.com \ --cc=sysadmins@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux sysadmins discussion This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \ sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com public-inbox-index sysadmins Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sysadmins AGPL code for this site: git clone https://public-inbox.org/public-inbox.git