Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 52066 invoked from network); 5 Jul 2010 13:58:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Jul 2010 13:58:41 -0000 Received: (qmail 84678 invoked by uid 500); 5 Jul 2010 13:58:40 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 84484 invoked by uid 500); 5 Jul 2010 13:58:37 -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 84475 invoked by uid 99); 5 Jul 2010 13:58:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jul 2010 13:58:36 +0000 X-ASF-Spam-Status: No, hits=3.6 required=10.0 tests=FREEMAIL_FROM,FS_REPLICA,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebastiancohnen@googlemail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jul 2010 13:58:29 +0000 Received: by fxm8 with SMTP id 8so6053254fxm.11 for ; Mon, 05 Jul 2010 06:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=Z7RQJGaLkZBI8HVgIRRCgOXw2GDf/lGspuXTl5vv6vI=; b=C+COb/hO71gcDbsf/Q9mfQ2RG7GFVzDuHMYTRRcwUe1tx2tcj69ht54VvimVNLKYbq aB86p4DauYnEH8vyYUBVfLMhVA2FUpQ+I/wbukeqWwd0o3LOG4d7SB5dyNGqNFJNVUNa /FmpYItlpFB6IhG+YaGuGLcrT5c0CCz0TT4HQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=WxTKSyzTq8BBtu9YG+/Xcyv38XLYmtRNieApLwjLs/XbOBKtL206OVaB6bPXOBGrua 8tqu2u0D8xCExMPiOEh/xOYrkKsXxyGO92Joumt5fa2KaSGXztGJ0jOQzWTxoISEekwe mtDhQUDl56W3FwZ02oMO3eKRZ7zeNdDEvRSXA= Received: by 10.223.105.70 with SMTP id s6mr2459774fao.67.1278338288621; Mon, 05 Jul 2010 06:58:08 -0700 (PDT) Received: from shakti.fritz.box (koln-5d814006.pool.mediaWays.net [93.129.64.6]) by mx.google.com with ESMTPS id w16sm9238588fao.22.2010.07.05.06.58.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Jul 2010 06:58:07 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: How to monitor continuous replication status? From: Sebastian Cohnen In-Reply-To: Date: Mon, 5 Jul 2010 15:58:06 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <3E714D46-936C-411A-87B6-FD55078416E4@googlemail.com> References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org a little bit OT maybe, but wouldn't it be nice if _active_task would be = a feed like _changes? So everyone who is interested in monitoring could = simply consume the feed rather than having to poll and check for = changes? On 05.07.2010, at 15:53, Robert Newson wrote: > Continuous replication tasks remain in _active_tasks until they are > cancelled or fail (for example, by the remote end crashing). >=20 > You can grep the front of the "task" string to match it to the > returned _local_id or infer it from from the rest of the string. E.g, >=20 > curl -X PUT http://localhost:5984/_replicate -d > '{"source":"db1","target":"db2","continuous":true}' >=20 > gives; >=20 > {"ok":true,"_local_id":"56a810250d6aed082fa4aae1dc58fb6c"} >=20 > If you poll /_active_tasks, you can see it's still alive; >=20 > curl http://localhost:5984/_active_tasks > [{"type":"Replication","task":"56a810: db1 -> > db2","status":"Starting","pid":"<0.370.0>"}] >=20 > I don't think you can get the timestamp for when couchdb last started, > but I think the per-db "instance_start_time" is probably fine, since I > believe it's used in finding replication checkpoints; >=20 > curl http://localhost:5984/db2 > {"db_name":"db2" .... ,"instance_start_time":"1278337744957334"....} >=20 > I believe there's an effort to persistent continuous replication tasks > so that they are restarted if they fail, so hopefully the answers to > these questions have only short-term validity. >=20 > B. >=20 > On Mon, Jul 5, 2010 at 7:47 AM, Rachel Willmer = wrote: >> Once you have started a continuous replication, is there a way to >> monitor that it is still running? >>=20 >> For example, will it always be visible in _active_tasks even if there >> is no active replication occurring? >>=20 >> Or is there a URL you can ping, passing on the _local_id which is >> given when you start the continuous replication? >>=20 >> Or failing that, is there a URL on the couchdb server which returns >> when it was last restarted? >>=20 >> Rachel >>=20