Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 227C8D525 for ; Sun, 8 Jul 2012 14:06:05 +0000 (UTC) Received: (qmail 5850 invoked by uid 500); 8 Jul 2012 14:06:03 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 5674 invoked by uid 500); 8 Jul 2012 14:06:03 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 5642 invoked by uid 99); 8 Jul 2012 14:06:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jul 2012 14:06:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kxepal@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-ee0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jul 2012 14:05:56 +0000 Received: by eeke53 with SMTP id e53so3821129eek.11 for ; Sun, 08 Jul 2012 07:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=p3+wqLtDFWNBtL3ixKPy7OsQ74VUnFstQXvpHYOra8w=; b=O33fQ6XKn9GPbM5+KcwlTRiOFsDOtnMrmLpndBG07wCL0Su+Ao+dJkUsl8i33MsAEc o4HztcnpZjzzQaGtkhWEpJ15FA33CEt3nS5aBB5d6ZlmaGme33kjhUqakVkiNrgQkv9V MZDVUw1DClpSQ+Pf4ZAw1P4VJY0skXCjJHobOPpbZyZNiEyHLIw75Xd9JMnsl46xiHcM LN4e2FOH623SodbteopDkCETLM46XHqQ27qHHDiUTmUOCb5Jf4ixokd2O9ewbNnp+COh k7KS3JvUxNjSdwiTY35plm/wDNOxecRFVbYSUxKjK89q0b3HP1FMBBY0AJvaLVjhreuT j8ww== MIME-Version: 1.0 Received: by 10.14.37.11 with SMTP id x11mr9013571eea.63.1341756336357; Sun, 08 Jul 2012 07:05:36 -0700 (PDT) Received: by 10.14.96.80 with HTTP; Sun, 8 Jul 2012 07:05:36 -0700 (PDT) In-Reply-To: References: Date: Sun, 8 Jul 2012 18:05:36 +0400 Message-ID: Subject: Re: Best way to monitor availability of a CouchDB install From: Alexander Shorin To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Martin. Your plan sounds good, but why not to use special tools such monitoring tasks? Like monit[1], which could not only tell you that CouchDB instance is not available by HTTP API, but also does his process even alive, notify about any problems and restart service if so. [1] http://mmonit.com/monit/ -- ,,,^..^,,, On Sun, Jul 8, 2012 at 5:51 PM, Martin Hewitt wrote: > Hi all, > > I'm working up a monitoring system to track our database servers' statuse= s and I was just wondering if anyone had any hints or tips of how best to d= etect a server going down or becoming unreachable? > > My current plan is to subscribe to the _changes feed for a system databas= e, say _users, with a heartbeat of a second or so, and mark the server "at = risk" if the connection drops, or the heartbeat doesn't arrive, and mark it= as "down" if the _changes connection can't be re-established or if a secon= d heartbeat in a row is missed. > > Martin